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

AQAOPR7.m

Go to the documentation of this file.
  1. AQAOPR7 ; IHS/ORDC/LJF - REVIEWED OCCURRENCES REPORT ;
  1. ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
  1. ;
  1. ;This report prints occurrences listing all reviews and referrals.
  1. ;This rtn contains the user interface to select open and/or closed
  1. ;occ, type of report, users, teams, and date range. The type of
  1. ;report questions calls extrinsic functions in ^AQAOPU*.
  1. ;
  1. STATUS ; >>> ask if user wants to select closed or deleted occ
  1. W !!?2,"Which OCCURRENCES do you want to print?"
  1. K DIR S DIR(0)="LO^1:3^K:X#1 X",DIR("A",1)=" 1. OPEN"
  1. S DIR("A",2)=" 2. CLOSED",DIR("A",3)=" 3. DELETED",DIR("A",4)=" "
  1. S DIR("A")="Select ONE OR MORE, by number separated by commas"
  1. D ^DIR G END:$D(DIRUT) S AQAOSTAT=Y
  1. ;
  1. ;
  1. TYPE ; >> ask user what type of report to print
  1. K ^TMP("AQAOPR7",$J) W !! K DIR
  1. S DIR(0)="SO^1:ONE INDICATOR;2:BY KEY FUNCTION;3:FACILITY REPORT"
  1. S DIR("A")="Select TYPE OF REPORT to print"
  1. S DIR("?")="Choose ONE from the list by number"
  1. D ^DIR G END:$D(DIRUT),TYPE:Y=-1
  1. S X="AQAOPR7"
  1. S AQAOTP=$S(Y=1:$$IND^AQAOPU(X),Y=2:$$KF^AQAOPU(X),1:$$FACR^AQAOPU1(X))
  1. K ^TMP("AQAOPR7",$J,2) ;ind you don't have access to
  1. G TYPE:AQAOTP=U
  1. ;
  1. ;
  1. USERS ; >> ask user to screen by user
  1. W !! K DIR S DIR(0)="YO",DIR("B")="NO"
  1. S DIR("A")="Do you wish to limit the report by USER" D ^DIR
  1. G STATUS:$D(DIRUT) S AQAOO("USR",0)="" ;all users
  1. I Y=1 F Q:$D(DIRUT) D ;ask for users to include
  1. .W !! K DIR S DIR(0)="PO^200:EMQZ",DIR("A")="Select USER Name"
  1. .D ^DIR Q:$D(DIRUT)
  1. .I Y>0 D ;set up array for variable pointers to va200 or qi user file
  1. ..S AQAOO("USR",+Y_";VA(200,")=$P(Y,U,2)
  1. ..S AQAOO("USR",+Y_";AQAO(9,")=$P(Y,U,2)
  1. ;
  1. ;
  1. TEAMS ; >> ask user to screen by teams
  1. W !! K DIR S DIR(0)="YO",DIR("B")="NO"
  1. S DIR("A")="Do you wish to limit the report by QI TEAM" D ^DIR
  1. G USERS:$D(DIRUT) S AQAOO("TEAM",0)="" ;all qi teams
  1. I Y=1 F Q:$D(DIRUT) D ;ask for users to include
  1. .W !! K DIR S DIR(0)="PO^9002169.1:EMQZ" D ^DIR Q:$D(DIRUT)
  1. .I Y>0 S AQAOO("TEAM",+Y_";AQAO1(1,")=$P(Y,U,2)
  1. ;
  1. ;
  1. DATES ; >> ask user to choose date range
  1. S AQAOBD=$$BDATE^AQAOLKP G END:AQAOBD=U,TEAMS:AQAOBD=""
  1. S AQAOED=$$EDATE^AQAOLKP G END:AQAOED=U,DATES:AQAOED=""
  1. ;
  1. ;
  1. DEV ; >>> get print device
  1. I $P(AQAOUA("USER"),U,7)=1 D EXPORT^AQAOUTIL G DATES:Y=U
  1. W !! S %ZIS="QP" D ^%ZIS G END:POP
  1. I '$D(IO("Q")) U IO G ^AQAOPR71
  1. K IO("Q") S ZTRTN="^AQAOPR71",ZTDESC="REVIEWED OCC RPRT"
  1. F I="AQAOTP","AQAOBD","AQAOED","AQAOO(","AQAOSTAT" S ZTSAVE(I)=""
  1. S ZTSAVE("^TMP(""AQAOPR7"",$J,")=""
  1. S:$D(AQAODLM) ZTSAVE("AQAODLM")=""
  1. D ^%ZTLOAD K ZTSK D ^%ZISC D KILL^AQAOUTIL Q
  1. ;
  1. END ; >>> eoj
  1. D HOME^%ZIS D KILL^AQAOUTIL K ^TMP("AQAOPR7",$J) Q