IVMLERR ;ALB/RMO,ERC - IVM Transmission Error Processing - List Manager Screen; 15-SEP-1997 ; 5/25/07 11:09am
;;2.0;INCOME VERIFICATION MATCH;**9,121**; 21-OCT-94;Build 45
;
EN ;Main entry point for IVM transmission error processing option
; Input -- None
; Output -- None
;
;Invoke IVM TRANSMISSION ERRORS list template
D EN^VALM("IVM TRANSMISSION ERRORS")
Q
;
HDR ;Header code
;
;Sort by
S VALMHDR(1)="Sort By: "_$S(IVMSRTBY="P":"Patient Name",IVMSRTBY="D":"Date/Time ACK Received",IVMSRTBY="E":"Error Message",IVMSRTBY="O":"Person Not Found",1:"Unknown")
;
;Date range
S VALMHDR(1)=$$SETSTR^VALM1("Date Range: "_$$FDATE^VALM1(IVMBEG)_" thru "_$$FDATE^VALM1(IVMEND),VALMHDR(1),46,80)
;
;Error processing status
N HDR,PCE,STA
S HDR=""
F PCE=1:1 S STA=$P(IVMEPSTA,U,PCE) Q:STA="" D
. S:HDR'="" HDR=HDR_"/"
. S HDR=HDR_$$LOWER^VALM1($$EXT^IVMTLOG("ERROR STATUS",STA))
S VALMHDR(2)="Error Processing Statuses: "_$S(HDR="":"Unknown",1:HDR)
Q
;
INIT ;Init variables and list array
N VALMB,VALMBEG,VALMEND,X,X1,X2
K IVMBEG,IVMEND,IVMEPSTA,IVMSRTBY
;
S VALMSG=$$MSG
;
;Ask user for date range - default two weeks prior to today
S X1=DT,X2=-14 D C^%DTC S VALMB=X
D RANGE^VALM1
I 'VALMBEG!('VALMEND) S VALMQUIT=1 G INITQ
S IVMBEG=VALMBEG,IVMEND=VALMEND
;
ASK ;
;ask user for sort criteria
N DIROUT,DUOUT
N IVMFLG ;flag indicating that the report has not yet run
N IVMY
S IVMFLG=1
S IVMEPSTA=1
W !!?5,"How would you like this display sorted?",!
D SL^IVMLERR2
I $D(DUOUT)!($D(DIROUT)) S VALMQUIT=1 G INITQ
;Build IVM transmission error screen
D BLD
INITQ Q
;
BLD ;Build IVM transmission error screen
D CLEAN^VALM10
K IVMARY,VALMHDR
S IVMARY="IVMERR"
K ^TMP(IVMARY_"SRT",$J),^TMP(IVMARY_"IDX",$J)
S VALMBG=1,VALMCNT=0
;
;Build header
D HDR
;
;Build list area for transmission errors
D EN^IVMLERR1(IVMARY,IVMBEG,IVMEND,IVMEPSTA,IVMSRTBY,.VALMCNT)
Q
;
MSG() ;Custom message for list manager 'message window'
Q "* = Patient has been flagged for transmission"
;
HELP ;Help code
S X="?" D DISP^XQORM1 W !!
Q
;
EXIT ;Exit code
D CLEAN^VALM10
D CLEAR^VALM1
K IVMBEG,IVMEND,IVMEPSTA,IVMSRTBY,^TMP(IVMARY_"SRT",$J),^TMP(IVMARY_"IDX",$J),IVMARY
Q
;
EXPND ;Expand code
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIVMLERR 2310 printed Nov 22, 2024@17:12:03 Page 2
IVMLERR ;ALB/RMO,ERC - IVM Transmission Error Processing - List Manager Screen; 15-SEP-1997 ; 5/25/07 11:09am
+1 ;;2.0;INCOME VERIFICATION MATCH;**9,121**; 21-OCT-94;Build 45
+2 ;
EN ;Main entry point for IVM transmission error processing option
+1 ; Input -- None
+2 ; Output -- None
+3 ;
+4 ;Invoke IVM TRANSMISSION ERRORS list template
+5 DO EN^VALM("IVM TRANSMISSION ERRORS")
+6 QUIT
+7 ;
HDR ;Header code
+1 ;
+2 ;Sort by
+3 SET VALMHDR(1)="Sort By: "_$SELECT(IVMSRTBY="P":"Patient Name",IVMSRTBY="D":"Date/Time ACK Received",IVMSRTBY="E":"Error Message",IVMSRTBY="O":"Person Not Found",1:"Unknown")
+4 ;
+5 ;Date range
+6 SET VALMHDR(1)=$$SETSTR^VALM1("Date Range: "_$$FDATE^VALM1(IVMBEG)_" thru "_$$FDATE^VALM1(IVMEND),VALMHDR(1),46,80)
+7 ;
+8 ;Error processing status
+9 NEW HDR,PCE,STA
+10 SET HDR=""
+11 FOR PCE=1:1
SET STA=$PIECE(IVMEPSTA,U,PCE)
if STA=""
QUIT
Begin DoDot:1
+12 if HDR'=""
SET HDR=HDR_"/"
+13 SET HDR=HDR_$$LOWER^VALM1($$EXT^IVMTLOG("ERROR STATUS",STA))
End DoDot:1
+14 SET VALMHDR(2)="Error Processing Statuses: "_$SELECT(HDR="":"Unknown",1:HDR)
+15 QUIT
+16 ;
INIT ;Init variables and list array
+1 NEW VALMB,VALMBEG,VALMEND,X,X1,X2
+2 KILL IVMBEG,IVMEND,IVMEPSTA,IVMSRTBY
+3 ;
+4 SET VALMSG=$$MSG
+5 ;
+6 ;Ask user for date range - default two weeks prior to today
+7 SET X1=DT
SET X2=-14
DO C^%DTC
SET VALMB=X
+8 DO RANGE^VALM1
+9 IF 'VALMBEG!('VALMEND)
SET VALMQUIT=1
GOTO INITQ
+10 SET IVMBEG=VALMBEG
SET IVMEND=VALMEND
+11 ;
ASK ;
+1 ;ask user for sort criteria
+2 NEW DIROUT,DUOUT
+3 ;flag indicating that the report has not yet run
NEW IVMFLG
+4 NEW IVMY
+5 SET IVMFLG=1
+6 SET IVMEPSTA=1
+7 WRITE !!?5,"How would you like this display sorted?",!
+8 DO SL^IVMLERR2
+9 IF $DATA(DUOUT)!($DATA(DIROUT))
SET VALMQUIT=1
GOTO INITQ
+10 ;Build IVM transmission error screen
+11 DO BLD
INITQ QUIT
+1 ;
BLD ;Build IVM transmission error screen
+1 DO CLEAN^VALM10
+2 KILL IVMARY,VALMHDR
+3 SET IVMARY="IVMERR"
+4 KILL ^TMP(IVMARY_"SRT",$JOB),^TMP(IVMARY_"IDX",$JOB)
+5 SET VALMBG=1
SET VALMCNT=0
+6 ;
+7 ;Build header
+8 DO HDR
+9 ;
+10 ;Build list area for transmission errors
+11 DO EN^IVMLERR1(IVMARY,IVMBEG,IVMEND,IVMEPSTA,IVMSRTBY,.VALMCNT)
+12 QUIT
+13 ;
MSG() ;Custom message for list manager 'message window'
+1 QUIT "* = Patient has been flagged for transmission"
+2 ;
HELP ;Help code
+1 SET X="?"
DO DISP^XQORM1
WRITE !!
+2 QUIT
+3 ;
EXIT ;Exit code
+1 DO CLEAN^VALM10
+2 DO CLEAR^VALM1
+3 KILL IVMBEG,IVMEND,IVMEPSTA,IVMSRTBY,^TMP(IVMARY_"SRT",$JOB),^TMP(IVMARY_"IDX",$JOB),IVMARY
+4 QUIT
+5 ;
EXPND ;Expand code
+1 QUIT
+2 ;