BPSNTR01 ; AITC/MRD - NTR-Related Reports; JAN 09, 2020@08:23
;;1.0;E CLAIMS MGMT ENGINE;**27**;JUN 2004;Build 15
;;Per VA Directive 6402, this routine should not be modified.
;
Q
;
EN ;
;
N BPSCNT,BPSDATE,BPSDATESUB,BPSIEN57
N BPSQUIT,BPSTOUCH,BPSTYPE,BPSYRMO,DIR,DIRUT
;
; Display a brief description of the report.
;
W !!,"This report will display a line for each transaction"
W !,"in the month* specified. The earliest month possible is"
W !,"January, 2004."
W !," Note: The transactions will be displayed according to"
W !," the date last updated, not the date submitted."
W !
;
; Prompt user for desired month and year.
;
DATE ;
S DIR(0)="FAO^4:7^K:X'?1.2N1""/""1.2N X"
S DIR("A")="Enter a month and year (M/YY or MM/YY): "
S DIR("?")="Example values: 1/18, 01/18, 12/19."
D ^DIR
I $G(DIRUT) G QUIT
S BPSYRMO=$P(X,"/",1)
I BPSYRMO>12 W !,"Please try again",*7,! G DATE
I $L(BPSYRMO)<2 S BPSYRMO="0"_BPSYRMO
S BPSYRMO=3_$P(X,"/",2)_BPSYRMO
I BPSYRMO<30401 W !,"Please try again",*7,! G DATE
I $O(^BPSTL("AH",(BPSYRMO_"00")))="" W !,"Please try again",*7,! G DATE
;
W !
D HEADER
;
S BPSQUIT=0
S BPSCNT=0
;
; Initialize the looping variable to be the 0th day of the month
; selected by the user.
;
S BPSDATE=BPSYRMO_"00"
F S BPSDATE=$O(^BPSTL("AH",BPSDATE)) Q:'BPSDATE Q:$E(BPSDATE,1,5)>BPSYRMO D Q:BPSQUIT
. S BPSIEN57=0
. F S BPSIEN57=$O(^BPSTL("AH",BPSDATE,BPSIEN57)) Q:'BPSIEN57 D Q:BPSQUIT
. . ;
. . ; Skip if non-billable; skip if the Submit Date is earlier than
. . ; the first day of the selected month.
. . ;
. . I $$GET1^DIQ(9002313.57,BPSIEN57,19,"I")="N" Q
. . I $$GET1^DIQ(9002313.57,BPSIEN57,6,"I")<(BPSYRMO_"01") Q
. . ;
. . W !,$$GET1^DIQ(9002313.57,BPSIEN57,1.11,"E") ; Rx#
. . W "/",$$GET1^DIQ(9002313.57,BPSIEN57,9,"E") ; Fill#
. . ;
. . W ?11,$$FMTE^XLFDT(BPSDATE,"2D") ; Date Last Update
. . S BPSDATESUB=$$GET1^DIQ(9002313.57,BPSIEN57,6,"I")
. . W ?20,$$FMTE^XLFDT(BPSDATESUB,"2D") ; Submit Date
. . ;
. . W ?29,$$GET1^DIQ(9002313.57,BPSIEN57,1201) ; RX Action (BWHERE)
. . ;
. . S BPSTOUCH=$$TOUCHED^BPSUTIL(BPSIEN57)
. . W ?34,$S(BPSTOUCH:"Manual",1:"No-Touch") ; Touched?
. . ;
. . S BPSTYPE=$$TYPE(BPSIEN57)
. . W ?43,$E(BPSTYPE,1,10) ; Transaction Type
. . ;
. . W ?54,$E($$GET1^DIQ(9002313.57,BPSIEN57,5,"E"),1,15) ; Patient Name
. . ;
. . W ?71,BPSIEN57 ; Transaction IEN
. . ;
. . S BPSCNT=BPSCNT+1
. . I BPSCNT#22=0 D
. . . N DIR,DIRUT
. . . S DIR(0)="E"
. . . D ^DIR
. . . I $G(DIRUT) S BPSQUIT=1 Q
. . . D HEADER
. . . Q
. . Q
. Q
;
W !
G DATE
;
QUIT ;
;
Q
;
;
W !,"Rx#/Fill",?10,"Last Updt",?20,"SubmitDt",?29,"Actn",?34,"Touched?"
W ?44,"Type",?54,"Patient",?64,"Transaction IEN"
;
Q
;
TALLY ;
;
N BPSDATE,BPSENDDATE,BPSIEN57,BPSSTARTDATE,BPSSUBMIT,BPSTOTALS
N BPSYRMO,DIR,DIRUT,X,Y
;
S BPSTOTALS=""
;
; Prompt user for desired year.
;
W !!,"This report will display counts of transactions for"
W !,"each month in fiscal year specified, with sub-totals"
W !,"by transaction type and by no-touch vs manual."
W !
S DIR(0)="NAO^2008:2036"
S DIR("A")="Enter a year: "
D ^DIR
I $G(DIRUT) Q
;
; Determine the range of months to be included. Since we wish to
; display a year's worth according to fiscal year, the starting
; month will be October of the previous year, and the ending month
; will be September of the year selected.
;
S Y=Y-1700
S BPSSTARTDATE=(Y-1)_10
S BPSENDDATE=Y_"09"
;
; Loop through all transactions from the start date to today. All
; transactions with a Submit Date in the fiscal year selected by
; the user will be counted.
;
S BPSDATE=BPSSTARTDATE_"00"
F S BPSDATE=$O(^BPSTL("AH",BPSDATE)) Q:'BPSDATE D
. ;
. S BPSIEN57=0
. F S BPSIEN57=$O(^BPSTL("AH",BPSDATE,BPSIEN57)) Q:'BPSIEN57 D
. . ;
. . ; Skip if non-billable.
. . ;
. . I $$GET1^DIQ(9002313.57,BPSIEN57,19,"I")="N" Q
. . ;
. . ; Skip if Submit Date is not in the selected fiscal year.
. . ;
. . S BPSSUBMIT=$$GET1^DIQ(9002313.57,BPSIEN57,6,"I")
. . S BPSSUBMIT=$E(BPSSUBMIT,1,5)
. . I BPSSUBMIT<BPSSTARTDATE Q
. . I BPSSUBMIT>BPSENDDATE Q
. . ;
. . ; Add this transaction to the totals.
. . ;
. . D COUNT(BPSIEN57,BPSSUBMIT,.BPSTOTALS)
. . ;
. . Q
. Q
;
F BPSYRMO=BPSSTARTDATE:1:BPSENDDATE D
. I $E(BPSYRMO,4,5)=13 S BPSYRMO=($E(BPSYRMO,1,3)+1)_"01"
. ;
. ; Write the results for this month.
. ;
. D DISPLAY(BPSYRMO,.BPSTOTALS)
. ;
. Q
;
W !
N DIR
S DIR(0)="E"
D ^DIR
;
Q
;
COUNT(BPSIEN57,BPSSUBMIT,BPSTOTALS) ; Add one transaction to the totals.
;
; For the given transactions, this procedure will determine a count of the
; number of transactions of each type (payable, rejected, duplicate,
; captured, accepted, reversal, eligibility, completed) and manual
; vs no-touch.
;
; Input:
; BPSIEN57 is a pointer to 9002313.57, BPS LOG OF TRANSACTIONS.
; BPSSUBMIT is a year+month portion of the Submit Date for the
; transaction passed in (e.g. 31912 = December 2019).
; Output:
; BPSTOTALS is passed by reference. The format returned is:
; BPSTOTALS(YearMonth) = total transactions for that month
; BPSTOTALS(YearMonth,1,Type) = count for a given type
; BPSTOTALS(YearMonth,1,Type,Touched) = count of
; transactions with a given type + manual/no-touch
; BPSTOTALS(YearMonth,2,Touched) = count for manual/no-touch
;
N BPSTOUCHED,BPSTYPE
;
S BPSTYPE=$$TYPE(BPSIEN57)
;
S BPSTOUCHED=$$TOUCHED^BPSUTIL(BPSIEN57)
I BPSTOUCHED=1 S BPSTOUCHED="Manual"
E S BPSTOUCHED="No-Touch"
;
S BPSTOTALS(BPSSUBMIT)=$G(BPSTOTALS(BPSSUBMIT))+1
S BPSTOTALS(BPSSUBMIT,1,BPSTYPE)=$G(BPSTOTALS(BPSSUBMIT,1,BPSTYPE))+1
S BPSTOTALS(BPSSUBMIT,1,BPSTYPE,BPSTOUCHED)=$G(BPSTOTALS(BPSSUBMIT,1,BPSTYPE,BPSTOUCHED))+1
S BPSTOTALS(BPSSUBMIT,2,BPSTOUCHED)=$G(BPSTOTALS(BPSSUBMIT,2,BPSTOUCHED))+1
;
Q
;
DISPLAY(BPSYRMO,BPSTOTALS) ; Write the results for one month.
;
W !!,$E(BPSYRMO,1,3)+1700,"/",$E(BPSYRMO,4,5)
W ?11,"Payable",?20,"Rejected",?30,"Duplicate",?41,"Captured",?51,"Reversal",?61,"Unstranded",?73,"Total"
;
W !," Manual"
W ?11,$J(+$G(BPSTOTALS(BPSYRMO,1,"Payable","Manual")),7)
W ?20,$J(+$G(BPSTOTALS(BPSYRMO,1,"Rejected","Manual")),8)
W ?30,$J(+$G(BPSTOTALS(BPSYRMO,1,"Duplicate","Manual")),9)
W ?41,$J(+$G(BPSTOTALS(BPSYRMO,1,"Captured","Manual")),8)
W ?51,$J(+$G(BPSTOTALS(BPSYRMO,1,"Reversal","Manual")),8)
W ?61,$J(+$G(BPSTOTALS(BPSYRMO,1,"Unstranded","Manual")),10)
W ?73,$J(+$G(BPSTOTALS(BPSYRMO,2,"Manual")),5)
;
W !,"No-Touch"
W ?11,$J(+$G(BPSTOTALS(BPSYRMO,1,"Payable","No-Touch")),7)
W ?20,$J(+$G(BPSTOTALS(BPSYRMO,1,"Rejected","No-Touch")),8)
W ?30,$J(+$G(BPSTOTALS(BPSYRMO,1,"Duplicate","No-Touch")),9)
W ?41,$J(+$G(BPSTOTALS(BPSYRMO,1,"Captured","No-Touch")),8)
W ?51,$J(+$G(BPSTOTALS(BPSYRMO,1,"Reversal","No-Touch")),8)
W ?61,$J(+$G(BPSTOTALS(BPSYRMO,1,"Unstranded","No-Touch")),10)
W ?73,$J(+$G(BPSTOTALS(BPSYRMO,2,"No-Touch")),5)
;
W !," Totals"
W ?11,$J(+$G(BPSTOTALS(BPSYRMO,1,"Payable")),7)
W ?20,$J(+$G(BPSTOTALS(BPSYRMO,1,"Rejected")),8)
W ?30,$J(+$G(BPSTOTALS(BPSYRMO,1,"Duplicate")),9)
W ?41,$J(+$G(BPSTOTALS(BPSYRMO,1,"Captured")),8)
W ?51,$J(+$G(BPSTOTALS(BPSYRMO,1,"Reversal")),8)
W ?61,$J(+$G(BPSTOTALS(BPSYRMO,1,"Unstranded")),10)
W ?73,$J(+$G(BPSTOTALS(BPSYRMO)),5)
;
Q
;
TYPE(BPSIEN57) ; Determine the type of this transaction.
;
N BPSSTATUS
;
S BPSSTATUS=$$GET1^DIQ(9002313.57,BPSIEN57,4.0098)
;
I BPSSTATUS="E CAPTURED" Q "Captured"
I BPSSTATUS="E DUPLICATE" Q "Duplicate"
I BPSSTATUS="E PAYABLE" Q "Payable"
I BPSSTATUS="E REJECTED" Q "Rejected"
I BPSSTATUS["REVERSAL" Q "Reversal"
I BPSSTATUS="E UNSTRANDED" Q "Unstranded"
;
Q "Other"
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HBPSNTR01 7974 printed Nov 22, 2024@17:01:34 Page 2
BPSNTR01 ; AITC/MRD - NTR-Related Reports; JAN 09, 2020@08:23
+1 ;;1.0;E CLAIMS MGMT ENGINE;**27**;JUN 2004;Build 15
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 QUIT
+5 ;
EN ;
+1 ;
+2 NEW BPSCNT,BPSDATE,BPSDATESUB,BPSIEN57
+3 NEW BPSQUIT,BPSTOUCH,BPSTYPE,BPSYRMO,DIR,DIRUT
+4 ;
+5 ; Display a brief description of the report.
+6 ;
+7 WRITE !!,"This report will display a line for each transaction"
+8 WRITE !,"in the month* specified. The earliest month possible is"
+9 WRITE !,"January, 2004."
+10 WRITE !," Note: The transactions will be displayed according to"
+11 WRITE !," the date last updated, not the date submitted."
+12 WRITE !
+13 ;
+14 ; Prompt user for desired month and year.
+15 ;
DATE ;
+1 SET DIR(0)="FAO^4:7^K:X'?1.2N1""/""1.2N X"
+2 SET DIR("A")="Enter a month and year (M/YY or MM/YY): "
+3 SET DIR("?")="Example values: 1/18, 01/18, 12/19."
+4 DO ^DIR
+5 IF $GET(DIRUT)
GOTO QUIT
+6 SET BPSYRMO=$PIECE(X,"/",1)
+7 IF BPSYRMO>12
WRITE !,"Please try again",*7,!
GOTO DATE
+8 IF $LENGTH(BPSYRMO)<2
SET BPSYRMO="0"_BPSYRMO
+9 SET BPSYRMO=3_$PIECE(X,"/",2)_BPSYRMO
+10 IF BPSYRMO<30401
WRITE !,"Please try again",*7,!
GOTO DATE
+11 IF $ORDER(^BPSTL("AH",(BPSYRMO_"00")))=""
WRITE !,"Please try again",*7,!
GOTO DATE
+12 ;
+13 WRITE !
+14 DO HEADER
+15 ;
+16 SET BPSQUIT=0
+17 SET BPSCNT=0
+18 ;
+19 ; Initialize the looping variable to be the 0th day of the month
+20 ; selected by the user.
+21 ;
+22 SET BPSDATE=BPSYRMO_"00"
+23 FOR
SET BPSDATE=$ORDER(^BPSTL("AH",BPSDATE))
if 'BPSDATE
QUIT
if $EXTRACT(BPSDATE,1,5)>BPSYRMO
QUIT
Begin DoDot:1
+24 SET BPSIEN57=0
+25 FOR
SET BPSIEN57=$ORDER(^BPSTL("AH",BPSDATE,BPSIEN57))
if 'BPSIEN57
QUIT
Begin DoDot:2
+26 ;
+27 ; Skip if non-billable; skip if the Submit Date is earlier than
+28 ; the first day of the selected month.
+29 ;
+30 IF $$GET1^DIQ(9002313.57,BPSIEN57,19,"I")="N"
QUIT
+31 IF $$GET1^DIQ(9002313.57,BPSIEN57,6,"I")<(BPSYRMO_"01")
QUIT
+32 ;
+33 ; Rx#
WRITE !,$$GET1^DIQ(9002313.57,BPSIEN57,1.11,"E")
+34 ; Fill#
WRITE "/",$$GET1^DIQ(9002313.57,BPSIEN57,9,"E")
+35 ;
+36 ; Date Last Update
WRITE ?11,$$FMTE^XLFDT(BPSDATE,"2D")
+37 SET BPSDATESUB=$$GET1^DIQ(9002313.57,BPSIEN57,6,"I")
+38 ; Submit Date
WRITE ?20,$$FMTE^XLFDT(BPSDATESUB,"2D")
+39 ;
+40 ; RX Action (BWHERE)
WRITE ?29,$$GET1^DIQ(9002313.57,BPSIEN57,1201)
+41 ;
+42 SET BPSTOUCH=$$TOUCHED^BPSUTIL(BPSIEN57)
+43 ; Touched?
WRITE ?34,$SELECT(BPSTOUCH:"Manual",1:"No-Touch")
+44 ;
+45 SET BPSTYPE=$$TYPE(BPSIEN57)
+46 ; Transaction Type
WRITE ?43,$EXTRACT(BPSTYPE,1,10)
+47 ;
+48 ; Patient Name
WRITE ?54,$EXTRACT($$GET1^DIQ(9002313.57,BPSIEN57,5,"E"),1,15)
+49 ;
+50 ; Transaction IEN
WRITE ?71,BPSIEN57
+51 ;
+52 SET BPSCNT=BPSCNT+1
+53 IF BPSCNT#22=0
Begin DoDot:3
+54 NEW DIR,DIRUT
+55 SET DIR(0)="E"
+56 DO ^DIR
+57 IF $GET(DIRUT)
SET BPSQUIT=1
QUIT
+58 DO HEADER
+59 QUIT
End DoDot:3
+60 QUIT
End DoDot:2
if BPSQUIT
QUIT
+61 QUIT
End DoDot:1
if BPSQUIT
QUIT
+62 ;
+63 WRITE !
+64 GOTO DATE
+65 ;
QUIT ;
+1 ;
+2 QUIT
+3 ;
+1 ;
+2 WRITE !,"Rx#/Fill",?10,"Last Updt",?20,"SubmitDt",?29,"Actn",?34,"Touched?"
+3 WRITE ?44,"Type",?54,"Patient",?64,"Transaction IEN"
+4 ;
+5 QUIT
+6 ;
TALLY ;
+1 ;
+2 NEW BPSDATE,BPSENDDATE,BPSIEN57,BPSSTARTDATE,BPSSUBMIT,BPSTOTALS
+3 NEW BPSYRMO,DIR,DIRUT,X,Y
+4 ;
+5 SET BPSTOTALS=""
+6 ;
+7 ; Prompt user for desired year.
+8 ;
+9 WRITE !!,"This report will display counts of transactions for"
+10 WRITE !,"each month in fiscal year specified, with sub-totals"
+11 WRITE !,"by transaction type and by no-touch vs manual."
+12 WRITE !
+13 SET DIR(0)="NAO^2008:2036"
+14 SET DIR("A")="Enter a year: "
+15 DO ^DIR
+16 IF $GET(DIRUT)
QUIT
+17 ;
+18 ; Determine the range of months to be included. Since we wish to
+19 ; display a year's worth according to fiscal year, the starting
+20 ; month will be October of the previous year, and the ending month
+21 ; will be September of the year selected.
+22 ;
+23 SET Y=Y-1700
+24 SET BPSSTARTDATE=(Y-1)_10
+25 SET BPSENDDATE=Y_"09"
+26 ;
+27 ; Loop through all transactions from the start date to today. All
+28 ; transactions with a Submit Date in the fiscal year selected by
+29 ; the user will be counted.
+30 ;
+31 SET BPSDATE=BPSSTARTDATE_"00"
+32 FOR
SET BPSDATE=$ORDER(^BPSTL("AH",BPSDATE))
if 'BPSDATE
QUIT
Begin DoDot:1
+33 ;
+34 SET BPSIEN57=0
+35 FOR
SET BPSIEN57=$ORDER(^BPSTL("AH",BPSDATE,BPSIEN57))
if 'BPSIEN57
QUIT
Begin DoDot:2
+36 ;
+37 ; Skip if non-billable.
+38 ;
+39 IF $$GET1^DIQ(9002313.57,BPSIEN57,19,"I")="N"
QUIT
+40 ;
+41 ; Skip if Submit Date is not in the selected fiscal year.
+42 ;
+43 SET BPSSUBMIT=$$GET1^DIQ(9002313.57,BPSIEN57,6,"I")
+44 SET BPSSUBMIT=$EXTRACT(BPSSUBMIT,1,5)
+45 IF BPSSUBMIT<BPSSTARTDATE
QUIT
+46 IF BPSSUBMIT>BPSENDDATE
QUIT
+47 ;
+48 ; Add this transaction to the totals.
+49 ;
+50 DO COUNT(BPSIEN57,BPSSUBMIT,.BPSTOTALS)
+51 ;
+52 QUIT
End DoDot:2
+53 QUIT
End DoDot:1
+54 ;
+55 FOR BPSYRMO=BPSSTARTDATE:1:BPSENDDATE
Begin DoDot:1
+56 IF $EXTRACT(BPSYRMO,4,5)=13
SET BPSYRMO=($EXTRACT(BPSYRMO,1,3)+1)_"01"
+57 ;
+58 ; Write the results for this month.
+59 ;
+60 DO DISPLAY(BPSYRMO,.BPSTOTALS)
+61 ;
+62 QUIT
End DoDot:1
+63 ;
+64 WRITE !
+65 NEW DIR
+66 SET DIR(0)="E"
+67 DO ^DIR
+68 ;
+69 QUIT
+70 ;
COUNT(BPSIEN57,BPSSUBMIT,BPSTOTALS) ; Add one transaction to the totals.
+1 ;
+2 ; For the given transactions, this procedure will determine a count of the
+3 ; number of transactions of each type (payable, rejected, duplicate,
+4 ; captured, accepted, reversal, eligibility, completed) and manual
+5 ; vs no-touch.
+6 ;
+7 ; Input:
+8 ; BPSIEN57 is a pointer to 9002313.57, BPS LOG OF TRANSACTIONS.
+9 ; BPSSUBMIT is a year+month portion of the Submit Date for the
+10 ; transaction passed in (e.g. 31912 = December 2019).
+11 ; Output:
+12 ; BPSTOTALS is passed by reference. The format returned is:
+13 ; BPSTOTALS(YearMonth) = total transactions for that month
+14 ; BPSTOTALS(YearMonth,1,Type) = count for a given type
+15 ; BPSTOTALS(YearMonth,1,Type,Touched) = count of
+16 ; transactions with a given type + manual/no-touch
+17 ; BPSTOTALS(YearMonth,2,Touched) = count for manual/no-touch
+18 ;
+19 NEW BPSTOUCHED,BPSTYPE
+20 ;
+21 SET BPSTYPE=$$TYPE(BPSIEN57)
+22 ;
+23 SET BPSTOUCHED=$$TOUCHED^BPSUTIL(BPSIEN57)
+24 IF BPSTOUCHED=1
SET BPSTOUCHED="Manual"
+25 IF '$TEST
SET BPSTOUCHED="No-Touch"
+26 ;
+27 SET BPSTOTALS(BPSSUBMIT)=$GET(BPSTOTALS(BPSSUBMIT))+1
+28 SET BPSTOTALS(BPSSUBMIT,1,BPSTYPE)=$GET(BPSTOTALS(BPSSUBMIT,1,BPSTYPE))+1
+29 SET BPSTOTALS(BPSSUBMIT,1,BPSTYPE,BPSTOUCHED)=$GET(BPSTOTALS(BPSSUBMIT,1,BPSTYPE,BPSTOUCHED))+1
+30 SET BPSTOTALS(BPSSUBMIT,2,BPSTOUCHED)=$GET(BPSTOTALS(BPSSUBMIT,2,BPSTOUCHED))+1
+31 ;
+32 QUIT
+33 ;
DISPLAY(BPSYRMO,BPSTOTALS) ; Write the results for one month.
+1 ;
+2 WRITE !!,$EXTRACT(BPSYRMO,1,3)+1700,"/",$EXTRACT(BPSYRMO,4,5)
+3 WRITE ?11,"Payable",?20,"Rejected",?30,"Duplicate",?41,"Captured",?51,"Reversal",?61,"Unstranded",?73,"Total"
+4 ;
+5 WRITE !," Manual"
+6 WRITE ?11,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Payable","Manual")),7)
+7 WRITE ?20,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Rejected","Manual")),8)
+8 WRITE ?30,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Duplicate","Manual")),9)
+9 WRITE ?41,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Captured","Manual")),8)
+10 WRITE ?51,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Reversal","Manual")),8)
+11 WRITE ?61,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Unstranded","Manual")),10)
+12 WRITE ?73,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,2,"Manual")),5)
+13 ;
+14 WRITE !,"No-Touch"
+15 WRITE ?11,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Payable","No-Touch")),7)
+16 WRITE ?20,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Rejected","No-Touch")),8)
+17 WRITE ?30,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Duplicate","No-Touch")),9)
+18 WRITE ?41,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Captured","No-Touch")),8)
+19 WRITE ?51,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Reversal","No-Touch")),8)
+20 WRITE ?61,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Unstranded","No-Touch")),10)
+21 WRITE ?73,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,2,"No-Touch")),5)
+22 ;
+23 WRITE !," Totals"
+24 WRITE ?11,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Payable")),7)
+25 WRITE ?20,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Rejected")),8)
+26 WRITE ?30,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Duplicate")),9)
+27 WRITE ?41,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Captured")),8)
+28 WRITE ?51,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Reversal")),8)
+29 WRITE ?61,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO,1,"Unstranded")),10)
+30 WRITE ?73,$JUSTIFY(+$GET(BPSTOTALS(BPSYRMO)),5)
+31 ;
+32 QUIT
+33 ;
TYPE(BPSIEN57) ; Determine the type of this transaction.
+1 ;
+2 NEW BPSSTATUS
+3 ;
+4 SET BPSSTATUS=$$GET1^DIQ(9002313.57,BPSIEN57,4.0098)
+5 ;
+6 IF BPSSTATUS="E CAPTURED"
QUIT "Captured"
+7 IF BPSSTATUS="E DUPLICATE"
QUIT "Duplicate"
+8 IF BPSSTATUS="E PAYABLE"
QUIT "Payable"
+9 IF BPSSTATUS="E REJECTED"
QUIT "Rejected"
+10 IF BPSSTATUS["REVERSAL"
QUIT "Reversal"
+11 IF BPSSTATUS="E UNSTRANDED"
QUIT "Unstranded"
+12 ;
+13 QUIT "Other"
+14 ;