AMERREP3 ;IHS/OIT/SCR - CANNED REPORT SUB-ROUTINE FOR ER AUDIT REPORTS
;;3.0;ER VISIT SYSTEM;**5**;MAR 03, 2009;Build 14
;
ERVSTLOG ; EP AMER REPORT MENU
N AMERQUIT,AMERSEL,DIR,Y
S AMERQUIT=0
F D Q:AMERQUIT
.S DIR(0)="SO^1:DAILY ER AUDIT LOG;"
.S DIR(0)=DIR(0)_"2:SINGLE ER VISIT ER AUDIT LOG;"
.S DIR(0)=DIR(0)_"3:DATA ENTERER ER AUDIT LOG;"
.S DIR(0)=DIR(0)_"4:VISIT FIELD ER AUDIT LOG;"
.S DIR(0)=DIR(0)_"5:EDIT REASON ER AUDIT LOG;"
.S DIR(0)=DIR(0)_"6:ER AUDIT LOG BY VISIT DATE;"
.S DIR("A")="Select Report",DIR("?")="Select one choice or '^' to leave."
.D ^DIR
.I Y=""!(Y="^") S AMERQUIT=1 Q
.S AMERSEL=Y
.S AMERQUIT=$$REPORT(AMERSEL)
.Q
K AMERQUIT,AMERSEL,DIR,Y
Q
;
REPORT(AMERSEL) ;
N AMERLINE,AMERBANN,AMERQUIT
S AMERQUIT=0
S %="",$P(%,"~",80)="",AMERLINE=% K %
D EN^DDIOL(AMERLINE,"","!!")
I AMERSEL=1 D
.I '$$ERAUDDAY^AMERREP3() S AMERQUIT=1 Q ; ER AUDIT BY DAY
.D EN^DDIOL(AMERLINE,"","!!")
.D EN^DDIOL("","","!")
.Q
I AMERSEL=2 D
.I '$$ERAUDVST^AMERREP3() S AMERQUIT=1 Q ; ER AUDIT BY ER VISIT
.D EN^DDIOL(AMERLINE,"","!!")
.D EN^DDIOL("","","!")
.Q
I AMERSEL=3 D
.I '$$ERAUDUSR^AMERREP3() S AMERQUIT=1 Q ; ER AUDIT BY DATA ENTERER
.D EN^DDIOL(AMERLINE,"","!!")
.D EN^DDIOL("","","!")
.Q
I AMERSEL=4 D
.I '$$ERAUDFLD^AMERREP3() S AMERQUIT=1 Q ; ER AUDIT BY ER VISIT FIELD
.D EN^DDIOL(AMERLINE,"","!!")
.D EN^DDIOL("","","!")
.Q
I AMERSEL=5 D
.I '$$ERAUDRSN^AMERREP3() S AMERQUIT=1 Q ; EDIT REASON ER AUDIT LOG
.D EN^DDIOL(AMERLINE,"","!!")
.D EN^DDIOL("","","!")
.Q
I AMERSEL=6 D
.I '$$ERAUDLOG^AMERREP3() S AMERQUIT=1 Q ; ER AUDIT LOG
.D EN^DDIOL(AMERLINE,"","!!")
.D EN^DDIOL("","","!")
.Q
I AMERQUIT Q 1
I $D(DUOUT)!$D(DTOUT) K DUOUT,DTOUT Q 1
K AMERLINE,AMERBANN,AMERQUIT
Q 0
;
ERAUDDAY() ; EP FROM REPORT
; DAILY ER AUDIT LOG
N AMERD1,AMERHDR,FR,TO,BY,DIC,DIR,FLDS,DHS,%DT,X
S (AMERD1,AMERHDR)=""
I '$$TIME^AMERREPT(.AMERD1) D EN^DDIOL("Invalid Time","","!!,?20,!!") Q 0
D EN^DDIOL("Log Date: "_AMERD1,"","?10,!!")
S AMERHDR="ER VISIT DAILY EDIT LOG REPORT"
S BY=".01"
; First change the nice looking date to a file man date for addition
S X=AMERD1,%DT=""
D ^%DT
S FR=Y+.0001,TO=Y+.2359
S DHD=$$AMERDHD^AMERREPT(AMERHDR,AMERD1,"")
S FLDS="[AMER AUDIT DAILY PRINT]"
S L=0
S DIC="^AMERAUDT("
I '$D(POP) S POP=0
D EN1^DIP
;
;AMER*3.0*5
D LOG^AMERBUSA("P","P","AMERREP3","AMER: Printed ER Visit Daily Edit Log Report for "_AMERD1,"")
;
Q 1
;
ERAUDVST() ; EP FROM REPORT
; ER AUDIT LOG BY VISIT
N AMERHDR,FR,TO,BY,DIC,DIR,FLDS,DHS,%DT,X
S AMERHDR=""
S DIC="^AMERVSIT(",DIC(0)="AZEMQ",DIC("A")="Enter ER VISIT: "
D ^DIC
I Y<0 Q 1
;
;AMER*3.0*5
NEW VIEN
S VIEN=$$GET1^DIQ(9009080,+Y,.03,"I")
D LOG^AMERBUSA("P","P","AMERREP3","AMER: Printed ER Visit","^"_VIEN)
;
K DIC
D EN^DDIOL("ER EDIT LOG FOR VISIT: "_$P(Y,U,2),"","?10,!!")
S AMERHDR="ER VISIT LOG ENTRY"
; First change the nice looking date to a file man date for addition
S BY=".02"
S FR=$P(Y,U,2)
S TO=$P(Y,U,2)
S DHD=$$AMERDHD^AMERREPT(AMERHDR,"","")
S FLDS="[CAPTION]"
S L=0
S DIC="^AMERAUDT("
I '$D(POP) S POP=0
D EN1^DIP
I $G(IOST)["C-" S DIR(0)="E" D ^DIR
Q 1
;
ERAUDUSR() ; EP FROM REPORT
; ER AUDIT LOG BY USER
;IHS/OIT/SCR 10/01/08 - changed next line to remove unused variables
;N AMERD1,AMERD2,AMERD1X,AMERD2X,AMERHDR,FR,TO,BY,DIC,DIR
N AMERD1,AMERD2,AMERHDR,FR,TO,BY,DIC,DIR
S (AMERD1,AMERD2,AMERHDR)=""
I '$$TIME^AMERREPT(.AMERD1,.AMERD2) D EN^DDIOL("Invalid Time","","!!,?20,!!") Q 1
D EN^DDIOL("Start Date: "_AMERD1,"","?10,!!")
D EN^DDIOL("End Date: "_AMERD2,"","?40")
S AMERHDR="ER VISIT DATA ENTERER AUDIT LOG REPORT"
S FLDS=".03;C3;L34,.01;C38,.02;C62"
S BY=".03,.01"
;IHS/OIT/SCR 10/01/08 - changed next two lines to avoid error
;S FR="A,"_AMERD1X_""""
;S TO="Zz,"_AMERD2X_""""
S FR="A,"_AMERD1_""
S TO="Zz,"_AMERD2_""
S DHD=$$AMERDHD^AMERREPT(AMERHDR,AMERD1,AMERD2)
S L=0
S DIC="^AMERAUDT("
I '$D(POP) S POP=0
D EN1^DIP
I $G(IOST)["C-" S DIR(0)="E" D ^DIR
Q 1
;
ERAUDFLD() ; EP FROM REPORT
; ER AUDIT BY ER VISIT FIELD
;IHS/OIT/SCR 10/01/08 - changed next line to remove unused variables
; N AMERD1,AMERD2,AMERD1X,AMERD2X,AMERHDR,FR,TO,BY,DIC,DIR
N AMERD1,AMERD2,AMERHDR,FR,TO,BY,DIC,DIR
S (AMERD1,AMERD2,AMERHDR)=""
I '$$TIME^AMERREPT(.AMERD1,.AMERD2) D EN^DDIOL("Invalid Time","","!!,?20,!!") Q 1
D EN^DDIOL("Start Date: "_AMERD1,"","?10,!!")
D EN^DDIOL("End Date: "_AMERD2,"","?40")
S AMERHDR="ER VISIT FIELD AUDIT LOG REPORT"
S FLDS="[AMER AUDIT FIELD PRINT]"
S BY=".03,.01"
;IHS/OIT/SCR 10/01/08 - changed next two lines to avoid error
;S FR="A,"_AMERD1X_""""
;S TO="Zz,"_AMERD2X_""""
S FR="A,"_AMERD1_""
S TO="Zz,"_AMERD2_""
S DHD=$$AMERDHD^AMERREPT(AMERHDR,AMERD1,AMERD2)
S L=0
S DIC="^AMERAUDT("
I '$D(POP) S POP=0
D EN1^DIP
;
;AMER*3.0*5
D LOG^AMERBUSA("P","P","AMERREP3","AMER: Printed ER Visit Field Audit Log from "_AMERD1_" to "_AMERD2)
;
I $G(IOST)["C-" S DIR(0)="E" D ^DIR
Q 1
;
ERAUDLOG() ; EP FROM REPORT
; ER AUDIT LOG
N AMERD1,AMERD2,AMERD1X,AMERD2X,AMERHDR,FR,TO,BY,DIC,DIR
S (AMERD1,AMERD2,AMERHDR,AMERCLMS,AMERCLM2)=""
I '$$TIME^AMERREPT(.AMERD1,.AMERD2) D EN^DDIOL("Invalid Time","","!!,?20,!!") Q 0
D EN^DDIOL("Start Date: "_AMERD1,"","?10,!!")
D EN^DDIOL("End Date: "_AMERD2,"","?40")
S AMERHDR="ER VISIT EDIT LOG REPORT BY ER VISIT"
S FLDS="[CAPTIONED]"
S BY=".02"
S FR=AMERD1
S TO=AMERD2
S DHD=$$AMERDHD^AMERREPT(AMERHDR,AMERD1,AMERD2)
S L=0
S DIC="^AMERAUDT("
I '$D(POP) S POP=0
D EN1^DIP
;
;AMER*3.0*5
D LOG^AMERBUSA("P","P","AMERREP3","AMER: Printed ER Edit Log Report by ER Visit from "_AMERD1_" to "_AMERD2,"")
;
I $G(IOST)["C-" S DIR(0)="E" D ^DIR
Q 1
;
ERAUDRSN() ; EP FROM REPORT
; AUDIT LOG BY EDIT REASON
; ;IHS/OIT/SCR 10/01/08 - changed next line to remove unused variables
; N AMERD1,AMERD2,AMERD1X,AMERD2X,AMERHDR,FR,TO,BY,DIC,DIR,AMERMODE
N AMERD1,AMERD2,AMERHDR,FR,TO,BY,DIC,DIR,AMERMODE
S (AMERD1,AMERD2,AMERHDR,AMERCLMS,AMERCLM2)=""
I '$$TIME^AMERREPT(.AMERD1,.AMERD2) D EN^DDIOL("Invalid Time","","!!,?20,!!") Q 0
D EN^DDIOL("Start Date: "_AMERD1,"","?10,!!")
D EN^DDIOL("End Date: "_AMERD2,"","?40")
S AMERHDR="EDIT REASON AUDIT LOG REPORT"
S FLDS=".01;C1;L15,.02;C22;L15,.03;C42;L30"
S BY="2,.05;S1,.03,.01"
;IHS/OIT/SCR 10/01/08 - changed next two lines to avoid error
;S FR="A,A,"_AMERD1X_""""
;S TO="Zz,Zz,"_AMERD2X_""""
S FR="A,A,"_AMERD1_""
S TO="Zz,Zz,"_AMERD2_""
S DHD=$$AMERDHD^AMERREPT(AMERHDR,AMERD1,AMERD2)
S L=0
S DIC="^AMERAUDT("
I '$D(POP) S POP=0
D EN1^DIP
;
;AMER*3.0*5
D LOG^AMERBUSA("P","P","AMERREP3","AMER: Printed ER Edit Reason Audit Log from "_AMERD1_" to "_AMERD2,"")
;
I $G(IOST)["C-" S DIR(0)="E" D ^DIR
Q 1
AMERREP3 ;IHS/OIT/SCR - CANNED REPORT SUB-ROUTINE FOR ER AUDIT REPORTS
+1 ;;3.0;ER VISIT SYSTEM;**5**;MAR 03, 2009;Build 14
+2 ;
ERVSTLOG ; EP AMER REPORT MENU
+1 NEW AMERQUIT,AMERSEL,DIR,Y
+2 SET AMERQUIT=0
+3 FOR
Begin DoDot:1
+4 SET DIR(0)="SO^1:DAILY ER AUDIT LOG;"
+5 SET DIR(0)=DIR(0)_"2:SINGLE ER VISIT ER AUDIT LOG;"
+6 SET DIR(0)=DIR(0)_"3:DATA ENTERER ER AUDIT LOG;"
+7 SET DIR(0)=DIR(0)_"4:VISIT FIELD ER AUDIT LOG;"
+8 SET DIR(0)=DIR(0)_"5:EDIT REASON ER AUDIT LOG;"
+9 SET DIR(0)=DIR(0)_"6:ER AUDIT LOG BY VISIT DATE;"
+10 SET DIR("A")="Select Report"
SET DIR("?")="Select one choice or '^' to leave."
+11 DO ^DIR
+12 IF Y=""!(Y="^")
SET AMERQUIT=1
QUIT
+13 SET AMERSEL=Y
+14 SET AMERQUIT=$$REPORT(AMERSEL)
+15 QUIT
End DoDot:1
IF AMERQUIT
QUIT
+16 KILL AMERQUIT,AMERSEL,DIR,Y
+17 QUIT
+18 ;
REPORT(AMERSEL) ;
+1 NEW AMERLINE,AMERBANN,AMERQUIT
+2 SET AMERQUIT=0
+3 SET %=""
SET $PIECE(%,"~",80)=""
SET AMERLINE=%
KILL %
+4 DO EN^DDIOL(AMERLINE,"","!!")
+5 IF AMERSEL=1
Begin DoDot:1
+6 ; ER AUDIT BY DAY
IF '$$ERAUDDAY^AMERREP3()
SET AMERQUIT=1
QUIT
+7 DO EN^DDIOL(AMERLINE,"","!!")
+8 DO EN^DDIOL("","","!")
+9 QUIT
End DoDot:1
+10 IF AMERSEL=2
Begin DoDot:1
+11 ; ER AUDIT BY ER VISIT
IF '$$ERAUDVST^AMERREP3()
SET AMERQUIT=1
QUIT
+12 DO EN^DDIOL(AMERLINE,"","!!")
+13 DO EN^DDIOL("","","!")
+14 QUIT
End DoDot:1
+15 IF AMERSEL=3
Begin DoDot:1
+16 ; ER AUDIT BY DATA ENTERER
IF '$$ERAUDUSR^AMERREP3()
SET AMERQUIT=1
QUIT
+17 DO EN^DDIOL(AMERLINE,"","!!")
+18 DO EN^DDIOL("","","!")
+19 QUIT
End DoDot:1
+20 IF AMERSEL=4
Begin DoDot:1
+21 ; ER AUDIT BY ER VISIT FIELD
IF '$$ERAUDFLD^AMERREP3()
SET AMERQUIT=1
QUIT
+22 DO EN^DDIOL(AMERLINE,"","!!")
+23 DO EN^DDIOL("","","!")
+24 QUIT
End DoDot:1
+25 IF AMERSEL=5
Begin DoDot:1
+26 ; EDIT REASON ER AUDIT LOG
IF '$$ERAUDRSN^AMERREP3()
SET AMERQUIT=1
QUIT
+27 DO EN^DDIOL(AMERLINE,"","!!")
+28 DO EN^DDIOL("","","!")
+29 QUIT
End DoDot:1
+30 IF AMERSEL=6
Begin DoDot:1
+31 ; ER AUDIT LOG
IF '$$ERAUDLOG^AMERREP3()
SET AMERQUIT=1
QUIT
+32 DO EN^DDIOL(AMERLINE,"","!!")
+33 DO EN^DDIOL("","","!")
+34 QUIT
End DoDot:1
+35 IF AMERQUIT
QUIT 1
+36 IF $DATA(DUOUT)!$DATA(DTOUT)
KILL DUOUT,DTOUT
QUIT 1
+37 KILL AMERLINE,AMERBANN,AMERQUIT
+38 QUIT 0
+39 ;
ERAUDDAY() ; EP FROM REPORT
+1 ; DAILY ER AUDIT LOG
+2 NEW AMERD1,AMERHDR,FR,TO,BY,DIC,DIR,FLDS,DHS,%DT,X
+3 SET (AMERD1,AMERHDR)=""
+4 IF '$$TIME^AMERREPT(.AMERD1)
DO EN^DDIOL("Invalid Time","","!!,?20,!!")
QUIT 0
+5 DO EN^DDIOL("Log Date: "_AMERD1,"","?10,!!")
+6 SET AMERHDR="ER VISIT DAILY EDIT LOG REPORT"
+7 SET BY=".01"
+8 ; First change the nice looking date to a file man date for addition
+9 SET X=AMERD1
SET %DT=""
+10 DO ^%DT
+11 SET FR=Y+.0001
SET TO=Y+.2359
+12 SET DHD=$$AMERDHD^AMERREPT(AMERHDR,AMERD1,"")
+13 SET FLDS="[AMER AUDIT DAILY PRINT]"
+14 SET L=0
+15 SET DIC="^AMERAUDT("
+16 IF '$DATA(POP)
SET POP=0
+17 DO EN1^DIP
+18 ;
+19 ;AMER*3.0*5
+20 DO LOG^AMERBUSA("P","P","AMERREP3","AMER: Printed ER Visit Daily Edit Log Report for "_AMERD1,"")
+21 ;
+22 QUIT 1
+23 ;
ERAUDVST() ; EP FROM REPORT
+1 ; ER AUDIT LOG BY VISIT
+2 NEW AMERHDR,FR,TO,BY,DIC,DIR,FLDS,DHS,%DT,X
+3 SET AMERHDR=""
+4 SET DIC="^AMERVSIT("
SET DIC(0)="AZEMQ"
SET DIC("A")="Enter ER VISIT: "
+5 DO ^DIC
+6 IF Y<0
QUIT 1
+7 ;
+8 ;AMER*3.0*5
+9 NEW VIEN
+10 SET VIEN=$$GET1^DIQ(9009080,+Y,.03,"I")
+11 DO LOG^AMERBUSA("P","P","AMERREP3","AMER: Printed ER Visit","^"_VIEN)
+12 ;
+13 KILL DIC
+14 DO EN^DDIOL("ER EDIT LOG FOR VISIT: "_$PIECE(Y,U,2),"","?10,!!")
+15 SET AMERHDR="ER VISIT LOG ENTRY"
+16 ; First change the nice looking date to a file man date for addition
+17 SET BY=".02"
+18 SET FR=$PIECE(Y,U,2)
+19 SET TO=$PIECE(Y,U,2)
+20 SET DHD=$$AMERDHD^AMERREPT(AMERHDR,"","")
+21 SET FLDS="[CAPTION]"
+22 SET L=0
+23 SET DIC="^AMERAUDT("
+24 IF '$DATA(POP)
SET POP=0
+25 DO EN1^DIP
+26 IF $GET(IOST)["C-"
SET DIR(0)="E"
DO ^DIR
+27 QUIT 1
+28 ;
ERAUDUSR() ; EP FROM REPORT
+1 ; ER AUDIT LOG BY USER
+2 ;IHS/OIT/SCR 10/01/08 - changed next line to remove unused variables
+3 ;N AMERD1,AMERD2,AMERD1X,AMERD2X,AMERHDR,FR,TO,BY,DIC,DIR
+4 NEW AMERD1,AMERD2,AMERHDR,FR,TO,BY,DIC,DIR
+5 SET (AMERD1,AMERD2,AMERHDR)=""
+6 IF '$$TIME^AMERREPT(.AMERD1,.AMERD2)
DO EN^DDIOL("Invalid Time","","!!,?20,!!")
QUIT 1
+7 DO EN^DDIOL("Start Date: "_AMERD1,"","?10,!!")
+8 DO EN^DDIOL("End Date: "_AMERD2,"","?40")
+9 SET AMERHDR="ER VISIT DATA ENTERER AUDIT LOG REPORT"
+10 SET FLDS=".03;C3;L34,.01;C38,.02;C62"
+11 SET BY=".03,.01"
+12 ;IHS/OIT/SCR 10/01/08 - changed next two lines to avoid error
+13 ;S FR="A,"_AMERD1X_""""
+14 ;S TO="Zz,"_AMERD2X_""""
+15 SET FR="A,"_AMERD1_""
+16 SET TO="Zz,"_AMERD2_""
+17 SET DHD=$$AMERDHD^AMERREPT(AMERHDR,AMERD1,AMERD2)
+18 SET L=0
+19 SET DIC="^AMERAUDT("
+20 IF '$DATA(POP)
SET POP=0
+21 DO EN1^DIP
+22 IF $GET(IOST)["C-"
SET DIR(0)="E"
DO ^DIR
+23 QUIT 1
+24 ;
ERAUDFLD() ; EP FROM REPORT
+1 ; ER AUDIT BY ER VISIT FIELD
+2 ;IHS/OIT/SCR 10/01/08 - changed next line to remove unused variables
+3 ; N AMERD1,AMERD2,AMERD1X,AMERD2X,AMERHDR,FR,TO,BY,DIC,DIR
+4 NEW AMERD1,AMERD2,AMERHDR,FR,TO,BY,DIC,DIR
+5 SET (AMERD1,AMERD2,AMERHDR)=""
+6 IF '$$TIME^AMERREPT(.AMERD1,.AMERD2)
DO EN^DDIOL("Invalid Time","","!!,?20,!!")
QUIT 1
+7 DO EN^DDIOL("Start Date: "_AMERD1,"","?10,!!")
+8 DO EN^DDIOL("End Date: "_AMERD2,"","?40")
+9 SET AMERHDR="ER VISIT FIELD AUDIT LOG REPORT"
+10 SET FLDS="[AMER AUDIT FIELD PRINT]"
+11 SET BY=".03,.01"
+12 ;IHS/OIT/SCR 10/01/08 - changed next two lines to avoid error
+13 ;S FR="A,"_AMERD1X_""""
+14 ;S TO="Zz,"_AMERD2X_""""
+15 SET FR="A,"_AMERD1_""
+16 SET TO="Zz,"_AMERD2_""
+17 SET DHD=$$AMERDHD^AMERREPT(AMERHDR,AMERD1,AMERD2)
+18 SET L=0
+19 SET DIC="^AMERAUDT("
+20 IF '$DATA(POP)
SET POP=0
+21 DO EN1^DIP
+22 ;
+23 ;AMER*3.0*5
+24 DO LOG^AMERBUSA("P","P","AMERREP3","AMER: Printed ER Visit Field Audit Log from "_AMERD1_" to "_AMERD2)
+25 ;
+26 IF $GET(IOST)["C-"
SET DIR(0)="E"
DO ^DIR
+27 QUIT 1
+28 ;
ERAUDLOG() ; EP FROM REPORT
+1 ; ER AUDIT LOG
+2 NEW AMERD1,AMERD2,AMERD1X,AMERD2X,AMERHDR,FR,TO,BY,DIC,DIR
+3 SET (AMERD1,AMERD2,AMERHDR,AMERCLMS,AMERCLM2)=""
+4 IF '$$TIME^AMERREPT(.AMERD1,.AMERD2)
DO EN^DDIOL("Invalid Time","","!!,?20,!!")
QUIT 0
+5 DO EN^DDIOL("Start Date: "_AMERD1,"","?10,!!")
+6 DO EN^DDIOL("End Date: "_AMERD2,"","?40")
+7 SET AMERHDR="ER VISIT EDIT LOG REPORT BY ER VISIT"
+8 SET FLDS="[CAPTIONED]"
+9 SET BY=".02"
+10 SET FR=AMERD1
+11 SET TO=AMERD2
+12 SET DHD=$$AMERDHD^AMERREPT(AMERHDR,AMERD1,AMERD2)
+13 SET L=0
+14 SET DIC="^AMERAUDT("
+15 IF '$DATA(POP)
SET POP=0
+16 DO EN1^DIP
+17 ;
+18 ;AMER*3.0*5
+19 DO LOG^AMERBUSA("P","P","AMERREP3","AMER: Printed ER Edit Log Report by ER Visit from "_AMERD1_" to "_AMERD2,"")
+20 ;
+21 IF $GET(IOST)["C-"
SET DIR(0)="E"
DO ^DIR
+22 QUIT 1
+23 ;
ERAUDRSN() ; EP FROM REPORT
+1 ; AUDIT LOG BY EDIT REASON
+2 ; ;IHS/OIT/SCR 10/01/08 - changed next line to remove unused variables
+3 ; N AMERD1,AMERD2,AMERD1X,AMERD2X,AMERHDR,FR,TO,BY,DIC,DIR,AMERMODE
+4 NEW AMERD1,AMERD2,AMERHDR,FR,TO,BY,DIC,DIR,AMERMODE
+5 SET (AMERD1,AMERD2,AMERHDR,AMERCLMS,AMERCLM2)=""
+6 IF '$$TIME^AMERREPT(.AMERD1,.AMERD2)
DO EN^DDIOL("Invalid Time","","!!,?20,!!")
QUIT 0
+7 DO EN^DDIOL("Start Date: "_AMERD1,"","?10,!!")
+8 DO EN^DDIOL("End Date: "_AMERD2,"","?40")
+9 SET AMERHDR="EDIT REASON AUDIT LOG REPORT"
+10 SET FLDS=".01;C1;L15,.02;C22;L15,.03;C42;L30"
+11 SET BY="2,.05;S1,.03,.01"
+12 ;IHS/OIT/SCR 10/01/08 - changed next two lines to avoid error
+13 ;S FR="A,A,"_AMERD1X_""""
+14 ;S TO="Zz,Zz,"_AMERD2X_""""
+15 SET FR="A,A,"_AMERD1_""
+16 SET TO="Zz,Zz,"_AMERD2_""
+17 SET DHD=$$AMERDHD^AMERREPT(AMERHDR,AMERD1,AMERD2)
+18 SET L=0
+19 SET DIC="^AMERAUDT("
+20 IF '$DATA(POP)
SET POP=0
+21 DO EN1^DIP
+22 ;
+23 ;AMER*3.0*5
+24 DO LOG^AMERBUSA("P","P","AMERREP3","AMER: Printed ER Edit Reason Audit Log from "_AMERD1_" to "_AMERD2,"")
+25 ;
+26 IF $GET(IOST)["C-"
SET DIR(0)="E"
DO ^DIR
+27 QUIT 1