source: FOIAVistA/trunk/r/CLINICAL_INFO_RESOURCE_NETWORK-MRF-RGE--RG--RGED--RGUT--RGWB/RGEQDMN1.m@ 1535

Last change on this file since 1535 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1RGEQDMN1 ;BHM/RGY-DEQUEUE PROCESSOR CONTINUED ;2/17/98
2 ;;1.0;CLINICAL INFO RESOURCE NETWORK;**19**;30 Apr 99
3STOP ;Stop dequeue processor
4 NEW ENT,DIR,DTOUT,DUOUT,DIRUT,DIE,DA,DR,Y,STAT
5 S DIR("A")="Do you want to stop ALL MPI/PD processing"
6 S DIR(0)="Y",DIR("B")="NO"
7 D ^DIR K DIR Q:$D(DIRUT)
8 I Y=1 S ^RGEQ("ASTOP")="YES" W " ... Done" Q
9 S DIR("A")="Do you want to ENABLE/DISABLE a particular data class"
10 S DIR(0)="Y",DIR("B")="NO"
11 D ^DIR K DIR Q:$D(DIRUT)
12 I Y=1 D
13 .S DIR(0)="PO^995:QEAM",DIR("A")="Select MPI/PD Data Class"
14 .D ^DIR K DIR Q:$D(DIRUT)
15 .S ENT=+Y,STAT=+$P(^RGEQASN(ENT,0),"^",5)
16 .W !
17 .S DIR("A",1)="NOTE: This class is currently "_$P("enabled^disabled","^",STAT+1)
18 .S DIR("A")=" ...Do you want to "_$P("DISABLE^ENABLE","^",STAT+1)
19 .S DIR(0)="Y",DIR("B")="NO"
20 .D ^DIR K DIR Q:$D(DIRUT)
21 .I Y=0 Q
22 .S DIE="^RGEQASN(",DA=ENT,DR="5////^S X="_$P("1^0","^",STAT+1) D ^DIE
23 .W " ...Done."
24 .Q
25 Q
26START ;Start the queue processor
27 NEW DIR,DTOUT,DUOUT,DIRUT,ZTSK,ZTIO,ZTRTN,ZTSAVE,ZTDESC
28 L +^RGEQ("MAIN"):0 E D Q
29 .W !!,"The MPI/PD processor is already running!"
30 .Q
31 L -^RGEQ("MAIN")
32 S DIR("A")="Are you sure you want to start the MPI/PD processor"
33 S DIR(0)="Y",DIR("B")="NO"
34 D ^DIR K DIR Q:$D(DIRUT)
35 I Y=1 D Q
36 .S ZTRTN="MAIN^RGEQDMN",ZTDESC="'MAIN' MPI/PD process"
37 .S ZTREQ="@",ZTDTH=$H,ZTIO=""
38 .D ^%ZTLOAD
39 .I $G(ZTSK) W " ... done."
40 .S ^RGEQ("ASTOP")="NO"
41 .Q
42 W "...NOT queued"
43 Q
44AUTO ;Automatically start background process
45 NEW ZTSK,ZTIO,ZTRTN,ZTSAVE,ZTDESC
46 L +^RGEQ("MAIN"):0 E Q
47 L -^RGEQ("MAIN")
48 S ZTRTN="MAIN^RGEQDMN",ZTDESC="'MAIN' MPI/PD process"
49 S ZTREQ="@",ZTDTH=$H,ZTIO=""
50 D ^%ZTLOAD
51 S ^RGEQ("ASTOP")="NO"
52 Q
53TEST(TYPE,PARAM,ERROR,HL7) ;Test queue processor
54 Q
55ESTOP(TYPE) ;Check to see if filer should stop
56 I ($G(^RGEQ("ASTOP"))="YES")!($$SEND^RGJUSITE=0) Q 1
57 I TYPE="MAIN" Q 0
58 Q ($$SEND^RGJUSITE=2)!(+$P($G(^RGEQASN(+$O(^RGEQASN("B",TYPE,0)),0)),"^",5))
59STATUS ;check current status of event queue, used for menu entry actions
60 ;added by CML 4/1/99
61 L +^RGEQ("MAIN"):0 E D Q
62 .W !!,"=> MPI/PD Event Queue processor is currently running.",!
63 .Q
64 W $C(7),$C(7),!!,"=> MPI/PD Event Queue processor is <<NOT>> currently running.",!
65 L -^RGEQ("MAIN")
66 Q
Note: See TracBrowser for help on using the repository browser.