RCDPEDA3 ;AITC/DW - ACTIVITY REPORT ;Feb 17, 2017@10:37:00
;;4.5;Accounts Receivable;**318,321,326,432**;Mar 20, 1995;Build 16
;Per VA Directive 6402, this routine should not be modified.
Q
;
HDR(INPUT) ;EP from RCDPEDAR
; Displays report header
; Input: INPUT - A1^A2^A3^...^An Where:
; A1 - 1 if called from Nightly Process, 0 otherwise
; A2 - 1 if displaying to Listman, 0 otherwise
; A3 - 1 if Detail report, 0 if summary report
; A4 - Current Page Number
; A5 - Stop Flag
; A6 - Start of Date Range
; A7 - End of Date Range
; A9 - Current line count
; A10- 1 - Only Display EFTs with a debit flag of 'D'
; 0 - Display all EFTs
; Output: INPUT - A1^A2^A3^...^An - The following pieces may be updated
; A4 - Current Page Number
; A5 - Stop Flag
; A8 - Updated line count
N CTR,CURPG,DETL,DONLY,DTST,DTEND,NJ,NOJUST,PLN,STOP,X,XX,Y,Z,Z0,Z1
S DETL=$P(INPUT,"^",3)
S CURPG=$P(INPUT,"^",4)
S STOP=$P(INPUT,"^",5)
S DTST=$P(INPUT,"^",6) ; Date Range Start
S DTEND=$P(INPUT,"^",7) ; Date Range Ends
S DONLY=$P(INPUT,"^",10) ; EFTs with Debits Only ;PRCA*4.5*321 add debit logic
S NJ=$P(INPUT,"^",1)
Q:NJ&(CURPG)
I CURPG!($E(IOST,1,2)="C-") D
. Q:NJ
. I CURPG,($E(IOST,1,2)="C-") D Q:STOP
. . S STOP=$$ASK()
. W @IOF ; Write form feed
I STOP S $P(INPUT,"^",5)=1 Q
S CURPG=CURPG+1,$P(INPUT,"^",4)=CURPG
;
; PRCA276 if coming from nightly job need to define payer selection variable
I NJ N RCPAY,RCTYPE D ; PRCA*4.5*321
. S RCPAY="A"
. S RCTYPE="A"
;
; PRCA276 if coming from nightly job need to define division selection variable
I NJ N VAUTD S VAUTD=1
S Z0="EDI LOCKBOX EFT DAILY ACTIVITY "_$S(DETL:"DETAIL",1:"SUMMARY")_" REPORT"
S Z=$$SETSTR^VALM1($J("",80-$L(Z0)\2)_Z0,"",1,79)
S Z=$$SETSTR^VALM1("Page: "_CURPG,Z,70,10)
D SL(.INPUT,Z)
S Z="RUN DATE: "_$$FMTE^XLFDT($$NOW^XLFDT(),"2Z"),Z=$J("",80-$L(Z)\2)_Z
D SL(.INPUT,Z)
;
; PRCA276 add divisions to header
S Z1=""
I 'VAUTD D
. S Z0=0
. F D Q:'Z0
.. S Z0=$O(VAUTD(Z0))
.. Q:'Z0
.. S XX=$$GET1^DIQ(40.8,Z0,1,"I") ;Facility Number ;PRCA*4.5*321
.. ;S Z1=Z1_VAUTD(Z0)_", "
.. S Z1=Z1_XX_", "
S Z="DIVISIONS: "_$S(VAUTD:"ALL",1:$E(Z1,1,$L(Z1)-2)),Z=$J("",80-$L(Z)\2)_Z
D SL(.INPUT,Z)
;
S NOJUST=0
; PRCA*4.5*326 - Use RCPAY for payer selection type in header, Add M/P/T filter
S Z="PAYERS: "_$S(RCPAY="A":"ALL",RCPAY="R":"RANGE",1:"SELECTED")
S Z=$E(Z_$J("",80),1,38)_"MEDICAL/PHARMACY/TRICARE/CHAMPVA: " ;PRCA*4.5*432 Add CHAMPVA, 44->38
S Z=Z_$S(RCTYPE="M":"MEDICAL",RCTYPE="P":"PHARMACY",RCTYPE="T":"TRICARE",RCTYPE="C":"CHAMPVA",1:"ALL") ;PRCA*4.5*432 Add CHAMPVA
; PRCA*4.5*326 End changes.
D SL(.INPUT,Z)
S CTR=1
F D Q:CTR=""
. S CTR=$O(PLN(CTR))
. Q:CTR=""
. D SL(.INPUT,PLN(CTR))
;
; PRCA276 add date filter to header
S Z="DATE RANGE: "_$$FMTE^XLFDT(DTST,"2Z")_" - "_$$FMTE^XLFDT(DTEND,"2Z")
S Z=Z_" (DATE DEPOSIT ADDED) DEBIT ONLY EFTs: " ; PRCA*4.5*321 debit info
S Z=Z_$S(DONLY:"YES",1:"NO")
S Z=$J("",80-$L(Z)\2)_Z
D SL(.INPUT,Z)
I DETL D
. ;
. ; PRCA*4.5*283 - Add 3 more spaces between DEP # and DEPOSIT DT
. ; and remove 3 spaces between DEPOSIT DT and DEP AMOUNT to allow for 9 digit DEP #'s
. D SL(.INPUT,"")
. S XX="DEP # DEPOSIT DT "_$J("",19)_"DEP AMOUNT FMS DEPOSIT STAT"
. S Z=$$SETSTR^VALM1(XX,"",1,$L(XX))
. D SL(.INPUT,Z)
. ;
. ; PRCA*4.5*318, Move entire EFT # row to left 1 space to adjust for other rows needing space
. ; PRCA*4.5*284, Move Match Status to left 3 space to allow for 10 digit ERA #'s
. ; PRCA*4.5*326 - make room and add match date
. S XX=$J("",2)_"EFT #"_$J("",15)_"DATE PD PAYMENT AMOUNT ERA MATCH STATUS & DATE"
. S Z=$$SETSTR^VALM1(XX,"",1,$L(XX))
. D SL(.INPUT,Z)
. ; PRCA*4.5*318, Move entire EFT Payer Trace # row to left 6 spaces to adjust for other rows needing space
. S Z=$$SETSTR^VALM1($J("",4)_"EFT PAYER TRACE #","",1,52)
. S Z=$$SETSTR^VALM1("CR #",Z,59,4) ;PRCA*4.5*318 add CR #
. D SL(.INPUT,Z)
. ; PRCA*4.5*318, Move entire Payment From row to left 8 spaces to adjust
. ; a possible 60 character Payer Name and 20 character Payer ID
. S XX=$J("",6)_"PAYMENT FROM"
. S Z=$$SETSTR^VALM1(XX,"",1,$L(XX))
. D SL(.INPUT,Z)
. S XX=$J("",3)_"TR #" ;PRCA*4.5*318 add TR #
. S Z=$$SETSTR^VALM1(XX,"",1,$L(XX))
. D SL(.INPUT,Z) ; TR DOC header
. S XX=$J("",44)_"DEP RECEIPT #" ;PRCA*4.5*321 ; PRCA*4.5*432
. S Z=$$SETSTR^VALM1(XX,"",1,$L(XX))
. S Z=$$SETSTR^VALM1("DEP RECEIPT STATUS",Z,61,19)
. D SL(.INPUT,Z)
D SL(.INPUT,$TR($J("",IOM-1)," ","="))
Q
;
TOTSDAY(INPUT) ;EP from RCDPEDAR
; Display the totals for the specified date
;
; Input: INPUT - A1^A2^A3^...^An Where:
; A1 - 1 if called from Nightly Process, 0 otherwise
; A2 - 1 if displaying to Listman, 0 otherwise
; A3 - 1 if Detail report, 0 if summary report
; A4 - Current Page Number
; A5 - Stop Flag
; A6 - Start of Date Range
; A7 - End of Date Range
; A8 - Current Line Counter
; A9 - Internal Date being processed
; ^TMP($J,"TOTALS","DEBIT") - Current Total # of debits for date range
; ^TMP($J,"TOTALS","DEBIT","D") - Total # of debits for Internal date (C1)
; ^TMP($J,"TOTALS","DEBITA") - Current Total Debit Amount for date range
; ^TMP($J,"TOTALS","DEBITA","D") - Total Debit Amount for Internal date (C1)
; ^TMP($J,"TOTALS","DEP") - Current Total # of deposits for date range
; ^TMP($J,"TOTALS","DEP",C1) - Total # of deposits for Internal date (C1)
; ^TMP($J,"TOTALS","DEPA") - Current Total Deposit Amount for date range
; ^TMP($J,"TOTALS","DEPA",C1) - Total Deposit Amount for Internal date (C1)
; ^TMP($J,"TOTALS","EFT","D") - Total Deposit Amount by EFTs for date
; ^TMP($J,"TOTALS","EFT","T") - Current Total Deposit Amount by EFTs for range
; ^TMP($J,"TOTALS","FMS") - FMS Document Status or "NO FMS DOC"
; ^TMP($J,"TOTALS","FMS","D",-1) - Total Deposit Amount by FMS Document
; ^TMP($J,"TOTALS","FMS","D",0) - Total Amount for Error/Rejected documents
; ^TMP($J,"TOTALS","FMS","D",1") - Total Amount for 'A','M',"F' or 'T' docs
; ^TMP($J,"TOTALS","FMS","D",2") - Total Amount for queued docs
; ^TMP($J,"TOTALS","FMS","T",-1) - Total Deposit Amount by FMS Document for range
; ^TMP($J,"TOTALS","FMS","T",0) - Total Amount for Error/Rejected docs for range
; ^TMP($J,"TOTALS","FMS","T",1") - Total Amount for 'A','M',"F' or 'T' docs range
; ^TMP($J,"TOTALS","FMS","T",2") - Total Amount for queued docs for range
; ^TMP($J,"TOTALS","FMSTOT") - Updated Total Deposit Amount for date range
; ^TMP($J,"TOTALS","MATCH","D") - Current Total matched EFTs for date
; ^TMP($J,"TOTALS","MATCH","T") - Current Total matched EFTs for date range
; Output: INPUT - A1^A2^A3^...^An - The following pieces may be updated
; A4 - Updated Page Number
; A5 - Stop Flag
; A8 - Updated Line Counter
; ^TMP($J,"TOTALS","DEBIT") - Updated Total # of debits for date range
; ^TMP($J,"TOTALS","DEBIT","D") - Updated Total # of debits for Internal date (C1)
; ^TMP($J,"TOTALS","DEBITA") - Updated Total Debit Amount for date range
; ^TMP($J,"TOTALS","DEBITA","D") - Updated Total Debit Amount for Internal date (C1)
; ^TMP($J,"TOTALS","DEP") - Updated Total # of deposits for date range
; ^TMP($J,"TOTALS","DEPA") - Updated Total Deposit Amount for date range
; ^TMP($J,"TOTALS","EFT","T") - Updated Total Deposit Amount by EFTs for range
; ^TMP($J,"TOTALS","FMS","T",-1) - Updated Deposit Amount by FMS Document for range
; ^TMP($J,"TOTALS","FMS","T",0) - Updated Amount for Error/Rejected docs for range
; ^TMP($J,"TOTALS","FMS","T",1") - Updated Amount for 'A','M',"F' or 'T' docs range
; ^TMP($J,"TOTALS","FMS","T",2") - Updated Amount for queued docs for range
; ^TMP($J,"TOTALS","MATCH","T") - Updated Total Matched EFTs for date range
N CURPG,DETL,DTADD,LSTMAN,NL,Q,XX,YY
S LSTMAN=$P(INPUT,"^",2) ; Display to Listman flag
S NJ=$P(INPUT,"^",1) ; Called from Nightly Process flag
S DETL=$P(INPUT,"^",3) ; Detail Report flag
S CURPG=$P(INPUT,"^",4) ; Current Page Counter
S DTADD=$P(INPUT,"^",9) ; Date to display totals for
S XX=$G(^TMP($J,"TOTALS","DEPA")) ; Current Total Deposit Amount for date range
S YY=$G(^TMP($J,"TOTALS","DEPA",DTADD)) ; Total Deposit Amount for date
S ^TMP($J,"TOTALS","DEPA")=XX+YY ; Updated Total for range
S XX=$G(^TMP($J,"TOTALS","DEP")) ; Current Total # of Deposits for date range
S YY=$G(^TMP($J,"TOTALS","DEP",DTADD)) ; Total # of Deposits for date
S ^TMP($J,"TOTALS","DEP")=XX+YY ; Updated Total # for range
;
S XX=$G(^TMP($J,"TOTALS","EFT","T")) ; Current Total Amount by EFTs for date range
S YY=$G(^TMP($J,"TOTALS","EFT","D")) ; Total Amount by EFTs for date
S ^TMP($J,"TOTALS","EFT","T")=XX+YY ; Updated Total Amount for range
;
S XX=$G(^TMP($J,"TOTALS","MATCH","T")) ; Current Total # Matched EFTs for date range
S YY=$G(^TMP($J,"TOTALS","MATCH","D")) ; # Matched EFTs for date
S ^TMP($J,"TOTALS","MATCH","T")=XX+YY ; Updated Total # Matched EFTs for date range
;
; Update document status totals for range
F Q=-1,0,1,2 D
. S XX=$G(^TMP($J,"TOTALS","FMS","T",Q)) ; Current Total # of Q status for date range
. S YY=$G(^TMP($J,"TOTALS","FMS","D",Q)) ; # of Q status for date
. S ^TMP($J,"TOTALS","FMS","T",Q)=XX+YY ; Updated Total # of Q status for date range
;
; daily totals
;I $S('NJ:($Y+5)>IOSL,1:0)!'CURPG D Q:$P(INPUT,"^",5)=1 ; PRCA*4.5*321 changed
I $S('NJ:1,1:0)!'CURPG D Q:$P(INPUT,"^",5)=1
. D:'LSTMAN HDR(.INPUT)
S XX=$E("**TOTALS FOR DATE: "_$$FMTE^XLFDT(DTADD\1,"2Z")_$J("",30),1,30)
S YY=$G(^TMP($J,"TOTALS","DEP",DTADD))
S XX=XX_" # OF DEPOSIT TICKETS RECEIVED: "_+YY_$J("",5)
D SL(.INPUT,XX)
S YY=$G(^TMP($J,"TOTALS","DEPA",DTADD))
S XX=$J("",29)_"TOTAL AMOUNT OF DEPOSITS RECEIVED: $"_$J(YY,"",2)
D SL(.INPUT,XX)
Q:$P(INPUT,"^",5)=1
D SL(.INPUT," ")
D SL(.INPUT,$J("",20)_"DEPOSIT AMOUNTS SENT TO FMS:")
Q:$P(INPUT,"^",5)=1
S YY=+$G(^TMP($J,"TOTALS","FMS","D",1))
S XX=$J("",39)_"ACCEPTED: $"_$J(YY,"",2)
D SL(.INPUT,XX)
Q:$P(INPUT,"^",5)=1
S YY=+$G(^TMP($J,"TOTALS","FMS","D",2))
S XX=$J("",41)_"QUEUED: $"_$J(YY,"",2)
D SL(.INPUT,XX)
Q:$P(INPUT,"^",5)=1
S YY=+$G(^TMP($J,"TOTALS","FMS","D",0))
S XX=$J("",35)_"ERROR/REJECT: $"_$J(YY,"",2)
D SL(.INPUT,XX)
Q:$P(INPUT,"^",5)=1
S YY=+$G(^TMP($J,"TOTALS","FMS","D",-1))
S XX=$J("",37)_"NOT IN FMS: $"_$J(YY,"",2)
D SL(.INPUT,XX)
D SL(.INPUT," ")
Q:$P(INPUT,"^",5)=1
;
; PRCA*4.5*321 add all debit logic
S XX=$G(^TMP($J,"TOTALS","DEBIT")) ; Current Total # of debit EFTs for date range
S YY=$G(^TMP($J,"TOTALS","DEBIT","D")) ; Total # of debit EFTs for date
S ^TMP($J,"TOTALS","DEBIT")=XX+YY ; Updated Total # of debit EFTs for range
S XX=$G(^TMP($J,"TOTALS","DEBITA")) ; Current Total amount of debit EFTs for date range
S YY=$G(^TMP($J,"TOTALS","DEBITA","D")) ; Total amount of debit EFTs for date
S ^TMP($J,"TOTALS","DEBITA")=XX+YY ; Updated Total amount of debit EFTs for range
S YY=+$G(^TMP($J,"TOTALS","DEBIT","D"))
S XX=$J("",27)_"# EFT DEBIT VOUCHERS: "_YY
D SL(.INPUT,XX)
S YY=+$G(^TMP($J,"TOTALS","DEBITA","D"))
S XX=$J("",33)_"DEBIT VOUCHERS: $"_$J(YY,"",2)
D SL(.INPUT,XX)
D SL(.INPUT," ")
;
S YY=+$G(^TMP($J,"TOTALS","EFT","D"))
S XX=$J("",26)_"# EFT PAYMENT RECORDS: "_YY
D SL(.INPUT,XX)
Q:$P(INPUT,"^",5)=1
S YY=+$G(^TMP($J,"TOTALS","MATCH","D"))
S XX=$J("",25)_"# EFT PAYMENTS MATCHED: "_YY
D SL(.INPUT,XX)
Q:$P(INPUT,"^",5)=1
; PRCA*4.5*321 remove Matched payment amt posted
;S YY=+$G(^TMP($J,"TOTALS","DEPAP",DTADD))
;S XX=$J("",18)_"MATCHED PAYMENT AMOUNT POSTED: $"_$J(YY,"",2)
;D SL(.INPUT,XX)
D SL(.INPUT," ")
Q
;
TOTSF(INPUT) ; EP from RCDPEDAR
; Display Final Totals
;
; Input: INPUT - A1^A2^A3^...^An Where:
; A1 - 1 if called from Nightly Process, 0 otherwise
; A2 - 1 if displaying to Listman, 0 otherwise
; A3 - 1 if Detail report, 0 if summary report
; A4 - Current Page Number
; A5 - Stop Flag
; A6 - Start of Date Range
; A7 - End of Date Range
; A8 - Current Line Counter
; A9 - Internal Date being processed
; ^TMP($J,"TOTALS","DEP") - Total # of deposits for date range
; ^TMP($J,"TOTALS","DEPA") - Total Deposit Amount for date range
; ^TMP($J,"TOTALS","EFT","T") - Total Deposit Amount by EFTs for range
; ^TMP($J,"TOTALS","FMS","T",-1) - Total Deposit Amount by FMS Document for range
; ^TMP($J,"TOTALS","FMS","T",0) - Total Amount for Error/Rejected docs for range
; ^TMP($J,"TOTALS","FMS","T",1") - Total Amount for 'A','M',"F' or 'T' docs range
; ^TMP($J,"TOTALS","FMS","T",2") - Total Amount for queued docs for range
; ^TMP($J,"TOTALS","MATCH","T") - Total Matched EFTs for date range
; Output: INPUT - A1^A2^A3^...^An - The following pieces may be updated
; A5 - Updated Page Number
; A6 - Stop Flag
; A8 - Updated Line Counter
N LSTMAN,NJ,XX,YY
S LSTMAN=$P(INPUT,"^",2),NJ=$P(INPUT,"^",1)
;
; header if no output was displayed and not being displayed in listman
;I '$O(^TMP("RCDAILYACT",$J,0)),'LSTMAN D HDR(.INPUT) ; PRCA*4.5*321 hdr regardless if no output
I 'LSTMAN D HDR(.INPUT)
;
; If user quit or (Nightly process flag AND not display to listman) - end here
I $P(INPUT,"^",5)=1!(NJ&'LSTMAN) Q
;D SL(.INPUT," ") ; PRCA*4.5*321 removed
S XX=$E("**** TOTALS FOR DATE RANGE:"_$J("",30),1,30)
S YY=+$G(^TMP($J,"TOTALS","DEP"))
S XX=XX_" # OF DEPOSIT TICKETS RECEIVED: "_YY_$J("",5)
D SL(.INPUT,XX)
S YY=+$G(^TMP($J,"TOTALS","DEPA"))
S XX=$J("",29)_"TOTAL AMOUNT OF DEPOSITS RECEIVED: $"_$J(YY,"",2)
D SL(.INPUT,XX)
D SL(.INPUT," ")
D SL(.INPUT,$J("",20)_"DEPOSIT AMOUNTS SENT TO FMS:")
S YY=+$G(^TMP($J,"TOTALS","FMS","T",1))
S XX=$J("",39)_"ACCEPTED: $"_$J(YY,"",2)
D SL(.INPUT,XX)
S YY=+$G(^TMP($J,"TOTALS","FMS","T",2))
S XX=$J("",41)_"QUEUED: $"_$J(YY,"",2)
D SL(.INPUT,XX)
S YY=+$G(^TMP($J,"TOTALS","FMS","T",0))
S XX=$J("",35)_"ERROR/REJECT: $"_$J(YY,"",2)
D SL(.INPUT,XX)
S YY=+$G(^TMP($J,"TOTALS","FMS","T",-1))
S XX=$J("",37)_"NOT IN FMS: $"_$J(YY,"",2)
D SL(.INPUT,XX)
D SL(.INPUT," ")
;
S YY=+$G(^TMP($J,"TOTALS","DEBIT"))
S XX=$J("",21)_"TOTAL # EFT DEBIT VOUCHERS: "_YY
D SL(.INPUT,XX)
S YY=+$G(^TMP($J,"TOTALS","DEBITA"))
S XX=$J("",27)_"TOTAL DEBIT VOUCHERS: $"_$J(YY,"",2)
D SL(.INPUT,XX)
D SL(.INPUT," ")
;
S YY=+$G(^TMP($J,"TOTALS","EFT","T"))
S XX=$J("",26)_"# EFT PAYMENT RECORDS: "_YY
D SL(.INPUT,XX)
S YY=+$G(^TMP($J,"TOTALS","MATCH","T"))
S XX=$J("",25)_"# EFT PAYMENTS MATCHED: "_YY
D SL(.INPUT,XX)
; PRCA*4.5*321 remove Matched payment amt posted
;S YY=+$G(^TMP($J,"TOTALS","DEPAP"))
;S XX=$J("",18)_"MATCHED PAYMENT AMOUNT POSTED: $"_$J(YY,"",2)
;D SL(.INPUT,XX)
D SL(.INPUT," ")
D SL(.INPUT," ")
Q
;
ASK() ; Ask to continue
; PRCA*4.5*321 changed to extrinsic function
; Input: None
; Returns: 1 if user wants to stop, 0 otherwise
I $E(IOST,1,2)'["C-" Q 0
N DIR,DIROUT,DIRUT,DTOUT,DUOUT
S DIR(0)="E" W ! D ^DIR
I ($D(DIRUT))!($D(DUOUT)) Q 1
Q 0
;
SL(INPUT,Z) ;EP from RCDPEDAR & RCDEPA2
; Writes or stores line
;
; Input: INPUT - A1^A2^A3^...^An Where:
; A1 - 1 if called from Nightly Process, 0 otherwise
; A2 - 1 if displaying to Listman, 0 otherwise
; A3 - 1 if Detail report, 0 if summary report
; A4 - Current Page Number
; A5 - Stop Flag
; A6 - Start of Date Range
; A7 - End of Date Range
; A8 - Current Line Number
; Z - Data line to write or store
; RCCT - Current line counter
; RCNJ - 1 to set array, 0 to write line
; ^TMP($J,"RCDPE_DAR") - Current array of stored lines (if RCNJ=1)
; Output: INPUT - A1^A2^A3^...^An - The following pieces may be updated
; A11 - Updated Line Number
; Output:
; ^TMP($J,"RCDPE_DAR") - Updated array of stored lines (if RCNJ=1)
N XX
S XX=$P(INPUT,"^",8)+1
S $P(INPUT,"^",8)=XX
;
; Called from nightly process
I $P(INPUT,"^",1) S ^TMP($J,"RCDPE_DAR",XX)=Z Q
W !,Z
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRCDPEDA3 18385 printed Dec 13, 2024@01:44:30 Page 2
RCDPEDA3 ;AITC/DW - ACTIVITY REPORT ;Feb 17, 2017@10:37:00
+1 ;;4.5;Accounts Receivable;**318,321,326,432**;Mar 20, 1995;Build 16
+2 ;Per VA Directive 6402, this routine should not be modified.
+3 QUIT
+4 ;
HDR(INPUT) ;EP from RCDPEDAR
+1 ; Displays report header
+2 ; Input: INPUT - A1^A2^A3^...^An Where:
+3 ; A1 - 1 if called from Nightly Process, 0 otherwise
+4 ; A2 - 1 if displaying to Listman, 0 otherwise
+5 ; A3 - 1 if Detail report, 0 if summary report
+6 ; A4 - Current Page Number
+7 ; A5 - Stop Flag
+8 ; A6 - Start of Date Range
+9 ; A7 - End of Date Range
+10 ; A9 - Current line count
+11 ; A10- 1 - Only Display EFTs with a debit flag of 'D'
+12 ; 0 - Display all EFTs
+13 ; Output: INPUT - A1^A2^A3^...^An - The following pieces may be updated
+14 ; A4 - Current Page Number
+15 ; A5 - Stop Flag
+16 ; A8 - Updated line count
+17 NEW CTR,CURPG,DETL,DONLY,DTST,DTEND,NJ,NOJUST,PLN,STOP,X,XX,Y,Z,Z0,Z1
+18 SET DETL=$PIECE(INPUT,"^",3)
+19 SET CURPG=$PIECE(INPUT,"^",4)
+20 SET STOP=$PIECE(INPUT,"^",5)
+21 ; Date Range Start
SET DTST=$PIECE(INPUT,"^",6)
+22 ; Date Range Ends
SET DTEND=$PIECE(INPUT,"^",7)
+23 ; EFTs with Debits Only ;PRCA*4.5*321 add debit logic
SET DONLY=$PIECE(INPUT,"^",10)
+24 SET NJ=$PIECE(INPUT,"^",1)
+25 if NJ&(CURPG)
QUIT
+26 IF CURPG!($EXTRACT(IOST,1,2)="C-")
Begin DoDot:1
+27 if NJ
QUIT
+28 IF CURPG
IF ($EXTRACT(IOST,1,2)="C-")
Begin DoDot:2
+29 SET STOP=$$ASK()
End DoDot:2
if STOP
QUIT
+30 ; Write form feed
WRITE @IOF
End DoDot:1
+31 IF STOP
SET $PIECE(INPUT,"^",5)=1
QUIT
+32 SET CURPG=CURPG+1
SET $PIECE(INPUT,"^",4)=CURPG
+33 ;
+34 ; PRCA276 if coming from nightly job need to define payer selection variable
+35 ; PRCA*4.5*321
IF NJ
NEW RCPAY,RCTYPE
Begin DoDot:1
+36 SET RCPAY="A"
+37 SET RCTYPE="A"
End DoDot:1
+38 ;
+39 ; PRCA276 if coming from nightly job need to define division selection variable
+40 IF NJ
NEW VAUTD
SET VAUTD=1
+41 SET Z0="EDI LOCKBOX EFT DAILY ACTIVITY "_$SELECT(DETL:"DETAIL",1:"SUMMARY")_" REPORT"
+42 SET Z=$$SETSTR^VALM1($JUSTIFY("",80-$LENGTH(Z0)\2)_Z0,"",1,79)
+43 SET Z=$$SETSTR^VALM1("Page: "_CURPG,Z,70,10)
+44 DO SL(.INPUT,Z)
+45 SET Z="RUN DATE: "_$$FMTE^XLFDT($$NOW^XLFDT(),"2Z")
SET Z=$JUSTIFY("",80-$LENGTH(Z)\2)_Z
+46 DO SL(.INPUT,Z)
+47 ;
+48 ; PRCA276 add divisions to header
+49 SET Z1=""
+50 IF 'VAUTD
Begin DoDot:1
+51 SET Z0=0
+52 FOR
Begin DoDot:2
+53 SET Z0=$ORDER(VAUTD(Z0))
+54 if 'Z0
QUIT
+55 ;Facility Number ;PRCA*4.5*321
SET XX=$$GET1^DIQ(40.8,Z0,1,"I")
+56 ;S Z1=Z1_VAUTD(Z0)_", "
+57 SET Z1=Z1_XX_", "
End DoDot:2
if 'Z0
QUIT
End DoDot:1
+58 SET Z="DIVISIONS: "_$SELECT(VAUTD:"ALL",1:$EXTRACT(Z1,1,$LENGTH(Z1)-2))
SET Z=$JUSTIFY("",80-$LENGTH(Z)\2)_Z
+59 DO SL(.INPUT,Z)
+60 ;
+61 SET NOJUST=0
+62 ; PRCA*4.5*326 - Use RCPAY for payer selection type in header, Add M/P/T filter
+63 SET Z="PAYERS: "_$SELECT(RCPAY="A":"ALL",RCPAY="R":"RANGE",1:"SELECTED")
+64 ;PRCA*4.5*432 Add CHAMPVA, 44->38
SET Z=$EXTRACT(Z_$JUSTIFY("",80),1,38)_"MEDICAL/PHARMACY/TRICARE/CHAMPVA: "
+65 ;PRCA*4.5*432 Add CHAMPVA
SET Z=Z_$SELECT(RCTYPE="M":"MEDICAL",RCTYPE="P":"PHARMACY",RCTYPE="T":"TRICARE",RCTYPE="C":"CHAMPVA",1:"ALL")
+66 ; PRCA*4.5*326 End changes.
+67 DO SL(.INPUT,Z)
+68 SET CTR=1
+69 FOR
Begin DoDot:1
+70 SET CTR=$ORDER(PLN(CTR))
+71 if CTR=""
QUIT
+72 DO SL(.INPUT,PLN(CTR))
End DoDot:1
if CTR=""
QUIT
+73 ;
+74 ; PRCA276 add date filter to header
+75 SET Z="DATE RANGE: "_$$FMTE^XLFDT(DTST,"2Z")_" - "_$$FMTE^XLFDT(DTEND,"2Z")
+76 ; PRCA*4.5*321 debit info
SET Z=Z_" (DATE DEPOSIT ADDED) DEBIT ONLY EFTs: "
+77 SET Z=Z_$SELECT(DONLY:"YES",1:"NO")
+78 SET Z=$JUSTIFY("",80-$LENGTH(Z)\2)_Z
+79 DO SL(.INPUT,Z)
+80 IF DETL
Begin DoDot:1
+81 ;
+82 ; PRCA*4.5*283 - Add 3 more spaces between DEP # and DEPOSIT DT
+83 ; and remove 3 spaces between DEPOSIT DT and DEP AMOUNT to allow for 9 digit DEP #'s
+84 DO SL(.INPUT,"")
+85 SET XX="DEP # DEPOSIT DT "_$JUSTIFY("",19)_"DEP AMOUNT FMS DEPOSIT STAT"
+86 SET Z=$$SETSTR^VALM1(XX,"",1,$LENGTH(XX))
+87 DO SL(.INPUT,Z)
+88 ;
+89 ; PRCA*4.5*318, Move entire EFT # row to left 1 space to adjust for other rows needing space
+90 ; PRCA*4.5*284, Move Match Status to left 3 space to allow for 10 digit ERA #'s
+91 ; PRCA*4.5*326 - make room and add match date
+92 SET XX=$JUSTIFY("",2)_"EFT #"_$JUSTIFY("",15)_"DATE PD PAYMENT AMOUNT ERA MATCH STATUS & DATE"
+93 SET Z=$$SETSTR^VALM1(XX,"",1,$LENGTH(XX))
+94 DO SL(.INPUT,Z)
+95 ; PRCA*4.5*318, Move entire EFT Payer Trace # row to left 6 spaces to adjust for other rows needing space
+96 SET Z=$$SETSTR^VALM1($JUSTIFY("",4)_"EFT PAYER TRACE #","",1,52)
+97 ;PRCA*4.5*318 add CR #
SET Z=$$SETSTR^VALM1("CR #",Z,59,4)
+98 DO SL(.INPUT,Z)
+99 ; PRCA*4.5*318, Move entire Payment From row to left 8 spaces to adjust
+100 ; a possible 60 character Payer Name and 20 character Payer ID
+101 SET XX=$JUSTIFY("",6)_"PAYMENT FROM"
+102 SET Z=$$SETSTR^VALM1(XX,"",1,$LENGTH(XX))
+103 DO SL(.INPUT,Z)
+104 ;PRCA*4.5*318 add TR #
SET XX=$JUSTIFY("",3)_"TR #"
+105 SET Z=$$SETSTR^VALM1(XX,"",1,$LENGTH(XX))
+106 ; TR DOC header
DO SL(.INPUT,Z)
+107 ;PRCA*4.5*321 ; PRCA*4.5*432
SET XX=$JUSTIFY("",44)_"DEP RECEIPT #"
+108 SET Z=$$SETSTR^VALM1(XX,"",1,$LENGTH(XX))
+109 SET Z=$$SETSTR^VALM1("DEP RECEIPT STATUS",Z,61,19)
+110 DO SL(.INPUT,Z)
End DoDot:1
+111 DO SL(.INPUT,$TRANSLATE($JUSTIFY("",IOM-1)," ","="))
+112 QUIT
+113 ;
TOTSDAY(INPUT) ;EP from RCDPEDAR
+1 ; Display the totals for the specified date
+2 ;
+3 ; Input: INPUT - A1^A2^A3^...^An Where:
+4 ; A1 - 1 if called from Nightly Process, 0 otherwise
+5 ; A2 - 1 if displaying to Listman, 0 otherwise
+6 ; A3 - 1 if Detail report, 0 if summary report
+7 ; A4 - Current Page Number
+8 ; A5 - Stop Flag
+9 ; A6 - Start of Date Range
+10 ; A7 - End of Date Range
+11 ; A8 - Current Line Counter
+12 ; A9 - Internal Date being processed
+13 ; ^TMP($J,"TOTALS","DEBIT") - Current Total # of debits for date range
+14 ; ^TMP($J,"TOTALS","DEBIT","D") - Total # of debits for Internal date (C1)
+15 ; ^TMP($J,"TOTALS","DEBITA") - Current Total Debit Amount for date range
+16 ; ^TMP($J,"TOTALS","DEBITA","D") - Total Debit Amount for Internal date (C1)
+17 ; ^TMP($J,"TOTALS","DEP") - Current Total # of deposits for date range
+18 ; ^TMP($J,"TOTALS","DEP",C1) - Total # of deposits for Internal date (C1)
+19 ; ^TMP($J,"TOTALS","DEPA") - Current Total Deposit Amount for date range
+20 ; ^TMP($J,"TOTALS","DEPA",C1) - Total Deposit Amount for Internal date (C1)
+21 ; ^TMP($J,"TOTALS","EFT","D") - Total Deposit Amount by EFTs for date
+22 ; ^TMP($J,"TOTALS","EFT","T") - Current Total Deposit Amount by EFTs for range
+23 ; ^TMP($J,"TOTALS","FMS") - FMS Document Status or "NO FMS DOC"
+24 ; ^TMP($J,"TOTALS","FMS","D",-1) - Total Deposit Amount by FMS Document
+25 ; ^TMP($J,"TOTALS","FMS","D",0) - Total Amount for Error/Rejected documents
+26 ; ^TMP($J,"TOTALS","FMS","D",1") - Total Amount for 'A','M',"F' or 'T' docs
+27 ; ^TMP($J,"TOTALS","FMS","D",2") - Total Amount for queued docs
+28 ; ^TMP($J,"TOTALS","FMS","T",-1) - Total Deposit Amount by FMS Document for range
+29 ; ^TMP($J,"TOTALS","FMS","T",0) - Total Amount for Error/Rejected docs for range
+30 ; ^TMP($J,"TOTALS","FMS","T",1") - Total Amount for 'A','M',"F' or 'T' docs range
+31 ; ^TMP($J,"TOTALS","FMS","T",2") - Total Amount for queued docs for range
+32 ; ^TMP($J,"TOTALS","FMSTOT") - Updated Total Deposit Amount for date range
+33 ; ^TMP($J,"TOTALS","MATCH","D") - Current Total matched EFTs for date
+34 ; ^TMP($J,"TOTALS","MATCH","T") - Current Total matched EFTs for date range
+35 ; Output: INPUT - A1^A2^A3^...^An - The following pieces may be updated
+36 ; A4 - Updated Page Number
+37 ; A5 - Stop Flag
+38 ; A8 - Updated Line Counter
+39 ; ^TMP($J,"TOTALS","DEBIT") - Updated Total # of debits for date range
+40 ; ^TMP($J,"TOTALS","DEBIT","D") - Updated Total # of debits for Internal date (C1)
+41 ; ^TMP($J,"TOTALS","DEBITA") - Updated Total Debit Amount for date range
+42 ; ^TMP($J,"TOTALS","DEBITA","D") - Updated Total Debit Amount for Internal date (C1)
+43 ; ^TMP($J,"TOTALS","DEP") - Updated Total # of deposits for date range
+44 ; ^TMP($J,"TOTALS","DEPA") - Updated Total Deposit Amount for date range
+45 ; ^TMP($J,"TOTALS","EFT","T") - Updated Total Deposit Amount by EFTs for range
+46 ; ^TMP($J,"TOTALS","FMS","T",-1) - Updated Deposit Amount by FMS Document for range
+47 ; ^TMP($J,"TOTALS","FMS","T",0) - Updated Amount for Error/Rejected docs for range
+48 ; ^TMP($J,"TOTALS","FMS","T",1") - Updated Amount for 'A','M',"F' or 'T' docs range
+49 ; ^TMP($J,"TOTALS","FMS","T",2") - Updated Amount for queued docs for range
+50 ; ^TMP($J,"TOTALS","MATCH","T") - Updated Total Matched EFTs for date range
+51 NEW CURPG,DETL,DTADD,LSTMAN,NL,Q,XX,YY
+52 ; Display to Listman flag
SET LSTMAN=$PIECE(INPUT,"^",2)
+53 ; Called from Nightly Process flag
SET NJ=$PIECE(INPUT,"^",1)
+54 ; Detail Report flag
SET DETL=$PIECE(INPUT,"^",3)
+55 ; Current Page Counter
SET CURPG=$PIECE(INPUT,"^",4)
+56 ; Date to display totals for
SET DTADD=$PIECE(INPUT,"^",9)
+57 ; Current Total Deposit Amount for date range
SET XX=$GET(^TMP($JOB,"TOTALS","DEPA"))
+58 ; Total Deposit Amount for date
SET YY=$GET(^TMP($JOB,"TOTALS","DEPA",DTADD))
+59 ; Updated Total for range
SET ^TMP($JOB,"TOTALS","DEPA")=XX+YY
+60 ; Current Total # of Deposits for date range
SET XX=$GET(^TMP($JOB,"TOTALS","DEP"))
+61 ; Total # of Deposits for date
SET YY=$GET(^TMP($JOB,"TOTALS","DEP",DTADD))
+62 ; Updated Total # for range
SET ^TMP($JOB,"TOTALS","DEP")=XX+YY
+63 ;
+64 ; Current Total Amount by EFTs for date range
SET XX=$GET(^TMP($JOB,"TOTALS","EFT","T"))
+65 ; Total Amount by EFTs for date
SET YY=$GET(^TMP($JOB,"TOTALS","EFT","D"))
+66 ; Updated Total Amount for range
SET ^TMP($JOB,"TOTALS","EFT","T")=XX+YY
+67 ;
+68 ; Current Total # Matched EFTs for date range
SET XX=$GET(^TMP($JOB,"TOTALS","MATCH","T"))
+69 ; # Matched EFTs for date
SET YY=$GET(^TMP($JOB,"TOTALS","MATCH","D"))
+70 ; Updated Total # Matched EFTs for date range
SET ^TMP($JOB,"TOTALS","MATCH","T")=XX+YY
+71 ;
+72 ; Update document status totals for range
+73 FOR Q=-1,0,1,2
Begin DoDot:1
+74 ; Current Total # of Q status for date range
SET XX=$GET(^TMP($JOB,"TOTALS","FMS","T",Q))
+75 ; # of Q status for date
SET YY=$GET(^TMP($JOB,"TOTALS","FMS","D",Q))
+76 ; Updated Total # of Q status for date range
SET ^TMP($JOB,"TOTALS","FMS","T",Q)=XX+YY
End DoDot:1
+77 ;
+78 ; daily totals
+79 ;I $S('NJ:($Y+5)>IOSL,1:0)!'CURPG D Q:$P(INPUT,"^",5)=1 ; PRCA*4.5*321 changed
+80 IF $SELECT('NJ:1,1:0)!'CURPG
Begin DoDot:1
+81 if 'LSTMAN
DO HDR(.INPUT)
End DoDot:1
if $PIECE(INPUT,"^",5)=1
QUIT
+82 SET XX=$EXTRACT("**TOTALS FOR DATE: "_$$FMTE^XLFDT(DTADD\1,"2Z")_$JUSTIFY("",30),1,30)
+83 SET YY=$GET(^TMP($JOB,"TOTALS","DEP",DTADD))
+84 SET XX=XX_" # OF DEPOSIT TICKETS RECEIVED: "_+YY_$JUSTIFY("",5)
+85 DO SL(.INPUT,XX)
+86 SET YY=$GET(^TMP($JOB,"TOTALS","DEPA",DTADD))
+87 SET XX=$JUSTIFY("",29)_"TOTAL AMOUNT OF DEPOSITS RECEIVED: $"_$JUSTIFY(YY,"",2)
+88 DO SL(.INPUT,XX)
+89 if $PIECE(INPUT,"^",5)=1
QUIT
+90 DO SL(.INPUT," ")
+91 DO SL(.INPUT,$JUSTIFY("",20)_"DEPOSIT AMOUNTS SENT TO FMS:")
+92 if $PIECE(INPUT,"^",5)=1
QUIT
+93 SET YY=+$GET(^TMP($JOB,"TOTALS","FMS","D",1))
+94 SET XX=$JUSTIFY("",39)_"ACCEPTED: $"_$JUSTIFY(YY,"",2)
+95 DO SL(.INPUT,XX)
+96 if $PIECE(INPUT,"^",5)=1
QUIT
+97 SET YY=+$GET(^TMP($JOB,"TOTALS","FMS","D",2))
+98 SET XX=$JUSTIFY("",41)_"QUEUED: $"_$JUSTIFY(YY,"",2)
+99 DO SL(.INPUT,XX)
+100 if $PIECE(INPUT,"^",5)=1
QUIT
+101 SET YY=+$GET(^TMP($JOB,"TOTALS","FMS","D",0))
+102 SET XX=$JUSTIFY("",35)_"ERROR/REJECT: $"_$JUSTIFY(YY,"",2)
+103 DO SL(.INPUT,XX)
+104 if $PIECE(INPUT,"^",5)=1
QUIT
+105 SET YY=+$GET(^TMP($JOB,"TOTALS","FMS","D",-1))
+106 SET XX=$JUSTIFY("",37)_"NOT IN FMS: $"_$JUSTIFY(YY,"",2)
+107 DO SL(.INPUT,XX)
+108 DO SL(.INPUT," ")
+109 if $PIECE(INPUT,"^",5)=1
QUIT
+110 ;
+111 ; PRCA*4.5*321 add all debit logic
+112 ; Current Total # of debit EFTs for date range
SET XX=$GET(^TMP($JOB,"TOTALS","DEBIT"))
+113 ; Total # of debit EFTs for date
SET YY=$GET(^TMP($JOB,"TOTALS","DEBIT","D"))
+114 ; Updated Total # of debit EFTs for range
SET ^TMP($JOB,"TOTALS","DEBIT")=XX+YY
+115 ; Current Total amount of debit EFTs for date range
SET XX=$GET(^TMP($JOB,"TOTALS","DEBITA"))
+116 ; Total amount of debit EFTs for date
SET YY=$GET(^TMP($JOB,"TOTALS","DEBITA","D"))
+117 ; Updated Total amount of debit EFTs for range
SET ^TMP($JOB,"TOTALS","DEBITA")=XX+YY
+118 SET YY=+$GET(^TMP($JOB,"TOTALS","DEBIT","D"))
+119 SET XX=$JUSTIFY("",27)_"# EFT DEBIT VOUCHERS: "_YY
+120 DO SL(.INPUT,XX)
+121 SET YY=+$GET(^TMP($JOB,"TOTALS","DEBITA","D"))
+122 SET XX=$JUSTIFY("",33)_"DEBIT VOUCHERS: $"_$JUSTIFY(YY,"",2)
+123 DO SL(.INPUT,XX)
+124 DO SL(.INPUT," ")
+125 ;
+126 SET YY=+$GET(^TMP($JOB,"TOTALS","EFT","D"))
+127 SET XX=$JUSTIFY("",26)_"# EFT PAYMENT RECORDS: "_YY
+128 DO SL(.INPUT,XX)
+129 if $PIECE(INPUT,"^",5)=1
QUIT
+130 SET YY=+$GET(^TMP($JOB,"TOTALS","MATCH","D"))
+131 SET XX=$JUSTIFY("",25)_"# EFT PAYMENTS MATCHED: "_YY
+132 DO SL(.INPUT,XX)
+133 if $PIECE(INPUT,"^",5)=1
QUIT
+134 ; PRCA*4.5*321 remove Matched payment amt posted
+135 ;S YY=+$G(^TMP($J,"TOTALS","DEPAP",DTADD))
+136 ;S XX=$J("",18)_"MATCHED PAYMENT AMOUNT POSTED: $"_$J(YY,"",2)
+137 ;D SL(.INPUT,XX)
+138 DO SL(.INPUT," ")
+139 QUIT
+140 ;
TOTSF(INPUT) ; EP from RCDPEDAR
+1 ; Display Final Totals
+2 ;
+3 ; Input: INPUT - A1^A2^A3^...^An Where:
+4 ; A1 - 1 if called from Nightly Process, 0 otherwise
+5 ; A2 - 1 if displaying to Listman, 0 otherwise
+6 ; A3 - 1 if Detail report, 0 if summary report
+7 ; A4 - Current Page Number
+8 ; A5 - Stop Flag
+9 ; A6 - Start of Date Range
+10 ; A7 - End of Date Range
+11 ; A8 - Current Line Counter
+12 ; A9 - Internal Date being processed
+13 ; ^TMP($J,"TOTALS","DEP") - Total # of deposits for date range
+14 ; ^TMP($J,"TOTALS","DEPA") - Total Deposit Amount for date range
+15 ; ^TMP($J,"TOTALS","EFT","T") - Total Deposit Amount by EFTs for range
+16 ; ^TMP($J,"TOTALS","FMS","T",-1) - Total Deposit Amount by FMS Document for range
+17 ; ^TMP($J,"TOTALS","FMS","T",0) - Total Amount for Error/Rejected docs for range
+18 ; ^TMP($J,"TOTALS","FMS","T",1") - Total Amount for 'A','M',"F' or 'T' docs range
+19 ; ^TMP($J,"TOTALS","FMS","T",2") - Total Amount for queued docs for range
+20 ; ^TMP($J,"TOTALS","MATCH","T") - Total Matched EFTs for date range
+21 ; Output: INPUT - A1^A2^A3^...^An - The following pieces may be updated
+22 ; A5 - Updated Page Number
+23 ; A6 - Stop Flag
+24 ; A8 - Updated Line Counter
+25 NEW LSTMAN,NJ,XX,YY
+26 SET LSTMAN=$PIECE(INPUT,"^",2)
SET NJ=$PIECE(INPUT,"^",1)
+27 ;
+28 ; header if no output was displayed and not being displayed in listman
+29 ;I '$O(^TMP("RCDAILYACT",$J,0)),'LSTMAN D HDR(.INPUT) ; PRCA*4.5*321 hdr regardless if no output
+30 IF 'LSTMAN
DO HDR(.INPUT)
+31 ;
+32 ; If user quit or (Nightly process flag AND not display to listman) - end here
+33 IF $PIECE(INPUT,"^",5)=1!(NJ&'LSTMAN)
QUIT
+34 ;D SL(.INPUT," ") ; PRCA*4.5*321 removed
+35 SET XX=$EXTRACT("**** TOTALS FOR DATE RANGE:"_$JUSTIFY("",30),1,30)
+36 SET YY=+$GET(^TMP($JOB,"TOTALS","DEP"))
+37 SET XX=XX_" # OF DEPOSIT TICKETS RECEIVED: "_YY_$JUSTIFY("",5)
+38 DO SL(.INPUT,XX)
+39 SET YY=+$GET(^TMP($JOB,"TOTALS","DEPA"))
+40 SET XX=$JUSTIFY("",29)_"TOTAL AMOUNT OF DEPOSITS RECEIVED: $"_$JUSTIFY(YY,"",2)
+41 DO SL(.INPUT,XX)
+42 DO SL(.INPUT," ")
+43 DO SL(.INPUT,$JUSTIFY("",20)_"DEPOSIT AMOUNTS SENT TO FMS:")
+44 SET YY=+$GET(^TMP($JOB,"TOTALS","FMS","T",1))
+45 SET XX=$JUSTIFY("",39)_"ACCEPTED: $"_$JUSTIFY(YY,"",2)
+46 DO SL(.INPUT,XX)
+47 SET YY=+$GET(^TMP($JOB,"TOTALS","FMS","T",2))
+48 SET XX=$JUSTIFY("",41)_"QUEUED: $"_$JUSTIFY(YY,"",2)
+49 DO SL(.INPUT,XX)
+50 SET YY=+$GET(^TMP($JOB,"TOTALS","FMS","T",0))
+51 SET XX=$JUSTIFY("",35)_"ERROR/REJECT: $"_$JUSTIFY(YY,"",2)
+52 DO SL(.INPUT,XX)
+53 SET YY=+$GET(^TMP($JOB,"TOTALS","FMS","T",-1))
+54 SET XX=$JUSTIFY("",37)_"NOT IN FMS: $"_$JUSTIFY(YY,"",2)
+55 DO SL(.INPUT,XX)
+56 DO SL(.INPUT," ")
+57 ;
+58 SET YY=+$GET(^TMP($JOB,"TOTALS","DEBIT"))
+59 SET XX=$JUSTIFY("",21)_"TOTAL # EFT DEBIT VOUCHERS: "_YY
+60 DO SL(.INPUT,XX)
+61 SET YY=+$GET(^TMP($JOB,"TOTALS","DEBITA"))
+62 SET XX=$JUSTIFY("",27)_"TOTAL DEBIT VOUCHERS: $"_$JUSTIFY(YY,"",2)
+63 DO SL(.INPUT,XX)
+64 DO SL(.INPUT," ")
+65 ;
+66 SET YY=+$GET(^TMP($JOB,"TOTALS","EFT","T"))
+67 SET XX=$JUSTIFY("",26)_"# EFT PAYMENT RECORDS: "_YY
+68 DO SL(.INPUT,XX)
+69 SET YY=+$GET(^TMP($JOB,"TOTALS","MATCH","T"))
+70 SET XX=$JUSTIFY("",25)_"# EFT PAYMENTS MATCHED: "_YY
+71 DO SL(.INPUT,XX)
+72 ; PRCA*4.5*321 remove Matched payment amt posted
+73 ;S YY=+$G(^TMP($J,"TOTALS","DEPAP"))
+74 ;S XX=$J("",18)_"MATCHED PAYMENT AMOUNT POSTED: $"_$J(YY,"",2)
+75 ;D SL(.INPUT,XX)
+76 DO SL(.INPUT," ")
+77 DO SL(.INPUT," ")
+78 QUIT
+79 ;
ASK() ; Ask to continue
+1 ; PRCA*4.5*321 changed to extrinsic function
+2 ; Input: None
+3 ; Returns: 1 if user wants to stop, 0 otherwise
+4 IF $EXTRACT(IOST,1,2)'["C-"
QUIT 0
+5 NEW DIR,DIROUT,DIRUT,DTOUT,DUOUT
+6 SET DIR(0)="E"
WRITE !
DO ^DIR
+7 IF ($DATA(DIRUT))!($DATA(DUOUT))
QUIT 1
+8 QUIT 0
+9 ;
SL(INPUT,Z) ;EP from RCDPEDAR & RCDEPA2
+1 ; Writes or stores line
+2 ;
+3 ; Input: INPUT - A1^A2^A3^...^An Where:
+4 ; A1 - 1 if called from Nightly Process, 0 otherwise
+5 ; A2 - 1 if displaying to Listman, 0 otherwise
+6 ; A3 - 1 if Detail report, 0 if summary report
+7 ; A4 - Current Page Number
+8 ; A5 - Stop Flag
+9 ; A6 - Start of Date Range
+10 ; A7 - End of Date Range
+11 ; A8 - Current Line Number
+12 ; Z - Data line to write or store
+13 ; RCCT - Current line counter
+14 ; RCNJ - 1 to set array, 0 to write line
+15 ; ^TMP($J,"RCDPE_DAR") - Current array of stored lines (if RCNJ=1)
+16 ; Output: INPUT - A1^A2^A3^...^An - The following pieces may be updated
+17 ; A11 - Updated Line Number
+18 ; Output:
+19 ; ^TMP($J,"RCDPE_DAR") - Updated array of stored lines (if RCNJ=1)
+20 NEW XX
+21 SET XX=$PIECE(INPUT,"^",8)+1
+22 SET $PIECE(INPUT,"^",8)=XX
+23 ;
+24 ; Called from nightly process
+25 IF $PIECE(INPUT,"^",1)
SET ^TMP($JOB,"RCDPE_DAR",XX)=Z
QUIT
+26 WRITE !,Z
+27 QUIT