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

AQAOPC9.m

Go to the documentation of this file.
  1. AQAOPC9 ; IHS/ORDC/LJF - OCC REPORTS WITH XTRA SORT ;
  1. ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
  1. ;
  1. ;This rtn is the driver for the trending report by special review
  1. ;type. This report adds an additional sort onto the 3 main trending
  1. ;reports available. ONce the extra sort is selected, the user is
  1. ;dropped into one of those report rtns.
  1. ;
  1. D REVT^AQAOHOP3 ;intro text
  1. SORT ; >>> ask user to choose which sort category to use
  1. W !! K DIC S DIC(0)="AEMZQ",DIC("A")="Choose a SORT CATEGORY: "
  1. S DIC=9002169.9,DIC("S")="X ^AQAO1(9,Y,""DSPLY"")"
  1. D ^DIC G EXIT:$D(DUOUT),EXIT:X="",SORT:Y=-1
  1. S AQAOXSN=+Y,AQAOXSM=$P(Y,U,2)
  1. ;
  1. ALL ; >>> ask if all sort values should be included in report
  1. W !! K DIR S DIR(0)="YO",DIR("B")="NO"
  1. S DIR("A")="Print Occurrences for ALL "_AQAOXSM D ^DIR
  1. Q:$D(DIRUT) G ALL:Y=-1 I Y=1 S AQAOXS(0)="" G REPORT
  1. ;
  1. SELECT ; >> ask user to choose which values to include
  1. ; code used determined by sort type
  1. S AQAOTYP=$P(^AQAO1(9,AQAOXSN,0),U,2)
  1. S X=$S(AQAOTYP="N":"NUMBER",AQAOTYP="S":"CODES",1:"POINTER") D @X
  1. I '$D(AQAOXS) G SORT
  1. I $G(^AQAO1(9,AQAOXSN,"DIRO"))]"" D XTRASCRN G SORT:'$D(AQAOXS(2))
  1. ;
  1. REPORT ; >>> ask user to select report to run
  1. W !! K DIR S DIR(0)="NO^1:4"
  1. S DIR("A")="Select REPORT to print"
  1. F I=1:1:4 S DIR("A",I)=I_". "_$P($T(RTN+I),";;",2)
  1. S DIR("A",5)=" " D ^DIR G EXIT:$D(DTOUT),SORT:$D(DIRUT),REPORT:Y=-1
  1. S AQAORTN=$P($T(RTN+Y),";;",3) D @AQAORTN
  1. ;
  1. EXIT ; >>> eoj
  1. D KILL^AQAOUTIL Q
  1. ;
  1. ;
  1. POINTER ; >> SUBRTN to ask pointer values to include
  1. S AQAOI=0,AQAOSTOP="" K AQAOXS(1)
  1. F S AQAOI=$O(^AQAO1(9,AQAOXSN,"PTR",AQAOI)) Q:AQAOI'=+AQAOI D
  1. .S AQAOJ=$P(^AQAO1(9,AQAOXSN,"PTR",AQAOI,0),U) ;ptr file number
  1. .K DIC S DIC=AQAOJ,DIC(0)="AEMQZ"
  1. .S Y=0 F D Q:Y=-1 ;continue until all user wants are selected
  1. ..W ! D ^DIC Q:$D(DTOUT) Q:$D(DUOUT) Q:X="" Q:Y=-1
  1. ..S:AQAOTYP="V" AQAOXS(1,+Y_";"_$P(^DIC(AQAOJ,0,"GL"),U,2))=$P(Y,U,2)
  1. ..S:AQAOTYP="P" AQAOXS(1,+Y)=$P(Y,U,2)
  1. Q
  1. ;
  1. NUMBER ; >> SUBRTN to ask for number ranges to include
  1. Q
  1. ;
  1. CODES ; >> SUBRTN to ask for code values to include
  1. Q
  1. ;
  1. XTRASCRN ; >> SUBRTN to ask for xtra screen if one defined for sort
  1. K AQAOXS(2) W !!,"For the ",AQAOXSM," selected,",!
  1. K DIR S DIR("A")="Choose ONE"
  1. S X=^AQAO1(9,AQAOXSN,"DIR0") X X ;sets DIR(0)
  1. S X=0 F S X=$O(^AQAO1(9,AQAOXSN,"DIRA",X)) Q:X'=+X D
  1. .S DIR("A",X)=^AQAO1(9,AQAOXSN,"DIRA",X,0) ;set DIR(A,#)
  1. D ^DIR Q:$D(DIRUT) G XTRASCRN:Y=-1
  1. S AQAOXS(2)=Y
  1. Q
  1. ;
  1. RTN ;;
  1. ;;Occurrences By REVIEW CRITERIA;;^AQAOPC1
  1. ;;Occurrences By DIAGNOSIS/PROCEDURE;;^AQAOPC2
  1. ;;Occurrences By FINDINGS/ACTIONS;;^AQAOPC4
  1. ;;Occurrences for SINGLE CRITERION by MONTH;;^AQAOPC7