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

AQAOPU1.m

Go to the documentation of this file.
  1. AQAOPU1 ; IHS/ORDC/LJF - INDICATOR SELECTION ;
  1. ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
  1. ;
  1. ;This rtn contains an extrinsic function called by various reports
  1. ;to select facility-defined report format. These formats contain a
  1. ;defined set of grouped indicators.
  1. ;
  1. FACR(AQAOSUB) ;ENTRY POINT EXTR FUNC - select facility specific report to run
  1. K ^TMP(AQAOSUB,$J) ;PATCH 1
  1. S AQAOTYP=Y ;set report type
  1. ;
  1. ; >> user gets choice of facilities if user has access >1 site
  1. S AQAOFAC=DUZ(2),X=$O(^VA(200,DUZ,2,0)) I X]"" D
  1. .S X=$O(^VA(200,DUZ,2,X)) I X]"" D
  1. ..W !! K DIC S DIC="^AQAGP(",DIC(0)="AEMZQ"
  1. ..S DIC("A")="Select FACILITY first: " D ^DIC
  1. ..I Y<1 S AQAOTYP=U
  1. ..E S AQAOFAC=+Y
  1. I AQAOTYP=U Q AQAOTYP
  1. ;
  1. ; >> user selects report format
  1. I '$D(^AQAGP(AQAOFAC,"FACRPT",0)) S ^(0)="^9002166.41"
  1. W !! K DIC,DA S DIC="^AQAGP("_AQAOFAC_",""FACRPT"",",DIC(0)="AEMZQ"
  1. S DIC("S")="I '$O(^AQAGP(AQAOFAC,""FACRPT"",Y,""RES"",0))!$D(^AQAGP(AQAOFAC,""FACRPT"",Y,""RES"",""B"",DUZ))" ;PATCH 1
  1. S DA(1)=AQAOFAC D ^DIC I Y<1 S AQAOTYP=U Q AQAOTYP
  1. S AQAORPT=Y ;report name & number
  1. S AQAORPTT=$P(^AQAGP(AQAOFAC,"FACRPT",+AQAORPT,0),U,2) ;report title
  1. ;
  1. ; >> find contents of report selected
  1. F AQAOI="MSF","HW","KF","IND","DIM" D
  1. .S AQAOX=0 ;for each heading, find indicators
  1. .F S AQAOX=$O(^AQAGP(AQAOFAC,"FACRPT",+AQAORPT,AQAOI,AQAOX)) Q:AQAOX'=+AQAOX D
  1. ..Q:'$D(^AQAGP(AQAOFAC,"FACRPT",+AQAORPT,AQAOI,AQAOX,0)) S AQAOS=+^(0)
  1. ..I (AQAOI="HW")!(AQAOI="IND") S Y=AQAOS D INDCHK^AQAOPU,SET Q
  1. ..;
  1. ..I AQAOI="DIM" D DIMCHK Q
  1. ..S AQAOC=$S(AQAOI="MSF":"AD",1:"AB") ;xref in qi ind file
  1. ..S Y=0 F S Y=$O(^AQAO(2,AQAOC,AQAOS,Y)) Q:Y="" D INDCHK^AQAOPU,SET
  1. ;
  1. ; >> display indicators included in report
  1. D DISPLAY
  1. ;
  1. Q AQAOTYP
  1. ;
  1. ;
  1. SET ; >> SUBRTN to set indicator array
  1. I (AQAOI="MSF")!(AQAOI="KF") Q:$G(AQAOCHK("OK"))="I" ;inactive ind
  1. I AQAOI="HW" S AQAOF="FACILITY WIDE INDICATORS" ;PATCH 2
  1. I AQAOI="IND" S AQAOF="OTHER INDICATORS"
  1. I AQAOI="KF" S AQAOF="KEY FUNCTION - "_$P(^AQAO(1,AQAOS,0),U)
  1. I AQAOI="MSF" D
  1. .S AQAOZ=Y,Y=AQAOS,C=$P(^DD(9002168.2,.13,0),U,2) D Y^DIQ
  1. .S AQAOF="MED STAFF FUNCTION - "_Y,Y=AQAOZ
  1. I AQAOI="DIM" S AQAOF="DIMENSION - "_$P($T(DIM+AQAOS),";;",2) ;ENH1
  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. Q
  1. ;
  1. ;
  1. DISPLAY ; >> SUBRTN to display indicators found for report
  1. S X="Facility Specific Report: "_$P(AQAORPT,U,2) W @IOF,!!,X
  1. W !!,"Indicators To Be Included In This Report:"
  1. I '$D(^TMP(AQAOSUB,$J,1)) W !!,"NONE FOUND" S AQAOTYP=U G DSPLY9
  1. S X=0 F S X=$O(^TMP(AQAOSUB,$J,1,X)) Q:X="" Q:$G(AQAOSTOP)=U D
  1. .W !!,"HEADING: ",X
  1. .S Y=0 F S Y=$O(^TMP(AQAOSUB,$J,1,X,Y)) Q:Y="" Q:$G(AQAOSTOP)=U D
  1. ..W !?9,$P(^AQAO(2,Y,0),U),?20,$P(^(0),U,2)
  1. ..I $Y>(IOSL-4) S AQAOSTOP=$$EOP^AQAOPU 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^AQAOPU Q:AQAOSTOP=U
  1. DSPLY9 W !! K DIR S DIR(0)="E",DIR("A")="Press RETURN to continue" D ^DIR
  1. Q
  1. ;
  1. ;
  1. DIMCHK ; -- SUBRTN to find indicators tied to dimension
  1. NEW Y,X S Y=0
  1. F S Y=$O(^AQAO(2,"ADIM",AQAOS,Y)) Q:Y="" D INDCHK^AQAOPU,SET
  1. S X=0
  1. F S X=$O(^AQAO1(6,"ADIM",AQAOS,X)) Q:X="" D
  1. . S Y=0
  1. . F S Y=$O(^AQAO1(6,X,"IND","B",Y)) Q:Y="" D INDCHK^AQAOPU,SET
  1. Q
  1. ;
  1. ;
  1. DIM ;;
  1. ;;EFFICACY
  1. ;;APPROPRIATENESS
  1. ;;AVAILABILITY
  1. ;;TIMELINESS
  1. ;;EFFECTIVENESS
  1. ;;CONTINUITY
  1. ;;SAFETY
  1. ;;EFFICIENCY
  1. ;;RESPECT & CARING