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

AQAOPC2.m

Go to the documentation of this file.
  1. AQAOPC2 ; IHS/ORDC/LJF - OCC BY INDICATOR & ICD CODES ;
  1. ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
  1. ;
  1. ;this rtn contains the user interface for the trending report for
  1. ;occurrences by diagnosis and procedure codes.
  1. ;
  1. D ICD^AQAOHOP2 ;intro text
  1. TYPE ; >>> ask user what type of report to print
  1. K DIR S DIR(0)="SO^L:LISTING PLUS STATISTICS;S:STATISTICS ONLY"
  1. S DIR("A")="Choose TYPE of report to print"
  1. S DIR("?",1)="Which report style do you want?"
  1. S DIR("?",2)=" Enter L to list occurrences PLUS subtotals"
  1. S DIR("?",3)=" Enter S to print the subtotals ONLY"
  1. S DIR("?")="For more information on these styles, see the User Manual."
  1. D ^DIR G END:$D(DIRUT) S AQAOTYPE=Y
  1. ;
  1. IND ; >>> occurrences for which indicator?
  1. S AQAOIND=$$IND^AQAOLKP G END:AQAOIND=U,TYPE:AQAOIND=-1
  1. S AQAOIND=+AQAOIND
  1. ;
  1. ;
  1. DATES ; >> ask user to choose date range
  1. S AQAOBD=$$BDATE^AQAOLKP G END:AQAOBD=U,IND:AQAOBD=""
  1. S AQAOED=$$EDATE^AQAOLKP G END:AQAOED=U,DATES:AQAOED=""
  1. ;
  1. ;
  1. W !!?5,"You can now LIMIT the report to occurrences with certain ICD"
  1. W !,"codes. You will be asked to select one or more DIAGNOSIS code"
  1. W !,"ranges and one or more PROCEDURE code ranges. To include all"
  1. W !,"diagnoses, enter ""ALL"" at the ENTER DIAGNOSES prompt. To"
  1. W !,"include all procedures, enter ""ALL"" at the ENTER PROCEDURES"
  1. W !,"prompt."
  1. CLDX ; >>> choose clinical dx codes for report
  1. W !! K AQAOTBL,AQAOARR
  1. S AQAOICD=9,AQAOTL="DIAGNOSES" D ^AQAOCOD ;get dx range
  1. S X=0 F S X=$O(AQAOTBL(X)) Q:X="" S AQAOARR(X)=AQAOTBL(X)
  1. G END:$D(DUOUT)
  1. I '$D(AQAOARR) W *7," ??" G CLDX
  1. ;
  1. PROC ; >>> choose procedure codes for report
  1. W !!?5,"Now you can choose select PROCEDURES:",!!
  1. K AQAOTBL,AQAOARR1 S AQAOICD=0,AQAOTL="PROCEDURES" D ^AQAOCOD
  1. S X=0 F S X=$O(AQAOTBL(X)) Q:X="" S AQAOARR1(X)=AQAOTBL(X)
  1. K AQAOTBL,AQAOICD,AQAOTL
  1. G END:$D(DUOUT)
  1. I '$D(AQAOARR1) W *7," ??" G PROC
  1. ;
  1. DESCRIPT ; >>> ask user for report description
  1. W !! K DIR S DIR(0)="F0^0:60",DIR("A")="Enter REPORT DESCRIPTION"
  1. S DIR("?",1)="This REPORT DESCRIPTION will print on the Summary page"
  1. S DIR("?",2)="to help explain what you are looking for. You can enter"
  1. S DIR("?",3)="up to 60 characters. Some examples:"
  1. S DIR("?",4)=" ""WOUND INFECTIONS SEARCH"" or"
  1. S DIR("?",5)=" ""GYN PROCEDURES with COMPLICATIONS"" "
  1. S DIR("?")="The Report Description is optional."
  1. D ^DIR G END:X=U,END:$D(DTOUT) S AQAODESC=Y
  1. ;
  1. DEV ; >>> get print device
  1. I $P(AQAOUA("USER"),U,7)=1 D EXPORT^AQAOUTIL G DESCRIPT:Y=U
  1. I AQAOTYPE="L" W !!,"REMINDER: Use wide paper or condensed print!"
  1. W !! S %ZIS="QP" D ^%ZIS G END:POP
  1. I '$D(IO("Q")) U IO G ^AQAOPC21
  1. K IO("Q") S ZTRTN="^AQAOPC21",ZTDESC="OCC BY ICD CODES"
  1. F I="AQAOTYPE","AQAOIND","AQAOARR(","AQAOARR1(","AQAOBD","AQAOED","AQAODESC" S ZTSAVE(I)=""
  1. S:$D(AQAODLM) ZTSAVE("AQAODLM")=""
  1. S:$D(AQAOXSN) ZTSAVE("AQAOXSN")="",ZTSAVE("AQAOXSM")=""
  1. S:$D(AQAOXS) ZTSAVE("AQAOXS(")=""
  1. D ^%ZTLOAD K ZTSK D ^%ZISC
  1. ;
  1. END ; >>> eoj
  1. D HOME^%ZIS D KILL^AQAOUTIL Q