AQAOCHK1 ; IHS/ORDC/LJF - DISPLAY TICKLER SUMMARY ;
;;1.01;QAI MANAGEMENT;;OCT 05, 1995
;
;This rtn prints the Introductory Message and asks if the user wants
;to print the Tickler Report listing occurrences needing attention.
;
I '$D(AQAOXYZ)!('$D(^TMP("AQAOCHK",$J))) D ENTRY^AQAOCHK Q
;
DISPLAY ; >>> display review status for user
W ! S Y=0 F S Y=$O(AQAOXYZ(3,Y)) Q:Y="" D
.I $D(AQAOXYZ)#2,((Y=2)!(Y=3)) D QIDSPLY Q ;refer for qi staff
.I Y=5 D ACTDSPLY Q ;display action plan numbers
.W !,AQAOXYZ(3,Y),$P($T(MSG+Y),";;",2)
;
ASK ; >>> ask user if a printed report is requested?
W !! K DIR S DIR(0)="YO",DIR("B")="NO"
S DIR("A")="Do you wish to PRINT A LISTING of these Occurrences"
D ^DIR G END:$D(DIRUT),^AQAOCHK2:Y=1
;
END ; >>> end of check & display
W !,"You can print the report at any time by selecting the menu"
W " option titled"
W !,"'PRINT OCCURRENCE TICKLER REPORT' on the Occurrence EVALUATION"
W " Reports Menu."
G END^AQAOCHK2
;
;
QIDSPLY ; >> SUBRTN to display referrals if user is qi staff
W !,AQAOXYZ(3,Y,1),$P($T(MSG+Y),";;",2)
W " (",+$G(AQAOXYZ(3,Y))," for you)"
Q
;
;
ACTDSPLY ; >> SUBRTN to display action plan numbers
S (Z,AQAOCNT)=0 F S Z=$O(AQAOXYZ(3,5,Z)) Q:Z="" D
.S AQAOCNT=AQAOCNT+AQAOXYZ(3,5,Z)
W !,AQAOCNT,$P($T(MSG+Y),";;",2)
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
AQAOCHK1 ; IHS/ORDC/LJF - DISPLAY TICKLER SUMMARY ;
+1 ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
+2 ;
+3 ;This rtn prints the Introductory Message and asks if the user wants
+4 ;to print the Tickler Report listing occurrences needing attention.
+5 ;
+6 IF '$DATA(AQAOXYZ)!('$DATA(^TMP("AQAOCHK",$JOB)))
DO ENTRY^AQAOCHK
QUIT
+7 ;
DISPLAY ; >>> display review status for user
+1 WRITE !
SET Y=0
FOR
SET Y=$ORDER(AQAOXYZ(3,Y))
IF Y=""
QUIT
Begin DoDot:1
+2 ;refer for qi staff
IF $DATA(AQAOXYZ)#2
IF ((Y=2)!(Y=3))
DO QIDSPLY
QUIT
+3 ;display action plan numbers
IF Y=5
DO ACTDSPLY
QUIT
+4 WRITE !,AQAOXYZ(3,Y),$PIECE($TEXT(MSG+Y),";;",2)
End DoDot:1
+5 ;
ASK ; >>> ask user if a printed report is requested?
+1 WRITE !!
KILL DIR
SET DIR(0)="YO"
SET DIR("B")="NO"
+2 SET DIR("A")="Do you wish to PRINT A LISTING of these Occurrences"
+3 DO ^DIR
IF $DATA(DIRUT)
GOTO END
IF Y=1
GOTO ^AQAOCHK2
+4 ;
END ; >>> end of check & display
+1 WRITE !,"You can print the report at any time by selecting the menu"
+2 WRITE " option titled"
+3 WRITE !,"'PRINT OCCURRENCE TICKLER REPORT' on the Occurrence EVALUATION"
+4 WRITE " Reports Menu."
+5 GOTO END^AQAOCHK2
+6 ;
+7 ;
QIDSPLY ; >> SUBRTN to display referrals if user is qi staff
+1 WRITE !,AQAOXYZ(3,Y,1),$PIECE($TEXT(MSG+Y),";;",2)
+2 WRITE " (",+$GET(AQAOXYZ(3,Y))," for you)"
+3 QUIT
+4 ;
+5 ;
ACTDSPLY ; >> SUBRTN to display action plan numbers
+1 SET (Z,AQAOCNT)=0
FOR
SET Z=$ORDER(AQAOXYZ(3,5,Z))
IF Z=""
QUIT
Begin DoDot:1
+2 SET AQAOCNT=AQAOCNT+AQAOXYZ(3,5,Z)
End DoDot:1
+3 WRITE !,AQAOCNT,$PIECE($TEXT(MSG+Y),";;",2)
+4 QUIT
+5 ;
+6 ;
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