BAR50DET ;IHS/SD/POT - DISPLAY MATCH REASONS AND CLAIMS REPORT;
;;1.8;IHS ACCOUNTS RECEIVABLE;**,23,24**;OCT 26, 2005;Build 69
;CALLED FROM BARED* AND BAR50*
;IHS/SD/POT NEW ROUTINE JAN 2013 - BAR*1.8*23
;IHS/SD/POT HEAT148835 CHANGED DEFAULT OF "Do you wish to print report of the matching process" - BAR*1.8*24
Q
INS(BARTXT,BARMODE) ;
NEW BARPTR,%
S BARPTR=$G(^XTMP("BAR-LIST_DETAIL",$J,DUZ(2),"L"))+1
I BARPTR=1 D
. D NOW^%DTC
. S ^XTMP("BAR-LIST_DETAIL",$J,DUZ(2),"L")=BARPTR
. S ^XTMP("BAR-LIST_DETAIL",$J,DUZ(2),"L",BARPTR)=%
S BARMODE=$G(BARMODE)
I 'BARMODE D Q ;NEW ENTRY
. S BARPTR=$G(^XTMP("BAR-LIST_DETAIL",$J,DUZ(2),"L"))+1
. S ^XTMP("BAR-LIST_DETAIL",$J,DUZ(2),"L")=BARPTR
. S ^XTMP("BAR-LIST_DETAIL",$J,DUZ(2),"L",BARPTR)=BARTXT
I BARMODE D Q ;APPEND TO LAST ENTRY
. S BARPTR=$G(^XTMP("BAR-LIST_DETAIL",$J,DUZ(2),"L"))
. S ^XTMP("BAR-LIST_DETAIL",$J,DUZ(2),"L")=BARPTR
. S BARTXT=^XTMP("BAR-LIST_DETAIL",$J,DUZ(2),"L",BARPTR)_BARTXT
. S ^XTMP("BAR-LIST_DETAIL",$J,DUZ(2),"L",BARPTR)=BARTXT
Q
NOMATCH ;
S ^XTMP("BAR-LIST_DETAIL",$J,DUZ(2),"NOMATCH")=1
Q
PRT ;EP
W !
S Y=$$DIR^XBDIR("Y","Do you wish to print report of the matching process","Y") ;DEFAULT = Y - BAR*1.8*24
;S Y=$$DIR^XBDIR("Y","Do you wish to print report of the matching process","N") ;DEFAULT = N
Q:+Y<1
D ^%ZIS
Q:$D(DUOUT)
Q:POP
U IO
D PRINT
D ^%ZISC
Q
PRINT ;
NEW BARLINE
D HDR
W !,"Created: ",^XTMP("BAR-LIST_DETAIL",$J,DUZ(2),"L",1)
S BARLINE=1 F S BARLINE=$O(^XTMP("BAR-LIST_DETAIL",$J,DUZ(2),"L",BARLINE)) Q:BARLINE="" D
. W !,^XTMP("BAR-LIST_DETAIL",$J,DUZ(2),"L",BARLINE)
. QUIT
D FOOT
QUIT
HDR ;
D UNDL
NEW BARFHDR,BARTHDR,BARTMP,BARCHDR
W !?10,"** Detailed report of the matching process ** "
S BARFHDR="File name : "_$P($G(^BAREDI("I",DUZ(2),"L",IMPDA,0)),"^")
S BARTHDR="Transport : "_$P($G(^BAREDI("1T",TRDA,0)),"^")
S BARTMP=$J(BARTHDR,45)_BARFHDR
I TRNAME["HIPAA" D
. S BARTHDR=TRNAME
. S BARFHDR="File: "_$P($G(^BAREDI("I",DUZ(2),"L",IMPDA,0)),U)
. S BARCHDR="Chk/EFT#: "_$S($G(BARCHK)'="":BARCHK,1:$P($G(^BARECHK(BARCKIEN,0)),U))
. S BARTMP=$J(BARTHDR,18)_" "_$J(BARFHDR,28)_" "_BARCHDR
W !,BARTMP
D UNDL
Q
W !,"--- END OF REPORT ---"
D UNDL
Q
UNDL NEW I
W ! F I=1:1:78 W "="
Q ;EOR
BAR50DET ;IHS/SD/POT - DISPLAY MATCH REASONS AND CLAIMS REPORT;
+1 ;;1.8;IHS ACCOUNTS RECEIVABLE;**,23,24**;OCT 26, 2005;Build 69
+2 ;CALLED FROM BARED* AND BAR50*
+3 ;IHS/SD/POT NEW ROUTINE JAN 2013 - BAR*1.8*23
+4 ;IHS/SD/POT HEAT148835 CHANGED DEFAULT OF "Do you wish to print report of the matching process" - BAR*1.8*24
+5 QUIT
INS(BARTXT,BARMODE) ;
+1 NEW BARPTR,%
+2 SET BARPTR=$GET(^XTMP("BAR-LIST_DETAIL",$JOB,DUZ(2),"L"))+1
+3 IF BARPTR=1
Begin DoDot:1
+4 DO NOW^%DTC
+5 SET ^XTMP("BAR-LIST_DETAIL",$JOB,DUZ(2),"L")=BARPTR
+6 SET ^XTMP("BAR-LIST_DETAIL",$JOB,DUZ(2),"L",BARPTR)=%
End DoDot:1
+7 SET BARMODE=$GET(BARMODE)
+8 ;NEW ENTRY
IF 'BARMODE
Begin DoDot:1
+9 SET BARPTR=$GET(^XTMP("BAR-LIST_DETAIL",$JOB,DUZ(2),"L"))+1
+10 SET ^XTMP("BAR-LIST_DETAIL",$JOB,DUZ(2),"L")=BARPTR
+11 SET ^XTMP("BAR-LIST_DETAIL",$JOB,DUZ(2),"L",BARPTR)=BARTXT
End DoDot:1
QUIT
+12 ;APPEND TO LAST ENTRY
IF BARMODE
Begin DoDot:1
+13 SET BARPTR=$GET(^XTMP("BAR-LIST_DETAIL",$JOB,DUZ(2),"L"))
+14 SET ^XTMP("BAR-LIST_DETAIL",$JOB,DUZ(2),"L")=BARPTR
+15 SET BARTXT=^XTMP("BAR-LIST_DETAIL",$JOB,DUZ(2),"L",BARPTR)_BARTXT
+16 SET ^XTMP("BAR-LIST_DETAIL",$JOB,DUZ(2),"L",BARPTR)=BARTXT
End DoDot:1
QUIT
+17 QUIT
NOMATCH ;
+1 SET ^XTMP("BAR-LIST_DETAIL",$JOB,DUZ(2),"NOMATCH")=1
+2 QUIT
PRT ;EP
+1 WRITE !
+2 ;DEFAULT = Y - BAR*1.8*24
SET Y=$$DIR^XBDIR("Y","Do you wish to print report of the matching process","Y")
+3 ;S Y=$$DIR^XBDIR("Y","Do you wish to print report of the matching process","N") ;DEFAULT = N
+4 IF +Y<1
QUIT
+5 DO ^%ZIS
+6 IF $DATA(DUOUT)
QUIT
+7 IF POP
QUIT
+8 USE IO
+9 DO PRINT
+10 DO ^%ZISC
+11 QUIT
PRINT ;
+1 NEW BARLINE
+2 DO HDR
+3 WRITE !,"Created: ",^XTMP("BAR-LIST_DETAIL",$JOB,DUZ(2),"L",1)
+4 SET BARLINE=1
FOR
SET BARLINE=$ORDER(^XTMP("BAR-LIST_DETAIL",$JOB,DUZ(2),"L",BARLINE))
IF BARLINE=""
QUIT
Begin DoDot:1
+5 WRITE !,^XTMP("BAR-LIST_DETAIL",$JOB,DUZ(2),"L",BARLINE)
+6 QUIT
End DoDot:1
+7 DO FOOT
+8 QUIT
HDR ;
+1 DO UNDL
+2 NEW BARFHDR,BARTHDR,BARTMP,BARCHDR
+3 WRITE !?10,"** Detailed report of the matching process ** "
+4 SET BARFHDR="File name : "_$PIECE($GET(^BAREDI("I",DUZ(2),"L",IMPDA,0)),"^")
+5 SET BARTHDR="Transport : "_$PIECE($GET(^BAREDI("1T",TRDA,0)),"^")
+6 SET BARTMP=$JUSTIFY(BARTHDR,45)_BARFHDR
+7 IF TRNAME["HIPAA"
Begin DoDot:1
+8 SET BARTHDR=TRNAME
+9 SET BARFHDR="File: "_$PIECE($GET(^BAREDI("I",DUZ(2),"L",IMPDA,0)),U)
+10 SET BARCHDR="Chk/EFT#: "_$SELECT($GET(BARCHK)'="":BARCHK,1:$PIECE($GET(^BARECHK(BARCKIEN,0)),U))
+11 SET BARTMP=$JUSTIFY(BARTHDR,18)_" "_$JUSTIFY(BARFHDR,28)_" "_BARCHDR
End DoDot:1
+12 WRITE !,BARTMP
+13 DO UNDL
+14 QUIT
+1 WRITE !,"--- END OF REPORT ---"
+2 DO UNDL
+3 QUIT
UNDL NEW I
+1 WRITE !
FOR I=1:1:78
WRITE "="
+2 ;EOR
QUIT