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