AQAOCHK2 ; IHS/ORDC/LJF - PRINT TICKLER REPORT ;
;;1.01;QAI MANAGEMENT;;OCT 05, 1995
;
;This rtn asks the user to choose from 5 groups of occurrences and
;choose print device. It then calls ^AQAOCHK4 to do the actual print.
;
RANGE ; >>> ask user for range of items to print
W !!!?20,"OCCURRENCE TICKLER REPORT",!!
W !,"OCCURRENCE GROUPINGS:",! K DIR S DIR(0)="LO^1:5^K:X#1 X"
S DIR("A")="Choose which ITEM(S) you wish to print",DIR("A",6)=" "
F I=1:1:5 S DIR("A",I)=I_". "_$P($T(MSG+I),";;",3)
D ^DIR G END:X="",END:$D(DIRUT) S AQAOXYZ(4)=Y
;
QIASK ; >> ask qi staff user if want to print all referrals or just his/hers
I '($D(AQAOXYZ)#2) G DEV ;no a qi staff member
I (AQAOXYZ(4)'[2),(AQAOXYZ(4)'[3) G DEV ;didn't choose referrals
W ! K DIR S DIR(0)="YO",DIR("B")="NO"
S DIR("A")="Do you wish to print MORE THAN just YOUR REFERRALS"
D ^DIR G RANGE:X="",END:$D(DIRUT),DEV:Y=0 S AQAOALL=""
W !,"OKAY, I will print ALL REFERRALS"
;
DEV ; >>> get print device
W !! S %ZIS="QP" D ^%ZIS G END:POP
I '$D(IO("Q")) U IO G PRINT^AQAOCHK4
K IO("Q") S ZTRTN="PRINT^AQAOCHK4",ZTDESC="TICKLER REPORT"
F I="AQAOXYZ(","^TMP(""AQAOCHK"",$J," S ZTSAVE(I)=""
D ^%ZTLOAD K ZTSK D ^%ZISC D HOME^%ZIS D KILL^AQAOUTIL Q
;
;
END ;ENTRY POINT called by AQAOCHK1
K ^TMP("AQAOCHK",$J) K AQAOXYZ
D ^%ZISC D KILL^AQAOUTIL
Q
;
;
MSG ;;
;; Occurrence(s) needing INITIAL REVIEWS;;INITIAL REVIEWS
;; Occurrence(s) with PERSONAL REFERRALS;;PERSONAL REFERRALS
;; Occurrence(s) with REFERRALS TO QI TEAM;;TEAM REFERRALS
;; Occurrence(s) REVIEWED but NOT CLOSED;;OPEN OCCURRENCES
;; Pending ACTION PLAN(S);;ACTION PLANS
AQAOCHK2 ; IHS/ORDC/LJF - PRINT TICKLER REPORT ;
+1 ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
+2 ;
+3 ;This rtn asks the user to choose from 5 groups of occurrences and
+4 ;choose print device. It then calls ^AQAOCHK4 to do the actual print.
+5 ;
RANGE ; >>> ask user for range of items to print
+1 WRITE !!!?20,"OCCURRENCE TICKLER REPORT",!!
+2 WRITE !,"OCCURRENCE GROUPINGS:",!
KILL DIR
SET DIR(0)="LO^1:5^K:X#1 X"
+3 SET DIR("A")="Choose which ITEM(S) you wish to print"
SET DIR("A",6)=" "
+4 FOR I=1:1:5
SET DIR("A",I)=I_". "_$PIECE($TEXT(MSG+I),";;",3)
+5 DO ^DIR
IF X=""
GOTO END
IF $DATA(DIRUT)
GOTO END
SET AQAOXYZ(4)=Y
+6 ;
QIASK ; >> ask qi staff user if want to print all referrals or just his/hers
+1 ;no a qi staff member
IF '($DATA(AQAOXYZ)#2)
GOTO DEV
+2 ;didn't choose referrals
IF (AQAOXYZ(4)'[2)
IF (AQAOXYZ(4)'[3)
GOTO DEV
+3 WRITE !
KILL DIR
SET DIR(0)="YO"
SET DIR("B")="NO"
+4 SET DIR("A")="Do you wish to print MORE THAN just YOUR REFERRALS"
+5 DO ^DIR
IF X=""
GOTO RANGE
IF $DATA(DIRUT)
GOTO END
IF Y=0
GOTO DEV
SET AQAOALL=""
+6 WRITE !,"OKAY, I will print ALL REFERRALS"
+7 ;
DEV ; >>> get print device
+1 WRITE !!
SET %ZIS="QP"
DO ^%ZIS
IF POP
GOTO END
+2 IF '$DATA(IO("Q"))
USE IO
GOTO PRINT^AQAOCHK4
+3 KILL IO("Q")
SET ZTRTN="PRINT^AQAOCHK4"
SET ZTDESC="TICKLER REPORT"
+4 FOR I="AQAOXYZ(","^TMP(""AQAOCHK"",$J,"
SET ZTSAVE(I)=""
+5 DO ^%ZTLOAD
KILL ZTSK
DO ^%ZISC
DO HOME^%ZIS
DO KILL^AQAOUTIL
QUIT
+6 ;
+7 ;
END ;ENTRY POINT called by AQAOCHK1
+1 KILL ^TMP("AQAOCHK",$JOB)
KILL AQAOXYZ
+2 DO ^%ZISC
DO KILL^AQAOUTIL
+3 QUIT
+4 ;
+5 ;
MSG ;;
+1 ;; Occurrence(s) needing INITIAL REVIEWS;;INITIAL REVIEWS
+2 ;; Occurrence(s) with PERSONAL REFERRALS;;PERSONAL REFERRALS
+3 ;; Occurrence(s) with REFERRALS TO QI TEAM;;TEAM REFERRALS
+4 ;; Occurrence(s) REVIEWED but NOT CLOSED;;OPEN OCCURRENCES
+5 ;; Pending ACTION PLAN(S);;ACTION PLANS