- AQAOPR9 ; IHS/ORDC/LJF - OCC AUDIT LISTINGS ;
- ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
- ;
- ;This rtn contains the user interface and the DIP call to print
- ;audit activity for one occurrence, for one user, or by a date
- ;range. Every data entry action on occurrences and action plans
- ;is tracked by the QI Audit file.
- ;
- REPORT ; >>> choose type of report to print
- S AQAOINAC="" ;bypass screen on occurrence file
- K AQAOBD,AQAOED S AQAOSRT=""
- K DIR S DIR(0)="SO^",DIR("A")="Choose ONE Report from List"
- F X=1:1:3 S DIR(0)=DIR(0)_X_":"_$P($T(RPT+X),";;",2)_";"
- S DIR(0)=$E(DIR(0),1,$L(DIR(0))-1)
- D ^DIR G END:$D(DIRUT),END:X="",END:Y=-1
- S AQAORPT=+Y G DATES:AQAORPT=1
- ;
- CHOOSE ; >>> choose which entry
- K DIC S DIC=$P($T(RPT+AQAORPT),";;",3),DIC(0)="AEQMZ" D ^DIC
- G REPORT:$D(DTOUT),REPORT:$D(DUOUT),CHOOSE:Y=-1
- S AQAOSRT=$S(AQAORPT=2:$P(Y,U,2),1:$P(^VA(200,+Y,0),U,2)) G PRINT
- ;
- DATES ; >> choose date ranges
- S AQAOBD=$$BDATE^AQAOLKP G REPORT:AQAOBD=""
- S AQAOED=$$EDATE^AQAOLKP G DATES:AQAOED=""
- ;
- ;
- ; >>> FIND DATA FOR SELECTED REPORT <<<
- PRINT ; >>> set up variables for dip call
- K DIC S DIC="^AQAGU(",L=0,FLDS="[AQAO AUDIT LIST]"
- S BY=$P($T(RPT+AQAORPT),";;",4),(FR,TO)=AQAOSRT_",?"
- I $D(AQAOBD) S FR=AQAOBD,TO=AQAOED
- D EN1^DIP
- ;
- D PRTOPT^AQAOVAR ;<cr> to continue code
- ;
- END D ^%ZISC,KILL^AQAOUTIL Q
- ;
- ;
- RPT ;;
- ;;For a DATE RANGE;;;;AUDIT DATE & TIME;;
- ;;For an OCCURRENCE;;^AQAOC(;;OCCURRENCE IFN,@AUDIT DATE & TIME;;
- ;;For a QI USER;;^AQAO(9,;;@USER INITIALS,@AUDIT DATE & TIME;;
- AQAOPR9 ; IHS/ORDC/LJF - OCC AUDIT LISTINGS ;
- +1 ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
- +2 ;
- +3 ;This rtn contains the user interface and the DIP call to print
- +4 ;audit activity for one occurrence, for one user, or by a date
- +5 ;range. Every data entry action on occurrences and action plans
- +6 ;is tracked by the QI Audit file.
- +7 ;
- REPORT ; >>> choose type of report to print
- +1 ;bypass screen on occurrence file
- SET AQAOINAC=""
- +2 KILL AQAOBD,AQAOED
- SET AQAOSRT=""
- +3 KILL DIR
- SET DIR(0)="SO^"
- SET DIR("A")="Choose ONE Report from List"
- +4 FOR X=1:1:3
- SET DIR(0)=DIR(0)_X_":"_$PIECE($TEXT(RPT+X),";;",2)_";"
- +5 SET DIR(0)=$EXTRACT(DIR(0),1,$LENGTH(DIR(0))-1)
- +6 DO ^DIR
- IF $DATA(DIRUT)
- GOTO END
- IF X=""
- GOTO END
- IF Y=-1
- GOTO END
- +7 SET AQAORPT=+Y
- IF AQAORPT=1
- GOTO DATES
- +8 ;
- CHOOSE ; >>> choose which entry
- +1 KILL DIC
- SET DIC=$PIECE($TEXT(RPT+AQAORPT),";;",3)
- SET DIC(0)="AEQMZ"
- DO ^DIC
- +2 IF $DATA(DTOUT)
- GOTO REPORT
- IF $DATA(DUOUT)
- GOTO REPORT
- IF Y=-1
- GOTO CHOOSE
- +3 SET AQAOSRT=$SELECT(AQAORPT=2:$PIECE(Y,U,2),1:$PIECE(^VA(200,+Y,0),U,2))
- GOTO PRINT
- +4 ;
- DATES ; >> choose date ranges
- +1 SET AQAOBD=$$BDATE^AQAOLKP
- IF AQAOBD=""
- GOTO REPORT
- +2 SET AQAOED=$$EDATE^AQAOLKP
- IF AQAOED=""
- GOTO DATES
- +3 ;
- +4 ;
- +5 ; >>> FIND DATA FOR SELECTED REPORT <<<
- PRINT ; >>> set up variables for dip call
- +1 KILL DIC
- SET DIC="^AQAGU("
- SET L=0
- SET FLDS="[AQAO AUDIT LIST]"
- +2 SET BY=$PIECE($TEXT(RPT+AQAORPT),";;",4)
- SET (FR,TO)=AQAOSRT_",?"
- +3 IF $DATA(AQAOBD)
- SET FR=AQAOBD
- SET TO=AQAOED
- +4 DO EN1^DIP
- +5 ;
- +6 ;<cr> to continue code
- DO PRTOPT^AQAOVAR
- +7 ;
- END DO ^%ZISC
- DO KILL^AQAOUTIL
- QUIT
- +1 ;
- +2 ;
- RPT ;;
- +1 ;;For a DATE RANGE;;;;AUDIT DATE & TIME;;
- +2 ;;For an OCCURRENCE;;^AQAOC(;;OCCURRENCE IFN,@AUDIT DATE & TIME;;
- +3 ;;For a QI USER;;^AQAO(9,;;@USER INITIALS,@AUDIT DATE & TIME;;