AQAOPR8 ; IHS/ORDC/LJF - INDICATOR MATRIX ;
;;1.01;QAI MANAGEMENT;;OCT 05, 1995
;
;This routine contains the user interface for setting up the
;Performance Measurement Matrix report
;Added in Enhancement #1
;
D MATRIX^AQAOHPRT
;
CHOOSE ; -- ask user which grouping to include
W !! K DIR S DIR(0)="NO^1:3",DIR("B")=3
S DIR("A",1)=" REPORT CHOICES:"
S DIR("A",2)=" "
S DIR("A",3)=" 1. KEY FUNCTIONS ONLY"
S DIR("A",4)=" 2. DIMENSIONS OF PERFORMANCE ONLY"
S DIR("A",5)=" 3. INCLUDE BOTH"
S DIR("A",6)=" "
S DIR("A")=" Select Which Groupings to include in the Matrix"
S DIR("?",1)="Choose #1 to print up to 22 Key Functions and their"
S DIR("?",2)="linked Indicators in a matrix. Select up to 11 Key"
S DIR("?",3)="Functions to stay within 80 columns."
S DIR("?",4)=" "
S DIR("?",5)="Choose #2 for a matrix with only Indicators and"
S DIR("?",6)="Dimensions of Performance. You can include Review"
S DIR("?",7)="Criteria with the dimension each one measures."
S DIR("?",8)=" "
S DIR("?",9)="Choose #3 to include up to 11 Key Functions plus the"
S DIR("?",10)="Dimensions of Performance in the matrix. You can also"
S DIR("?",11)="choose to see the Review Criteria. To stay within"
S DIR("?",12)="80 columns you can select only 3 Key Functions."
S DIR("?")=" " F I=1:1:12 S DIR("?",I)=" "_DIR("?",I)
D ^DIR I $D(DIRUT)!(Y=-1) D EXIT Q
S AQAOSEL=Y
;
; -- choose which functions to include
I AQAOSEL'=2 D FUNCTION I $D(DTOUT)!$D(DUOUT)!'$D(AQAOFNC) D CHOOSE Q
;
; -- choose whether to include review criteria
S AQAOCRT=0 I AQAOSEL'=1 D CRITERIA I $D(DIRUT) D CHOOSE Q
;
; -- calculate right margin for report
S AQAOIOMX=$S($D(AQAOFNC($$MARGIN80+1)):132,1:80)
I AQAOIOMX=132 D MSG("Use wide paper or condensed print!")
;
DEV ; -- SUBRTN to get print device and call print rtn
W !! S %ZIS="QP" D ^%ZIS
I POP D EXIT Q
I '$D(IO("Q")) D ^AQAOPR81 Q
K IO("Q") S ZTRTN="^AQAOPR81",ZTDESC="INDICATOR MATRIX"
F I="AQAOSEL","AQAOFNC(","AQAOCRT","AQAOIOMX" S ZTSAVE(I)=""
D ^%ZTLOAD K ZTSK D ^%ZISC
D PRTOPT^AQAOVAR D EXIT Q
;
;
EXIT ; -- SUBRTN for eoj
I '$D(ZTQUEUED),(IOST["C-") D PRTOPT^AQAOVAR ;ask to hit return
D ^%ZISC D KILL^AQAOUTIL Q
;
;
FUNCTION ; -- SUBRTN to ask user for functions to include
NEW AQAOCNT,DIC,X,Y K AQAOFNC S (X,AQAOCNT)=1
F2 S DIC="^AQAO(1,",DIC(0)="AEMQZ"
F Q:AQAOCNT>$$MOST Q:$D(DTOUT) Q:$D(DUOUT) Q:X="" D
. W ! D ^DIC Q:$D(DTOUT) Q:$D(DUOUT) Q:Y=-1
. S AQAOFNC(AQAOCNT)=+Y_U_Y(0,0)
. I AQAOCNT=$$MARGIN80 D MSG("Selecting more Functions requires wide paper or condensed print")
. S AQAOCNT=AQAOCNT+1
;
I AQAOCNT=$$MOST D MSG("You have reached the maximum # of functions that can fit on this report")
I '$D(AQAOFNC) D MSG("You have NOT selected any Key Functions")
I $D(AQAOFNC) W !!?3,"You have selected:" D
. S X=0 F S X=$O(AQAOFNC(X)) Q:X="" D
.. W !?3,$P(AQAOFNC(X),U,2)
;
I AQAOCNT'=$$MOST D I Y=1 D F2 Q
. W !! K DIR S DIR(0)="Y",DIR("B")="NO"
. S DIR("A")="Do you wish to select more Key Functions"
. D ^DIR
Q
;
;
CRITERIA ; -- SUBRTN to ask is criteria should be included in report
NEW DIR,X,Y S AQAOCRT=0
S DIR(0)="YO",DIR("B")="NO"
S DIR("A")="List Review Criteria with each Indicator"
S DIR("?",1)="Do you wish to list all Review Criteria for each"
S DIR("?",2)="Clinical Indicator? This shows which review criteria"
S DIR("?",3)="measure which dimensions of performance."
S DIR("?")="Answer YES to include review criteria in the matrix."
W ! D ^DIR I Y=1 S AQAOCRT=1
Q
;
;
MOST() ; -- SUBRTN to return # of functions that can fit on this report
Q $S(AQAOSEL=1:22,1:13)
;
MARGIN80() ; -- SUBRTN to return # of functions to fit in 80 columns
Q $S(AQAOSEL=1:11,1:3)
;
MSG(X) ; -- SUBRTN to print warning messages
W !!?5,*7,X Q
AQAOPR8 ; IHS/ORDC/LJF - INDICATOR MATRIX ;
+1 ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
+2 ;
+3 ;This routine contains the user interface for setting up the
+4 ;Performance Measurement Matrix report
+5 ;Added in Enhancement #1
+6 ;
+7 DO MATRIX^AQAOHPRT
+8 ;
CHOOSE ; -- ask user which grouping to include
+1 WRITE !!
KILL DIR
SET DIR(0)="NO^1:3"
SET DIR("B")=3
+2 SET DIR("A",1)=" REPORT CHOICES:"
+3 SET DIR("A",2)=" "
+4 SET DIR("A",3)=" 1. KEY FUNCTIONS ONLY"
+5 SET DIR("A",4)=" 2. DIMENSIONS OF PERFORMANCE ONLY"
+6 SET DIR("A",5)=" 3. INCLUDE BOTH"
+7 SET DIR("A",6)=" "
+8 SET DIR("A")=" Select Which Groupings to include in the Matrix"
+9 SET DIR("?",1)="Choose #1 to print up to 22 Key Functions and their"
+10 SET DIR("?",2)="linked Indicators in a matrix. Select up to 11 Key"
+11 SET DIR("?",3)="Functions to stay within 80 columns."
+12 SET DIR("?",4)=" "
+13 SET DIR("?",5)="Choose #2 for a matrix with only Indicators and"
+14 SET DIR("?",6)="Dimensions of Performance. You can include Review"
+15 SET DIR("?",7)="Criteria with the dimension each one measures."
+16 SET DIR("?",8)=" "
+17 SET DIR("?",9)="Choose #3 to include up to 11 Key Functions plus the"
+18 SET DIR("?",10)="Dimensions of Performance in the matrix. You can also"
+19 SET DIR("?",11)="choose to see the Review Criteria. To stay within"
+20 SET DIR("?",12)="80 columns you can select only 3 Key Functions."
+21 SET DIR("?")=" "
FOR I=1:1:12
SET DIR("?",I)=" "_DIR("?",I)
+22 DO ^DIR
IF $DATA(DIRUT)!(Y=-1)
DO EXIT
QUIT
+23 SET AQAOSEL=Y
+24 ;
+25 ; -- choose which functions to include
+26 IF AQAOSEL'=2
DO FUNCTION
IF $DATA(DTOUT)!$DATA(DUOUT)!'$DATA(AQAOFNC)
DO CHOOSE
QUIT
+27 ;
+28 ; -- choose whether to include review criteria
+29 SET AQAOCRT=0
IF AQAOSEL'=1
DO CRITERIA
IF $DATA(DIRUT)
DO CHOOSE
QUIT
+30 ;
+31 ; -- calculate right margin for report
+32 SET AQAOIOMX=$SELECT($DATA(AQAOFNC($$MARGIN80+1)):132,1:80)
+33 IF AQAOIOMX=132
DO MSG("Use wide paper or condensed print!")
+34 ;
DEV ; -- SUBRTN to get print device and call print rtn
+1 WRITE !!
SET %ZIS="QP"
DO ^%ZIS
+2 IF POP
DO EXIT
QUIT
+3 IF '$DATA(IO("Q"))
DO ^AQAOPR81
QUIT
+4 KILL IO("Q")
SET ZTRTN="^AQAOPR81"
SET ZTDESC="INDICATOR MATRIX"
+5 FOR I="AQAOSEL","AQAOFNC(","AQAOCRT","AQAOIOMX"
SET ZTSAVE(I)=""
+6 DO ^%ZTLOAD
KILL ZTSK
DO ^%ZISC
+7 DO PRTOPT^AQAOVAR
DO EXIT
QUIT
+8 ;
+9 ;
EXIT ; -- SUBRTN for eoj
+1 ;ask to hit return
IF '$DATA(ZTQUEUED)
IF (IOST["C-")
DO PRTOPT^AQAOVAR
+2 DO ^%ZISC
DO KILL^AQAOUTIL
QUIT
+3 ;
+4 ;
FUNCTION ; -- SUBRTN to ask user for functions to include
+1 NEW AQAOCNT,DIC,X,Y
KILL AQAOFNC
SET (X,AQAOCNT)=1
F2 SET DIC="^AQAO(1,"
SET DIC(0)="AEMQZ"
+1 FOR
IF AQAOCNT>$$MOST
QUIT
IF $DATA(DTOUT)
QUIT
IF $DATA(DUOUT)
QUIT
IF X=""
QUIT
Begin DoDot:1
+2 WRITE !
DO ^DIC
IF $DATA(DTOUT)
QUIT
IF $DATA(DUOUT)
QUIT
IF Y=-1
QUIT
+3 SET AQAOFNC(AQAOCNT)=+Y_U_Y(0,0)
+4 IF AQAOCNT=$$MARGIN80
DO MSG("Selecting more Functions requires wide paper or condensed print")
+5 SET AQAOCNT=AQAOCNT+1
End DoDot:1
+6 ;
+7 IF AQAOCNT=$$MOST
DO MSG("You have reached the maximum # of functions that can fit on this report")
+8 IF '$DATA(AQAOFNC)
DO MSG("You have NOT selected any Key Functions")
+9 IF $DATA(AQAOFNC)
WRITE !!?3,"You have selected:"
Begin DoDot:1
+10 SET X=0
FOR
SET X=$ORDER(AQAOFNC(X))
IF X=""
QUIT
Begin DoDot:2
+11 WRITE !?3,$PIECE(AQAOFNC(X),U,2)
End DoDot:2
End DoDot:1
+12 ;
+13 IF AQAOCNT'=$$MOST
Begin DoDot:1
+14 WRITE !!
KILL DIR
SET DIR(0)="Y"
SET DIR("B")="NO"
+15 SET DIR("A")="Do you wish to select more Key Functions"
+16 DO ^DIR
End DoDot:1
IF Y=1
DO F2
QUIT
+17 QUIT
+18 ;
+19 ;
CRITERIA ; -- SUBRTN to ask is criteria should be included in report
+1 NEW DIR,X,Y
SET AQAOCRT=0
+2 SET DIR(0)="YO"
SET DIR("B")="NO"
+3 SET DIR("A")="List Review Criteria with each Indicator"
+4 SET DIR("?",1)="Do you wish to list all Review Criteria for each"
+5 SET DIR("?",2)="Clinical Indicator? This shows which review criteria"
+6 SET DIR("?",3)="measure which dimensions of performance."
+7 SET DIR("?")="Answer YES to include review criteria in the matrix."
+8 WRITE !
DO ^DIR
IF Y=1
SET AQAOCRT=1
+9 QUIT
+10 ;
+11 ;
MOST() ; -- SUBRTN to return # of functions that can fit on this report
+1 QUIT $SELECT(AQAOSEL=1:22,1:13)
+2 ;
MARGIN80() ; -- SUBRTN to return # of functions to fit in 80 columns
+1 QUIT $SELECT(AQAOSEL=1:11,1:3)
+2 ;
MSG(X) ; -- SUBRTN to print warning messages
+1 WRITE !!?5,*7,X
QUIT