Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: AQAOPU

AQAOPU.m

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