AQAOPA1 ; IHS/ORDC/LJF - ACT IMPLEMENTATION STATUS RPRT ;
;;1.01;QAI MANAGEMENT;;OCT 05, 1995
;
;This rtn includes the user interface and the call to DIP to print
;a report listing action plans sorted by implementation status.
;
SORT ; >>> choose type of report to print
K DIR S DIR(0)="SO^",DIR("A")="Choose SORT ORDER for Report"
F X=1:1:4 S DIR(0)=DIR(0)_X_":"_$P($T(RPT+X),";;",2)_";"
S DIR(0)=$E(DIR(0),1,$L(DIR(0))-1)
D ^DIR G END:$D(DIRUT),END:X="",END:Y=-1
S BY=$P($T(RPT+Y),";;",3) ;set sort order
;
;
SUMM ; >> does user want action summaries printed with listing
W !! K DIR S DIR(0)="Y",DIR("B")="NO"
S DIR("A")="Do you want to include the ACTION SUMMARY with the listing"
D ^DIR G SORT:$D(DIRUT),END:Y=-1
S FLDS=$S(Y=1:"[AQAO STATUS WITH SUM]",1:"[AQAO STATUS NO SUM]")
;
; >>> FIND DATA FOR SELECTED REPORT <<<
PRINT ; >>> set up variables for dip call
K DIC S DIC="^AQAO(5,",L=0,FR="@",TO=""
;screen-only awaiting implementation or implemented but not reviewed
S DIS(0)="I ($P(^AQAO(5,D0,0),U,5)=1)!($P(^(0),U,5)=2)"
S DIS(1)="S Y=D0 D ACTCHK^AQAOSEC I $D(AQAOCHK(""OK""))"
S:BY="IMPLEMENTATION DATE" DIS(0)="I $P(^AQAO(5,D0,0),U,5)=2"
D EN1^DIP K AQAOCHK("OK")
;
;
I IOST["C-" D PRTOPT^AQAOVAR
;
END D ^%ZISC,KILL^AQAOUTIL Q
;
;
RPT ;;
;;By ACTION PLAN #;;ACTION NUMBER;;
;;By ACTION TYPE;;@ACTION TYPE;;
;;By ACTION STATUS;;PLAN STATUS;;
;;By IMPLEMENTATION DATE;;IMPLEMENTATION DATE;;
AQAOPA1 ; IHS/ORDC/LJF - ACT IMPLEMENTATION STATUS RPRT ;
+1 ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
+2 ;
+3 ;This rtn includes the user interface and the call to DIP to print
+4 ;a report listing action plans sorted by implementation status.
+5 ;
SORT ; >>> choose type of report to print
+1 KILL DIR
SET DIR(0)="SO^"
SET DIR("A")="Choose SORT ORDER for Report"
+2 FOR X=1:1:4
SET DIR(0)=DIR(0)_X_":"_$PIECE($TEXT(RPT+X),";;",2)_";"
+3 SET DIR(0)=$EXTRACT(DIR(0),1,$LENGTH(DIR(0))-1)
+4 DO ^DIR
IF $DATA(DIRUT)
GOTO END
IF X=""
GOTO END
IF Y=-1
GOTO END
+5 ;set sort order
SET BY=$PIECE($TEXT(RPT+Y),";;",3)
+6 ;
+7 ;
SUMM ; >> does user want action summaries printed with listing
+1 WRITE !!
KILL DIR
SET DIR(0)="Y"
SET DIR("B")="NO"
+2 SET DIR("A")="Do you want to include the ACTION SUMMARY with the listing"
+3 DO ^DIR
IF $DATA(DIRUT)
GOTO SORT
IF Y=-1
GOTO END
+4 SET FLDS=$SELECT(Y=1:"[AQAO STATUS WITH SUM]",1:"[AQAO STATUS NO SUM]")
+5 ;
+6 ; >>> FIND DATA FOR SELECTED REPORT <<<
PRINT ; >>> set up variables for dip call
+1 KILL DIC
SET DIC="^AQAO(5,"
SET L=0
SET FR="@"
SET TO=""
+2 ;screen-only awaiting implementation or implemented but not reviewed
+3 SET DIS(0)="I ($P(^AQAO(5,D0,0),U,5)=1)!($P(^(0),U,5)=2)"
+4 SET DIS(1)="S Y=D0 D ACTCHK^AQAOSEC I $D(AQAOCHK(""OK""))"
+5 IF BY="IMPLEMENTATION DATE"
SET DIS(0)="I $P(^AQAO(5,D0,0),U,5)=2"
+6 DO EN1^DIP
KILL AQAOCHK("OK")
+7 ;
+8 ;
+9 IF IOST["C-"
DO PRTOPT^AQAOVAR
+10 ;
END DO ^%ZISC
DO KILL^AQAOUTIL
QUIT
+1 ;
+2 ;
RPT ;;
+1 ;;By ACTION PLAN #;;ACTION NUMBER;;
+2 ;;By ACTION TYPE;;@ACTION TYPE;;
+3 ;;By ACTION STATUS;;PLAN STATUS;;
+4 ;;By IMPLEMENTATION DATE;;IMPLEMENTATION DATE;;