AMQQCMPL ; IHS/CMI/THL - SETS SEARCH CODE ; 21 Mar 2011 11:54 AM
;;2.0;IHS PCC SUITE;**6**;MAY 14, 2009;Build 11
;-----
K AMQQKGNO,AMQQUSQN,AMQQUQQN,AMQQSQAA,AMQQUSQL,AMQQXSQF S AMQQTOT=0
I '$D(AMQQNOET) S X="ERR^AMQQCMPL",@^%ZOSF("TRAP")
I $$VERSION^%ZOSV(1)["Cache" S:'$D(AMQQNOET) AMQQETRP=$ZT,X="ERR^AMQQ",@^%ZOSF("TRAP")
I $$VERSION^%ZOSV(1)'["Cache" S:'$D(AMQQNOET) AMQQETRP=$ZT,X="ERR^AMQQ",@^%ZOSF("TRAP")
I $D(^UTILITY("AMQQ OR",$J)) D ^AMQQCMPK
I $D(AMQQXX) D ^AMQQCMP1 G:$D(AMQQQUIT) EXIT D ^AMQQCMP2,@AMQV("OPTION") G EXIT
RUN K AMQQRERF,AMQQQUIT
D OUT^AMQQOPT
I $D(AMQQQUIT) G EXIT
I '$D(AMQQCPLF) D ^AMQQCMP1 G:$D(AMQQQUIT) EXIT D ^AMQQCMP2
DOIT ; ENTRY POINT FROM AMQQQE1
D @AMQV("OPTION")
I $D(AMQQCPLF)!$D(AMQQQUIT),$G(AMQV("OPTION"))'="LIST" G RUN
EXIT K Q,AMQQHOLD,AMQQLINO,AMQQFVAR,AMQQVALU,AMQQVSIT,AMQQTOT,AMQQSF,AMQQAG,AMQT,AMQP,X,X1,X2,N,G,AMQQCPLF,AMQQMULL,AMQQMUNV,AMQQMUFV,AMQQOV,AMQQXX,AMQQDIBT,AMQQSQFN,AMQQSQ1,AMQQAFNN,%,%Y,AMQQFFF,AMQQ("BP COHORT FLG")
I $G(AMQQETRP)]"" S $ZT=AMQQETRP K AMQQETRP
Q
;
LIST ; ENTRY POINT FROM AMQQCMP0
I $D(AMQQYY(0)) X AMQV(0) Q
I '$D(AMQQXX),$E(IOST,1,2)'="P-",AMQV("OPTION")'="COUNT" W !! D WAIT^DICD I $G(AMQQCCLS)="P" D
.I '$G(AMQQDLIM) W !!!,"Please note: Patients whose names are marked with an ""*"" may have aliases.",!!! H 2
I $G(AMQQDLIM) D
.W !!!,"Please turn on your screen capture capability",!,"to capture '^' (up hat) delimited output.",!!
.K DIR
.S DIR(0)="E"
.D ^DIR
.K DUOUR,DTOUT,DIRUT,DIR
.;CMI/GRL prompt for device with HOME default
.;D PRINT^AMQQSEC E W " <= Not a secure device!!",*7 G DEV
.W !!
.S %ZIS="M" ;force prompt for Rt margin
.S %ZIS("B")="HOME"
.D ^%ZIS
.S AMQQIOP=IO
.I POP S AMQQQUIT="" Q
X AMQV(0)
LISTEND ; ENTRY POINT FROM AMQQQE1
K AMQQCPLF
I $D(AMQQQUIT) Q
I $E(IOST,1,2)'="P-" D Q
.W:'$G(AMQQDLIM) !,"Total: ",+$G(AMQQTOT)
.W:$G(AMQQDLIM) !!,"Screen capture content completed.",!,"Please turn off screen capture.",!
.S DIR(0)="E"
.D ^DIR
.K DUOUT,DTOUT,DIRUT,DIR,AMQQDLIM
W @IOF,@IOF
D ^%ZISC
Q
;
COHORT I '$D(AMQQNOET),$D(^%ZOSF("TRAP")) S X="ERRC^AMQQCMPL",@^%ZOSF("TRAP")
I $D(AMQQEN31) D ^AMQQCMPC Q
D ^AMQQCMP0
Q
;
PRINT D ^AMQQCMPP
K AMQQCPLF
Q
;
COUNT D COUNT^AMQQCMPP
K AMQQCPLF
Q
;
SAVE D ^AMQQCMPS
Q
;
OUTPUT ; ENTRY POINT FROM AMQQENQ
D OUT^AMQQOPT I $D(AMQQQUIT) Q
D @AMQV("OPTION")
Q
;
ERRC I $D(AMQQDIBT) K ^DIBT(AMQQDIBT,1)
ERR I '$D(AMQQNOET) X "I $P($ZE,"">"")=""<INTERRUPT""!($ZE[""-CTRAP"")" I D ^%ZISC W !!,"Session terminated...",!! H 2 S AMQQQUIT="" D EXIT S AMQQQUIT="" Q
I '$D(AMQQNOET) X "I $P($ZE,"">"")=""<INRPT""!($ZE[""-CTRAP"")" I D ^%ZISC W !!,"Session terminated...",!! H 2 S AMQQQUIT="" D EXIT S AMQQQUIT="" Q
I $E(IOST,1,2)="C-" W !!,"ERROR DETECTED...SESSION ABORTED...SUSPECT MISSING DATA...NOTIFY SITE MANAGER",!!,*7 H 3 D ^%ZISC,@^%ZOSF("ERRTN")
I $E(IOST,1,2)'="C-" D ^%ZISC
D EXIT,EXIT^AMQQ Q
Q
;
STORE D STORE^AMQQQE
I $D(AMQQQUIT) Q
D ^AMQQCMPS
S AMQQCPLF=""
K AMQV("OPTION")
Q
;
MAIL D MAILX^AMQQRML
Q
AGE D BUCKET^AMQQRMA
Q
WORK D WORK^AMQQRMD
Q
MONTH D MON^AMQQRMM
Q
TIME D TIME^AMQQRMT
Q
HSUM D HSUM^AMQQRMH
Q
EMAN D ^AMQQEMAN
Q
AMQQCMPL ; IHS/CMI/THL - SETS SEARCH CODE ; 21 Mar 2011 11:54 AM
+1 ;;2.0;IHS PCC SUITE;**6**;MAY 14, 2009;Build 11
+2 ;-----
+3 KILL AMQQKGNO,AMQQUSQN,AMQQUQQN,AMQQSQAA,AMQQUSQL,AMQQXSQF
SET AMQQTOT=0
+4 IF '$DATA(AMQQNOET)
SET X="ERR^AMQQCMPL"
SET @^%ZOSF("TRAP")
+5 IF $$VERSION^%ZOSV(1)["Cache"
IF '$DATA(AMQQNOET)
SET AMQQETRP=$ZT
SET X="ERR^AMQQ"
SET @^%ZOSF("TRAP")
+6 IF $$VERSION^%ZOSV(1)'["Cache"
IF '$DATA(AMQQNOET)
SET AMQQETRP=$ZT
SET X="ERR^AMQQ"
SET @^%ZOSF("TRAP")
+7 IF $DATA(^UTILITY("AMQQ OR",$JOB))
DO ^AMQQCMPK
+8 IF $DATA(AMQQXX)
DO ^AMQQCMP1
IF $DATA(AMQQQUIT)
GOTO EXIT
DO ^AMQQCMP2
DO @AMQV("OPTION")
GOTO EXIT
RUN KILL AMQQRERF,AMQQQUIT
+1 DO OUT^AMQQOPT
+2 IF $DATA(AMQQQUIT)
GOTO EXIT
+3 IF '$DATA(AMQQCPLF)
DO ^AMQQCMP1
IF $DATA(AMQQQUIT)
GOTO EXIT
DO ^AMQQCMP2
DOIT ; ENTRY POINT FROM AMQQQE1
+1 DO @AMQV("OPTION")
+2 IF $DATA(AMQQCPLF)!$DATA(AMQQQUIT)
IF $GET(AMQV("OPTION"))'="LIST"
GOTO RUN
EXIT KILL Q,AMQQHOLD,AMQQLINO,AMQQFVAR,AMQQVALU,AMQQVSIT,AMQQTOT,AMQQSF,AMQQAG,AMQT,AMQP,X,X1,X2,N,G,AMQQCPLF,AMQQMULL,AMQQMUNV,AMQQMUFV,AMQQOV,AMQQXX,AMQQDIBT,AMQQSQFN,AMQQSQ1,AMQQAFNN,%,%Y,AMQQFFF,AMQQ("BP COHORT FLG")
+1 IF $GET(AMQQETRP)]""
SET $ZT=AMQQETRP
KILL AMQQETRP
+2 QUIT
+3 ;
LIST ; ENTRY POINT FROM AMQQCMP0
+1 IF $DATA(AMQQYY(0))
XECUTE AMQV(0)
QUIT
+2 IF '$DATA(AMQQXX)
IF $EXTRACT(IOST,1,2)'="P-"
IF AMQV("OPTION")'="COUNT"
WRITE !!
DO WAIT^DICD
IF $GET(AMQQCCLS)="P"
Begin DoDot:1
+3 IF '$GET(AMQQDLIM)
WRITE !!!,"Please note: Patients whose names are marked with an ""*"" may have aliases.",!!!
HANG 2
End DoDot:1
+4 IF $GET(AMQQDLIM)
Begin DoDot:1
+5 WRITE !!!,"Please turn on your screen capture capability",!,"to capture '^' (up hat) delimited output.",!!
+6 KILL DIR
+7 SET DIR(0)="E"
+8 DO ^DIR
+9 KILL DUOUR,DTOUT,DIRUT,DIR
+10 ;CMI/GRL prompt for device with HOME default
+11 ;D PRINT^AMQQSEC E W " <= Not a secure device!!",*7 G DEV
+12 WRITE !!
+13 ;force prompt for Rt margin
SET %ZIS="M"
+14 SET %ZIS("B")="HOME"
+15 DO ^%ZIS
+16 SET AMQQIOP=IO
+17 IF POP
SET AMQQQUIT=""
QUIT
End DoDot:1
+18 XECUTE AMQV(0)
LISTEND ; ENTRY POINT FROM AMQQQE1
+1 KILL AMQQCPLF
+2 IF $DATA(AMQQQUIT)
QUIT
+3 IF $EXTRACT(IOST,1,2)'="P-"
Begin DoDot:1
+4 IF '$GET(AMQQDLIM)
WRITE !,"Total: ",+$GET(AMQQTOT)
+5 IF $GET(AMQQDLIM)
WRITE !!,"Screen capture content completed.",!,"Please turn off screen capture.",!
+6 SET DIR(0)="E"
+7 DO ^DIR
+8 KILL DUOUT,DTOUT,DIRUT,DIR,AMQQDLIM
End DoDot:1
QUIT
+9 WRITE @IOF,@IOF
+10 DO ^%ZISC
+11 QUIT
+12 ;
COHORT IF '$DATA(AMQQNOET)
IF $DATA(^%ZOSF("TRAP"))
SET X="ERRC^AMQQCMPL"
SET @^%ZOSF("TRAP")
+1 IF $DATA(AMQQEN31)
DO ^AMQQCMPC
QUIT
+2 DO ^AMQQCMP0
+3 QUIT
+4 ;
PRINT DO ^AMQQCMPP
+1 KILL AMQQCPLF
+2 QUIT
+3 ;
COUNT DO COUNT^AMQQCMPP
+1 KILL AMQQCPLF
+2 QUIT
+3 ;
SAVE DO ^AMQQCMPS
+1 QUIT
+2 ;
OUTPUT ; ENTRY POINT FROM AMQQENQ
+1 DO OUT^AMQQOPT
IF $DATA(AMQQQUIT)
QUIT
+2 DO @AMQV("OPTION")
+3 QUIT
+4 ;
ERRC IF $DATA(AMQQDIBT)
KILL ^DIBT(AMQQDIBT,1)
ERR IF '$DATA(AMQQNOET)
XECUTE "I $P($ZE,"">"")=""<INTERRUPT""!($ZE[""-CTRAP"")"
IF $TEST
DO ^%ZISC
WRITE !!,"Session terminated...",!!
HANG 2
SET AMQQQUIT=""
DO EXIT
SET AMQQQUIT=""
QUIT
+1 IF '$DATA(AMQQNOET)
XECUTE "I $P($ZE,"">"")=""<INRPT""!($ZE[""-CTRAP"")"
IF $TEST
DO ^%ZISC
WRITE !!,"Session terminated...",!!
HANG 2
SET AMQQQUIT=""
DO EXIT
SET AMQQQUIT=""
QUIT
+2 IF $EXTRACT(IOST,1,2)="C-"
WRITE !!,"ERROR DETECTED...SESSION ABORTED...SUSPECT MISSING DATA...NOTIFY SITE MANAGER",!!,*7
HANG 3
DO ^%ZISC
DO @^%ZOSF("ERRTN")
+3 IF $EXTRACT(IOST,1,2)'="C-"
DO ^%ZISC
+4 DO EXIT
DO EXIT^AMQQ
QUIT
+5 QUIT
+6 ;
STORE DO STORE^AMQQQE
+1 IF $DATA(AMQQQUIT)
QUIT
+2 DO ^AMQQCMPS
+3 SET AMQQCPLF=""
+4 KILL AMQV("OPTION")
+5 QUIT
+6 ;
MAIL DO MAILX^AMQQRML
+1 QUIT
AGE DO BUCKET^AMQQRMA
+1 QUIT
WORK DO WORK^AMQQRMD
+1 QUIT
MONTH DO MON^AMQQRMM
+1 QUIT
TIME DO TIME^AMQQRMT
+1 QUIT
HSUM DO HSUM^AMQQRMH
+1 QUIT
EMAN DO ^AMQQEMAN
+1 QUIT