Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: RGEQDMN1

RGEQDMN1.m

Go to the documentation of this file.
  1. RGEQDMN1 ;BHM/RGY-DEQUEUE PROCESSOR CONTINUED ;2/17/98
  1. ;;1.0;CLINICAL INFO RESOURCE NETWORK;**19**;30 Apr 99
  1. STOP ;Stop dequeue processor
  1. NEW ENT,DIR,DTOUT,DUOUT,DIRUT,DIE,DA,DR,Y,STAT
  1. S DIR("A")="Do you want to stop ALL MPI/PD processing"
  1. S DIR(0)="Y",DIR("B")="NO"
  1. D ^DIR K DIR Q:$D(DIRUT)
  1. I Y=1 S ^RGEQ("ASTOP")="YES" W " ... Done" Q
  1. S DIR("A")="Do you want to ENABLE/DISABLE a particular data class"
  1. S DIR(0)="Y",DIR("B")="NO"
  1. D ^DIR K DIR Q:$D(DIRUT)
  1. I Y=1 D
  1. .S DIR(0)="PO^995:QEAM",DIR("A")="Select MPI/PD Data Class"
  1. .D ^DIR K DIR Q:$D(DIRUT)
  1. .S ENT=+Y,STAT=+$P(^RGEQASN(ENT,0),"^",5)
  1. .W !
  1. .S DIR("A",1)="NOTE: This class is currently "_$P("enabled^disabled","^",STAT+1)
  1. .S DIR("A")=" ...Do you want to "_$P("DISABLE^ENABLE","^",STAT+1)
  1. .S DIR(0)="Y",DIR("B")="NO"
  1. .D ^DIR K DIR Q:$D(DIRUT)
  1. .I Y=0 Q
  1. .S DIE="^RGEQASN(",DA=ENT,DR="5////^S X="_$P("1^0","^",STAT+1) D ^DIE
  1. .W " ...Done."
  1. .Q
  1. Q
  1. START ;Start the queue processor
  1. NEW DIR,DTOUT,DUOUT,DIRUT,ZTSK,ZTIO,ZTRTN,ZTSAVE,ZTDESC
  1. L +^RGEQ("MAIN"):0 E D Q
  1. .W !!,"The MPI/PD processor is already running!"
  1. .Q
  1. L -^RGEQ("MAIN")
  1. S DIR("A")="Are you sure you want to start the MPI/PD processor"
  1. S DIR(0)="Y",DIR("B")="NO"
  1. D ^DIR K DIR Q:$D(DIRUT)
  1. I Y=1 D Q
  1. .S ZTRTN="MAIN^RGEQDMN",ZTDESC="'MAIN' MPI/PD process"
  1. .S ZTREQ="@",ZTDTH=$H,ZTIO=""
  1. .D ^%ZTLOAD
  1. .I $G(ZTSK) W " ... done."
  1. .S ^RGEQ("ASTOP")="NO"
  1. .Q
  1. W "...NOT queued"
  1. Q
  1. AUTO ;Automatically start background process
  1. NEW ZTSK,ZTIO,ZTRTN,ZTSAVE,ZTDESC
  1. L +^RGEQ("MAIN"):0 E Q
  1. L -^RGEQ("MAIN")
  1. S ZTRTN="MAIN^RGEQDMN",ZTDESC="'MAIN' MPI/PD process"
  1. S ZTREQ="@",ZTDTH=$H,ZTIO=""
  1. D ^%ZTLOAD
  1. S ^RGEQ("ASTOP")="NO"
  1. Q
  1. TEST(TYPE,PARAM,ERROR,HL7) ;Test queue processor
  1. Q
  1. ESTOP(TYPE) ;Check to see if filer should stop
  1. I ($G(^RGEQ("ASTOP"))="YES")!($$SEND^RGJUSITE=0) Q 1
  1. I TYPE="MAIN" Q 0
  1. Q ($$SEND^RGJUSITE=2)!(+$P($G(^RGEQASN(+$O(^RGEQASN("B",TYPE,0)),0)),"^",5))
  1. STATUS ;check current status of event queue, used for menu entry actions
  1. ;added by CML 4/1/99
  1. L +^RGEQ("MAIN"):0 E D Q
  1. .W !!,"=> MPI/PD Event Queue processor is currently running.",!
  1. .Q
  1. W $C(7),$C(7),!!,"=> MPI/PD Event Queue processor is <<NOT>> currently running.",!
  1. L -^RGEQ("MAIN")
  1. Q