- AQAOPU ; IHS/ORDC/LJF - INIDICATOR SELECTION ;
- ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
- ;
- ;This rtn contains 2 extrinsic functions called by various reports
- ;to select a single indicator or all indicators for a key function.
- ;
- IND(AQAOSUB) ;EP >> EXTR FUNC - select indicator and set array
- S AQAOTYP=Y
- W !! K DIC S DIC=9002168.2,DIC(0)="AEMZQ"
- S DIC("S")="D INDCHK^AQAOSEC I $D(AQAOCHK(""OK""))"
- D ^DIC K DIC I Y=-1 S AQAOTYP=U
- E S ^TMP(AQAOSUB,$J,1,"SINGLE INDICATOR",+Y)=""
- Q AQAOTYP
- ;
- ;
- KF(AQAOSUB) ;EP >> EXTR FUNC - select key func & all indicators under it
- S AQAOTYP=Y ;set type of report
- W !! K DIC S DIC=9002168.1,DIC(0)="AEMZQ" D ^DIC
- I Y>0 D
- .S AQAOF="KEY FUNCTION - "_$P(Y,U,2) ;if funct, find ind linked to it
- .S AQAOFN=+Y
- .S Y=0 F S Y=$O(^AQAO(2,"AB",AQAOFN,Y)) Q:Y="" D
- ..D INDCHK ;is indicator active and does user have access to it?
- ..I $G(AQAOCHK("OK"))="I" Q ;screen out inactives from display
- ..I $D(AQAOCHK("OK")) S ^TMP(AQAOSUB,$J,1,AQAOF,Y)=""
- ..E S ^TMP(AQAOSUB,$J,2,$P(^AQAO(2,Y,0),U))=""
- .;
- .D DISPLAY ;display indicators included in report
- E S AQAOTYP=U
- Q AQAOTYP
- ;
- ;
- EOP() ;ENTRY POINT - EXTR VAR to handle end of screen code
- N X,DIR,AQAOSTOP
- S DIR("A")="Press RETURN to continue OR ""^"" to quit display."
- S DIR(0)="E" D ^DIR S AQAOSTOP=$S(Y=1:"",1:U) I AQAOSTOP="" W @IOF,!
- Q AQAOSTOP
- ;
- ;
- INDCHK ;ENTRY POINT >> SUBRTN to check indicator screens
- K AQAOCHK("OK")
- Q:$G(Y)<1 ;Y must be set to indicator ifn
- X ^DD(9002168.2,0,"SCR") I '$T S AQAOCHK("OK")="I" Q
- D INDCHK^AQAOSEC
- Q
- ;
- ;
- DISPLAY ; >> SUBRTN to display indicators found for report
- D INIT^AQAOUTIL W @IOF,!!?AQAOIOMX-$L(AQAOF)/2,AQAOF
- W !!,"Indicators To Be Included In This Report:"
- I '$D(^TMP(AQAOSUB,$J,1)) W !!,"NONE FOUND" S AQAOTYP=U Q
- S X=0 F S X=$O(^TMP(AQAOSUB,$J,1,AQAOF,X)) Q:X="" Q:$G(AQAOSTOP)=U D
- .W !?5,$P(^AQAO(2,X,0),U),?20,$P(^(0),U,2)
- .I $Y>(IOSL-4) S AQAOSTOP=$$EOP Q:AQAOSTOP=U
- I $D(^TMP(AQAOSUB,$J,2)) D
- .W !!,"Indicators NOT To Be Included: (You do not have access to them)"
- .S X=0 F S X=$O(^TMP(AQAOSUB,$J,2,X)) Q:X="" D
- ..W !?5,X
- ..I $Y>(IOSL-4) S AQAOSTOP=$$EOP Q:AQAOSTOP=U
- Q
- ;
- ;
- AQAOPU ; IHS/ORDC/LJF - INIDICATOR SELECTION ;
- +1 ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
- +2 ;
- +3 ;This rtn contains 2 extrinsic functions called by various reports
- +4 ;to select a single indicator or all indicators for a key function.
- +5 ;
- IND(AQAOSUB) ;EP >> EXTR FUNC - select indicator and set array
- +1 SET AQAOTYP=Y
- +2 WRITE !!
- KILL DIC
- SET DIC=9002168.2
- SET DIC(0)="AEMZQ"
- +3 SET DIC("S")="D INDCHK^AQAOSEC I $D(AQAOCHK(""OK""))"
- +4 DO ^DIC
- KILL DIC
- IF Y=-1
- SET AQAOTYP=U
- +5 IF '$TEST
- SET ^TMP(AQAOSUB,$JOB,1,"SINGLE INDICATOR",+Y)=""
- +6 QUIT AQAOTYP
- +7 ;
- +8 ;
- KF(AQAOSUB) ;EP >> EXTR FUNC - select key func & all indicators under it
- +1 ;set type of report
- SET AQAOTYP=Y
- +2 WRITE !!
- KILL DIC
- SET DIC=9002168.1
- SET DIC(0)="AEMZQ"
- DO ^DIC
- +3 IF Y>0
- Begin DoDot:1
- +4 ;if funct, find ind linked to it
- SET AQAOF="KEY FUNCTION - "_$PIECE(Y,U,2)
- +5 SET AQAOFN=+Y
- +6 SET Y=0
- FOR
- SET Y=$ORDER(^AQAO(2,"AB",AQAOFN,Y))
- IF Y=""
- QUIT
- Begin DoDot:2
- +7 ;is indicator active and does user have access to it?
- DO INDCHK
- +8 ;screen out inactives from display
- IF $GET(AQAOCHK("OK"))="I"
- QUIT
- +9 IF $DATA(AQAOCHK("OK"))
- SET ^TMP(AQAOSUB,$JOB,1,AQAOF,Y)=""
- +10 IF '$TEST
- SET ^TMP(AQAOSUB,$JOB,2,$PIECE(^AQAO(2,Y,0),U))=""
- End DoDot:2
- +11 ;
- +12 ;display indicators included in report
- DO DISPLAY
- End DoDot:1
- +13 IF '$TEST
- SET AQAOTYP=U
- +14 QUIT AQAOTYP
- +15 ;
- +16 ;
- EOP() ;ENTRY POINT - EXTR VAR to handle end of screen code
- +1 NEW X,DIR,AQAOSTOP
- +2 SET DIR("A")="Press RETURN to continue OR ""^"" to quit display."
- +3 SET DIR(0)="E"
- DO ^DIR
- SET AQAOSTOP=$SELECT(Y=1:"",1:U)
- IF AQAOSTOP=""
- WRITE @IOF,!
- +4 QUIT AQAOSTOP
- +5 ;
- +6 ;
- INDCHK ;ENTRY POINT >> SUBRTN to check indicator screens
- +1 KILL AQAOCHK("OK")
- +2 ;Y must be set to indicator ifn
- IF $GET(Y)<1
- QUIT
- +3 XECUTE ^DD(9002168.2,0,"SCR")
- IF '$TEST
- SET AQAOCHK("OK")="I"
- QUIT
- +4 DO INDCHK^AQAOSEC
- +5 QUIT
- +6 ;
- +7 ;
- DISPLAY ; >> SUBRTN to display indicators found for report
- +1 DO INIT^AQAOUTIL
- WRITE @IOF,!!?AQAOIOMX-$LENGTH(AQAOF)/2,AQAOF
- +2 WRITE !!,"Indicators To Be Included In This Report:"
- +3 IF '$DATA(^TMP(AQAOSUB,$JOB,1))
- WRITE !!,"NONE FOUND"
- SET AQAOTYP=U
- QUIT
- +4 SET X=0
- FOR
- SET X=$ORDER(^TMP(AQAOSUB,$JOB,1,AQAOF,X))
- IF X=""
- QUIT
- IF $GET(AQAOSTOP)=U
- QUIT
- Begin DoDot:1
- +5 WRITE !?5,$PIECE(^AQAO(2,X,0),U),?20,$PIECE(^(0),U,2)
- +6 IF $Y>(IOSL-4)
- SET AQAOSTOP=$$EOP
- IF AQAOSTOP=U
- QUIT
- End DoDot:1
- +7 IF $DATA(^TMP(AQAOSUB,$JOB,2))
- Begin DoDot:1
- +8 WRITE !!,"Indicators NOT To Be Included: (You do not have access to them)"
- +9 SET X=0
- FOR
- SET X=$ORDER(^TMP(AQAOSUB,$JOB,2,X))
- IF X=""
- QUIT
- Begin DoDot:2
- +10 WRITE !?5,X
- +11 IF $Y>(IOSL-4)
- SET AQAOSTOP=$$EOP
- IF AQAOSTOP=U
- QUIT
- End DoDot:2
- End DoDot:1
- +12 QUIT
- +13 ;
- +14 ;