AQAOPR1 ; IHS/ORDC/LJF - INDICATOR LISTS & SUMMARIES ;
;;1.01;QAI MANAGEMENT;;OCT 05, 1995
;
;This rtn prints either listings or summaries for indicators sorted
;as the user selects. This rtn contains the user interface and the
;calls to DIP.
;
STYLE ; >>> print listing or summaries
K DIR S DIR(0)="SO^L:LISTINGS;M:MATRIX;S:SUMMARIES"
S DIR("?",1)="Which indicator report style do you want?"
S DIR("?",2)=" Enter L to print short listings;"
S DIR("?",3)=" Enter M to print an indicator matrix."
S DIR("?",4)=" Enter S to print detailed summaries."
S DIR("?")="For more information on these styles, see the User Manual."
S DIR("A")="Choose Report Style" D ^DIR G END:$D(DIRUT) S AQAOSTY=Y
I AQAOSTY="M" D ^AQAOPR8 Q
;
SORT ; >>> ask sort criteria
W !! K DIR S DIR(0)="NO^1:3",DIR("A")=" Choose One"
S DIR("A",1)="Select Sort Criteria for Report:"
S DIR("A",2)=" ",DIR("A",7)=" "
S DIR("A",3)=" 1. Sort by CODE # RANGE"
S DIR("A",4)=" 2. Sort by QI MONITORING TEAM"
S DIR("A",5)=" 3. Sort by KEY FUNCTION"
S DIR("?")="Choose how you want the report sorted. Select by number"
D ^DIR G END:$D(DIRUT) S AQAOSRT=+Y G INAC:AQAOSRT=1
;
ALL ; >>> choose one or all qi teams or function
K DIR S DIR(0)="Y"
S DIR("A")="Print for ALL "_$S(AQAOSRT=2:"QI TEAMS",1:"KEY FUNCTION")
S DIR("B")="NO" D ^DIR I Y=1 S AQAONUM="" G INAC
I $D(DIRUT) G END ;check for timeout,"^", or null
;
ONE ; >>> choose which qi team or function
K DIR,AQAONUM
S DIR(0)="PO^"_$S(AQAOSRT=2:9002169.1,1:9002168.1)_":EMQZ"
D ^DIR G ALL:X="",END:$D(DIRUT),ONE:Y=-1
S AQAONUM=$P(Y(0),U)
;
INAC ; >>> include inactive indicators?
K DIR S DIR(0)="Y",DIR("B")="NO"
S DIR("A")="Do you wish to print INACTIVE Indicators"
D ^DIR G END:$D(DIRUT) I Y=1 S AQAOINAC=""
;
PRINT ; >>> set up print variables and call fileman to print
I AQAOSTY="L" D ;set listing report variables
.S FLDS="[AQAO IND LISTING]"
.S BY=$S(AQAOSRT=1:"CODE #",AQAOSRT=2:"[AQAO QI TEAM]",1:"[AQAO FUNCTION]")
;
I AQAOSTY="S" D ;set summary report variables
.S FLDS="[AQAO IND DISPLAY]"
.S BY=$S(AQAOSRT=1:"#CODE #",AQAOSRT=2:"[AQAO QI TEAM2]",1:"[AQAO FUNCTION2]")
;
S L=0,DIC=9002168.2 I AQAOSRT>1 S (TO,FR)=AQAONUM
D EN1^DIP
;
D PRTOPT^AQAOVAR
END D KILL^AQAOUTIL K AQAOINAC Q
AQAOPR1 ; IHS/ORDC/LJF - INDICATOR LISTS & SUMMARIES ;
+1 ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
+2 ;
+3 ;This rtn prints either listings or summaries for indicators sorted
+4 ;as the user selects. This rtn contains the user interface and the
+5 ;calls to DIP.
+6 ;
STYLE ; >>> print listing or summaries
+1 KILL DIR
SET DIR(0)="SO^L:LISTINGS;M:MATRIX;S:SUMMARIES"
+2 SET DIR("?",1)="Which indicator report style do you want?"
+3 SET DIR("?",2)=" Enter L to print short listings;"
+4 SET DIR("?",3)=" Enter M to print an indicator matrix."
+5 SET DIR("?",4)=" Enter S to print detailed summaries."
+6 SET DIR("?")="For more information on these styles, see the User Manual."
+7 SET DIR("A")="Choose Report Style"
DO ^DIR
IF $DATA(DIRUT)
GOTO END
SET AQAOSTY=Y
+8 IF AQAOSTY="M"
DO ^AQAOPR8
QUIT
+9 ;
SORT ; >>> ask sort criteria
+1 WRITE !!
KILL DIR
SET DIR(0)="NO^1:3"
SET DIR("A")=" Choose One"
+2 SET DIR("A",1)="Select Sort Criteria for Report:"
+3 SET DIR("A",2)=" "
SET DIR("A",7)=" "
+4 SET DIR("A",3)=" 1. Sort by CODE # RANGE"
+5 SET DIR("A",4)=" 2. Sort by QI MONITORING TEAM"
+6 SET DIR("A",5)=" 3. Sort by KEY FUNCTION"
+7 SET DIR("?")="Choose how you want the report sorted. Select by number"
+8 DO ^DIR
IF $DATA(DIRUT)
GOTO END
SET AQAOSRT=+Y
IF AQAOSRT=1
GOTO INAC
+9 ;
ALL ; >>> choose one or all qi teams or function
+1 KILL DIR
SET DIR(0)="Y"
+2 SET DIR("A")="Print for ALL "_$SELECT(AQAOSRT=2:"QI TEAMS",1:"KEY FUNCTION")
+3 SET DIR("B")="NO"
DO ^DIR
IF Y=1
SET AQAONUM=""
GOTO INAC
+4 ;check for timeout,"^", or null
IF $DATA(DIRUT)
GOTO END
+5 ;
ONE ; >>> choose which qi team or function
+1 KILL DIR,AQAONUM
+2 SET DIR(0)="PO^"_$SELECT(AQAOSRT=2:9002169.1,1:9002168.1)_":EMQZ"
+3 DO ^DIR
IF X=""
GOTO ALL
IF $DATA(DIRUT)
GOTO END
IF Y=-1
GOTO ONE
+4 SET AQAONUM=$PIECE(Y(0),U)
+5 ;
INAC ; >>> include inactive indicators?
+1 KILL DIR
SET DIR(0)="Y"
SET DIR("B")="NO"
+2 SET DIR("A")="Do you wish to print INACTIVE Indicators"
+3 DO ^DIR
IF $DATA(DIRUT)
GOTO END
IF Y=1
SET AQAOINAC=""
+4 ;
PRINT ; >>> set up print variables and call fileman to print
+1 ;set listing report variables
IF AQAOSTY="L"
Begin DoDot:1
+2 SET FLDS="[AQAO IND LISTING]"
+3 SET BY=$SELECT(AQAOSRT=1:"CODE #",AQAOSRT=2:"[AQAO QI TEAM]",1:"[AQAO FUNCTION]")
End DoDot:1
+4 ;
+5 ;set summary report variables
IF AQAOSTY="S"
Begin DoDot:1
+6 SET FLDS="[AQAO IND DISPLAY]"
+7 SET BY=$SELECT(AQAOSRT=1:"#CODE #",AQAOSRT=2:"[AQAO QI TEAM2]",1:"[AQAO FUNCTION2]")
End DoDot:1
+8 ;
+9 SET L=0
SET DIC=9002168.2
IF AQAOSRT>1
SET (TO,FR)=AQAONUM
+10 DO EN1^DIP
+11 ;
+12 DO PRTOPT^AQAOVAR
END DO KILL^AQAOUTIL
KILL AQAOINAC
QUIT