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

AQAOPC8.m

Go to the documentation of this file.
  1. AQAOPC8 ; IHS/ORDC/LJF - OCC BY PROVIDER ;
  1. ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
  1. ;
  1. ;This rtn contains the user interface for the occurrence-based reports
  1. ;by provider. A user who is not a QI staff member cannot run the
  1. ;single provider profile and is dropped into^AQAOPC81. This rtn lets
  1. ;the QI staff member set up the provider profile. The calculate of
  1. ;the profile is rtn ^AQAOPC82.
  1. ;
  1. TYPE ; -- ask user which provider report to print
  1. D PROV^AQAOHOP3 ;print intro text
  1. I $P(AQAOUA("USER"),U,6)="" D ^AQAOPC81 G EXIT ;if not qi staff
  1. W !! K DIR S DIR(0)="NAO^1:2",DIR("A")=" Select 1 or 2: "
  1. S DIR("?")="^D PROVQ^AQAOHOP3"
  1. S DIR("A",1)=" TYPES OF PROVIDER REPORTS AVAILABLE:",DIR("A",2)=" "
  1. S DIR("A",3)=" 1. TRENDING reports sorted by provider"
  1. S DIR("A",4)=" 2. Single Provider PROFILE"
  1. S DIR("A",5)=" " D ^DIR G EXIT:$D(DIRUT),TYPE:Y<1
  1. S X=$S(Y=1:"^AQAOPC80",1:"PROFILE") D @X G TYPE
  1. ;
  1. ;
  1. EXIT ; -- eoj
  1. D KILL^AQAOUTIL Q
  1. ;
  1. ;
  1. ;
  1. PROFILE ; -- SUBRTN for starting point for single provider profile
  1. D PROFILE1^AQAOPC80,NAME Q
  1. ;
  1. ;
  1. NAME ; >> ask if user wants provider name to print on report
  1. W !! K DIR S DIR(0)="Y",DIR("B")="NO"
  1. S DIR("A")="Do you want the provider/person name printed on the report"
  1. S DIR("?",1)="Answer YES to have the NAME print on the heading."
  1. S DIR("?",2)="Answer NO to have only the QI Code print on the report."
  1. D ^DIR G EXIT:$D(DTOUT),PROFILE:$D(DIRUT)
  1. I Y=0 S AQAOPRVN="#"_$S(AQAOPROV["VA":"I",1:"C")_+AQAOPROV
  1. ;
  1. ;
  1. DATES ; >> ask for date range
  1. S AQAOBD=$$BDATE^AQAOLKP G NAME:AQAOBD=U,PROFILE:AQAOBD=""
  1. S AQAOED=$$EDATE^AQAOLKP G DATES:AQAOED=U,DATES:AQAOED=""
  1. ;
  1. FORMAT ; >> individual indicators or grouped by med staff function?
  1. W !! K DIR S DIR("A")="Select PROFILE FORMAT"
  1. S DIR(0)="SO^1:List occurrences for INDIVIDUAL INDICATORS;2:List occurrences by MEDICAL STAFF FUNCTION"
  1. S DIR("?",1)="The provider profile lists case review results sorted by"
  1. S DIR("?",2)="indicator. Choice #1 gives you the option to select"
  1. S DIR("?",3)="just those indicators you want.",DIR("?",4)=" "
  1. S DIR("?",5)="Choice #2 groups all indicators by selected medical"
  1. S DIR("?",6)="staff function. This gives you an easy way to see all"
  1. S DIR("?",7)="Drug Usage Review cases without having to choose each"
  1. S DIR("?",8)="indicator separately. Choice #2 includes the option"
  1. S DIR("?",9)="to list ALL occurrences for this provider."
  1. S DIR("?")=" "
  1. D ^DIR G DATES:$D(DIRUT),FORMAT:Y=-1
  1. I Y=1 D G DEV
  1. .S AQAOMSF=1,AQAOMP(10)="** SELECTED INDICATORS **"
  1. .F S Y=$$IND^AQAOLKP Q:Y=-1 Q:Y=U S AQAOMSF(+Y)=""
  1. ;
  1. MEDSTF ; >> ask user to select which med staff functions to print
  1. W !! K DIR S DIR(0)="LAO^0:10^K:X#1 X"
  1. S DIR("A")="Select One or More by Number (0-10): "
  1. S DIR("A",1)="MEDICAL STAFF FUNCTIONS -",DIR("A",2)=" "
  1. F I=1:1:9 S DIR("A",I+2)=" "_I_". "_$P($T(MSF+I),";;",2)
  1. S DIR("A",10)=" OR Enter 0 (zero) for ALL INDICATORS"
  1. S DIR("A",11)=" " D ^DIR
  1. G EXIT:$D(DTOUT),FORMAT:$D(DIRUT),MEDSTF:Y<0 S AQAOMSF=Y
  1. I AQAOMSF["0" S AQAOMSF(0)="",AQAOMSF="1,2,3,4,5,6,7,8,9,10"
  1. ;
  1. ; >> set MSF in printable format
  1. F I=1:1 S Y=$P(AQAOMSF,",",I) Q:Y="" D
  1. .S X=$P($T(MSF+Y),";;",2) Q:X=""
  1. .S AQAOMP(Y)="** "_X_" **"
  1. I $D(AQAOMSF(0)) S AQAOMP(10)="** OTHER INDICATORS **"
  1. ;
  1. IND ; >> for MSF chosen get indicators
  1. S AQAOX=0 F I=1:1 S AQAOX=$P(AQAOMSF,",",I) Q:AQAOX="" D G MEDSTF:Y=U
  1. .S AQAOY=0 F S AQAOY=$O(^AQAO(2,"AD",AQAOX,AQAOY)) Q:AQAOY="" D
  1. ..S AQAOMSF(AQAOY)="" ;array(ind ifn)
  1. I '$D(AQAOMSF(0)),'$O(AQAOMSF(0)) D G MEDSTF
  1. .K AQAOMSF,AQAOMP
  1. .W !,*7,"NO INDICATORS FOUND!"
  1. ;
  1. ;
  1. DEV ; >> get print device
  1. W !! S %ZIS="QP" D ^%ZIS I POP D EXIT Q
  1. I '$D(IO("Q")) U IO D ^AQAOPC82 Q
  1. K IO("Q") S ZTRTN="^AQAOPC82",ZTDESC="PROVIDER PROFILE"
  1. F I="AQAOMSF","AQAOMSF(","AQAOMP(","AQAOBD","AQAOED","AQAOPROV","AQAOPRVN" S ZTSAVE(I)=""
  1. D ^%ZTLOAD D HOME^%ZIS D EXIT Q
  1. ;
  1. ;
  1. MSF ;;
  1. ;;Review of SURGICAL Procedures
  1. ;;DRUG Usage Review
  1. ;;Medical RECORDS Review
  1. ;;BLOOD Usage Review
  1. ;;PHR & THERAPEUTICS Function
  1. ;;MORTALITY/MORBIDITY Review
  1. ;;INFECTION CONTROL
  1. ;;SAFETY Review
  1. ;;Ongoing MONITORING & EVALUATION