FBUCLET2 ;WOIFO/SAB - UNAUTHORIZED CLAIM LETTER (continued) ;08/15/02
;;3.5;FEE BASIS;**38,46,69**;JAN 30, 1995
;;Per VHA Directive 10-93-142, this routine should not be modified.
Q
AUTHPR ;print authorized dates and approved amounts on disposition letter
;INPUT: FBDA = ien of unauthorized claim, file 162.7
; FBORDER = (optional) order number of status
; FBUCA = current (after) zero node of unauthorized claim (162.7)
; FBUC = unauthorized claim node in parameter file
; FBCC = flag, true if CC address should print at bottom of page
; FBCCI = # used to determine where CC address prints
;OUTPUT: FBTAMT = total amount approved
; FBCC value may be changed
N DA,FBAMT,FBCPT,FBDOS,FBFILE,FBIENS,FBMOD,FBMODLE,FBSC,FBSCA
N FBSCCOL,FBUCPAY,FBX,FBY,FBACRR,FBADJLR,FBFPPSC,FBSCID,FBFPPSL,FBJ
;
; get list of payments for the claim
S FBX=$$PAYST^FBUCUTL(FBDA,"FBUCPAY")
; get fpps claim id
S FBFPPSC=$P($G(^FB583(FBDA,5)),U)
S FBSCID=""
;
; loop thru payments to get total amount approved and suspend code list
S FBTAMT=0
F FBFILE=162.03,162.11,162.5 D
. S FBIENS="" F S FBIENS=$O(FBUCPAY(FBDA,FBFILE,FBIENS)) Q:FBIENS="" D
. . I FBFILE=162.03 D
. . . S FBAMT=$$GET1^DIQ(FBFILE,FBIENS,2)
. . . Q:FBSCID]""
. . . S FBSCID=$$GET1^DIQ(FBFILE,FBIENS,49)
. . I FBFILE=162.11 D
. . . S FBAMT=$$GET1^DIQ(FBFILE,FBIENS,6.5)
. . I FBFILE=162.5 D
. . . S FBAMT=$$GET1^DIQ(FBFILE,FBIENS,8)
. . . Q:FBSCID]""
. . . S FBSCID=$$GET1^DIQ(FBFILE,FBIENS,55) ; patient control number
. . S FBTAMT=FBTAMT+FBAMT
;
; print authorized dates and total amount
I $Y+$S(FBCC:FBCCI,1:8)>IOSL D PAGE^FBUCLET1
W !?8,"Authorized from: ",$$FMTE^XLFDT($P(FBUCA,U,13))
W " Authorized to: ",$$FMTE^XLFDT($P(FBUCA,U,14))
W !?8,"Amount approved: " W:FBTAMT "$",$FN(FBTAMT,",",2)
W " Itemized list follows:"
;
; print header and detail lines for civil hospital payments
I $D(FBUCPAY(FBDA,162.5)) D
. I $Y+$S(FBCC:FBCCI,1:7)>IOSL D PAGE^FBUCLET1
. W !!?8,"Patient Control Number: ",FBSCID
. I $Y+$S(FBCC:FBCCI,1:11)>IOSL D PAGE^FBUCLET1
. D CHDHD
. S FBIENS=""
. F S FBIENS=$O(FBUCPAY(FBDA,162.5,FBIENS)) Q:FBIENS="" D CHD
;
; print header and detail lines for outpatient/ancillary payments
I $D(FBUCPAY(FBDA,162.03)) D
. I $Y+$S(FBCC:FBCCI,1:7)>IOSL D PAGE^FBUCLET1
. W !!?8,"Patient Account Number: ",FBSCID
. I $Y+$S(FBCC:FBCCI,1:11)>IOSL D PAGE^FBUCLET1
. D ODHD
. S FBIENS=""
. F S FBIENS=$O(FBUCPAY(FBDA,162.03,FBIENS)) Q:FBIENS="" D OD
;
; print header and detail lines for pharmacy payments
I $D(FBUCPAY(FBDA,162.11)) D
. I $Y+$S(FBCC:FBCCI,1:11)>IOSL D PAGE^FBUCLET1
. D PDHD
. S FBIENS=""
. F S FBIENS=$O(FBUCPAY(FBDA,162.11,FBIENS)) Q:FBIENS="" D PD
;
;set FBSCCOL flag to indicate if the suspend code column should be used
; = 1 or 0 (1 if there are any suspend codes beside "4 Other")
S FBSCCOL=0
S FBSC="" F S FBSC=$O(FBSCA(FBSC)) Q:FBSC="" I FBSC'=4 S FBSCCOL=1 Q
;
; print relevant suspend code descriptions
I FBSCCOL D
. N FBGL,FBLBL
. I $Y+$S(FBCC:FBCCI,1:10)>IOSL D PAGE^FBUCLET1
. W !!?8,"*Reason(s) for Suspension"
. S FBSC="" F S FBSC=$O(FBSCA(FBSC)) Q:FBSC="" D
. . I FBSC="4" D Q
. . . W !?8,"(4) Other. Specific reason immediately follows item."
. . ; print description of suspend code from file when not "Other"
. . S FBGL="^FBAA(161.27,"
. . S FBLBL="("_FBSC_") "
. . S DA=$O(^FBAA(161.27,"B",FBSC,0))
. . I $Y+$S(FBCC:FBCCI,1:9)>IOSL D PAGE^FBUCLET1
. . D TXT^FBUCUTL2(FBGL,DA,1,"WC69I8",1,1,.FBCC,FBCCI,FBLBL)
;
W !
D ACT:$D(FBACRR) K FBACRR
Q
;
ACT ; print table of adjustment reason descriptions
; Input
; FBACRR( - required, array
; FBACRR(FBADJRE)=""
; where FBADJRE = adjustment reason code, external value
N FBADJRE,FBI,X,FBACT
I $Y+$S(FBCC:FBCCI,1:10)>IOSL D PAGE^FBUCLET1
W !,?8,"*Adjustment Code Text:"
S FBADJRE="" F S FBADJRE=$O(FBACRR(FBADJRE)) Q:FBADJRE="" D
. ; get description of code in FBACT
. I $$AR^FBUTL1(,FBADJRE,,"FBACT")<0 Q ; quit if error
. ; print code and description
. K ^UTILITY($J,"W")
. S DIWL=1,DIWF="WC79I8"
. ; include code in output
. I $Y+$S(FBCC:FBCCI,1:9)>IOSL D PAGE^FBUCLET1
. S X=$$LJ^XLFSTR("("_FBADJRE_")",6," ") D ^DIWP
. S DIWF="WC79I14"
. ; include description in output
. S FBI=0 F S FBI=$O(FBACT(FBI)) Q:FBI="" S X=FBACT(FBI) I X]"" D ^DIWP
. D ^DIWW
Q
;
CHDHD ; civil hospital payment detail header
W !!?8,"Admission Date",?24,"Discharge Date"
W ?40,"Amt Claimed",?53,"Amt Approved"
W ?67,"Adj Code*"
W !?8,"--------------",?24,"--------------"
W ?40,"-----------",?53,"------------"
W ?67,"--------"
Q
CHD ; civil hospital payment detail
S FBSC=""
S DA=$P(FBIENS,",")
S FBY=$G(^FBAAI(DA,0))
S FBFPPSL=$P($G(^FBAAI(DA,3)),U,2) ; fpps line item
S FBADJLR=$P($$ADJLRA^FBCHFA(DA_","),U)
S:FBADJLR]"" FBACRR(FBADJLR)=""
I $Y+$S(FBCC:FBCCI,1:10)>IOSL D PAGE^FBUCLET1,CHDHD
W !!?8,$$FMTE^XLFDT($P(FBY,U,6)),?24,$$FMTE^XLFDT($P(FBY,U,7))
W ?40,$J("$"_$FN($P(FBY,U,8),",",2),11)
W ?53,$J("$"_$FN($P(FBY,U,9),",",2),12)
S:FBADJLR="" FBSC=$$GET1^DIQ(162.5,FBIENS,10)
S:FBSC]"" FBSCA(FBSC)=""
W ?70,$S(FBADJLR]"":FBADJLR,1:FBSC)
I FBFPPSC]"" W !,?8,"FPPS Claim ID: ",FBFPPSC,?36,"FPPS Line Item: ",FBFPPSL
; if "Other" suspend code then print description
I FBSC="4" D
. N FBGL,FBLBL
. S FBGL="^FBAAI("
. S FBLBL="Reason for Suspension: "
. D:$Y+$S(FBCC:FBCCI,1:9)>IOSL PAGE^FBUCLET1
. D TXT^FBUCUTL2(FBGL,DA,1,"WC69I10",1,1,.FBCC,FBCCI,FBLBL)
Q
ODHD ; outpatient/ancillary payment header
W !!?8,"Service Date",?22,"CPT-MOD"
W ?40,"Amt Claimed",?53,"Amt Approved"
W ?67,"Adj Code*"
W !?8,"------------",?22,"--------"
W ?40,"-----------",?53,"------------"
W ?67,"--------"
Q
;
OD ; outpatient/ancillary payment detail
N FBADJRE
S FBSC=""
S DA=$P(FBIENS,",")
S DA(1)=$P(FBIENS,",",2)
S DA(2)=$P(FBIENS,",",3)
S DA(3)=$P(FBIENS,",",4)
S FBY=$G(^FBAAC(DA(3),1,DA(2),1,DA(1),1,DA,0))
S FBFPPSL=$P($G(^FBAAC(DA(3),1,DA(2),1,DA(1),1,DA,3)),U,2)
S FBADJLR=$P($$ADJLRA^FBAAFA(DA_","_DA(1)_","_DA(2)_","_DA(3)_","),U)
F FBJ=1:1 S FBADJRE=$P(FBADJLR,",",FBJ) Q:FBADJRE="" S FBACRR(FBADJRE)=""
S FBDOS=$P($G(^FBAAC(DA(3),1,DA(2),1,DA(1),0)),U)
S FBCPT=$$GET1^DIQ(162.03,FBIENS,.01)
S FBMODLE=$$MODL^FBAAUTL4("^FBAAC("_DA(3)_",1,"_DA(2)_",1,"_DA(1)_",1,"_DA_",""M"")","E")
I $Y+$S(FBCC:FBCCI,1:10)>IOSL D PAGE^FBUCLET1,ODHD
W !!?8,$$FMTE^XLFDT(FBDOS)
W ?22,FBCPT_$S($G(FBMODLE)]"":"-"_$P(FBMODLE,","),1:"")
W ?40,$J("$"_$FN($P(FBY,U,2),",",2),11)
W ?53,$J("$"_$FN($P(FBY,U,3),",",2),12)
S:FBADJLR="" FBSC=$$GET1^DIQ(162.03,FBIENS,4)
S:FBSC]"" FBSCA(FBSC)=""
W ?70,$S(FBADJLR]"":FBADJLR,1:FBSC)
I $P($G(FBMODLE),",",2)]"" D
. N FBI
. F FBI=2:1 S FBMOD=$P(FBMODLE,",",FBI) Q:FBMOD="" D
. . ;I $Y+4>IOSL W @IOF D HED W !," (continued)"
. . W !,?27,"-",FBMOD
I FBFPPSC]"" W !,?8,"FPPS Claim ID: ",FBFPPSC,?36,"FPPS Line Item: ",FBFPPSL
; if "Other" suspend code then print description
I FBSC="4" D
. N FBGL,FBLBL
. S FBGL="^FBAAC("_DA(3)_",1,"_DA(2)_",1,"_DA(1)_",1,"
. S FBLBL="Reason for Suspension: "
. D:$Y+$S(FBCC:FBCCI,1:9)>IOSL PAGE^FBUCLET1
. D TXT^FBUCUTL2(FBGL,DA,1,"WC69I10",1,1,.FBCC,FBCCI,FBLBL)
Q
PDHD ; pharmacy payment detail header
W !!?8,"RX Date",?21,"RX #"
W ?40,"Amt Claimed",?53,"Amt Approved"
W ?67,"Adj Code*"
W !?8,"------------",?21,"--------"
W ?40,"-----------",?53,"------------"
W ?67,"--------"
Q
PD ; pharmacy payment detail
N FBADJRE
S FBSC=""
S DA=$P(FBIENS,",")
S DA(1)=$P(FBIENS,",",2)
S FBY=$G(^FBAA(162.1,DA(1),"RX",DA,0))
S FBFPPSL=$P($G(^FBAA(162.1,DA(1),"RX",DA,3)),U)
S FBADJLR=$P($$ADJLRA^FBRXFA(DA_","_DA(1)_","),U)
F FBJ=1:1 S FBADJRE=$P(FBADJLR,",",FBJ) Q:FBADJRE="" S FBACRR(FBADJRE)=""
I $Y+$S(FBCC:FBCCI,1:11)>IOSL D PAGE^FBUCLET1,PDHD
W !!?8,$$FMTE^XLFDT($P(FBY,U,3)),?21,$$FMTE^XLFDT($P(FBY,U,1))
W ?40,$J("$"_$FN($P(FBY,U,4),",",2),11)
W ?53,$J("$"_$FN($P(FBY,U,16),",",2),12)
S:FBADJLR="" FBSC=$$GET1^DIQ(162.11,FBIENS,7)
S:FBSC]"" FBSCA(FBSC)=""
W ?70,$S(FBADJLR]"":FBADJLR,1:FBSC)
W !?8,"Drug Name: ",$P(FBY,U,2)
I FBFPPSC]"" W !,?8,"FPPS Claim ID: ",FBFPPSC,?36,"FPPS Line Item: ",FBFPPSL
; if "Other" suspend code then print description
I FBSC="4" D
. N FBGL,FBLBL
. S FBGL="^FBAA(162.1,"_DA(1)_",""RX"","
. S FBLBL="Reason for Suspension: "
. D:$Y+$S(FBCC:FBCCI,1:8)>IOSL PAGE^FBUCLET1
. D TXT^FBUCUTL2(FBGL,DA,1,"WC69I10",1,1,.FBCC,FBCCI,FBLBL)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFBUCLET2 8642 printed Dec 13, 2024@02:00:18 Page 2
FBUCLET2 ;WOIFO/SAB - UNAUTHORIZED CLAIM LETTER (continued) ;08/15/02
+1 ;;3.5;FEE BASIS;**38,46,69**;JAN 30, 1995
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 QUIT
AUTHPR ;print authorized dates and approved amounts on disposition letter
+1 ;INPUT: FBDA = ien of unauthorized claim, file 162.7
+2 ; FBORDER = (optional) order number of status
+3 ; FBUCA = current (after) zero node of unauthorized claim (162.7)
+4 ; FBUC = unauthorized claim node in parameter file
+5 ; FBCC = flag, true if CC address should print at bottom of page
+6 ; FBCCI = # used to determine where CC address prints
+7 ;OUTPUT: FBTAMT = total amount approved
+8 ; FBCC value may be changed
+9 NEW DA,FBAMT,FBCPT,FBDOS,FBFILE,FBIENS,FBMOD,FBMODLE,FBSC,FBSCA
+10 NEW FBSCCOL,FBUCPAY,FBX,FBY,FBACRR,FBADJLR,FBFPPSC,FBSCID,FBFPPSL,FBJ
+11 ;
+12 ; get list of payments for the claim
+13 SET FBX=$$PAYST^FBUCUTL(FBDA,"FBUCPAY")
+14 ; get fpps claim id
+15 SET FBFPPSC=$PIECE($GET(^FB583(FBDA,5)),U)
+16 SET FBSCID=""
+17 ;
+18 ; loop thru payments to get total amount approved and suspend code list
+19 SET FBTAMT=0
+20 FOR FBFILE=162.03,162.11,162.5
Begin DoDot:1
+21 SET FBIENS=""
FOR
SET FBIENS=$ORDER(FBUCPAY(FBDA,FBFILE,FBIENS))
if FBIENS=""
QUIT
Begin DoDot:2
+22 IF FBFILE=162.03
Begin DoDot:3
+23 SET FBAMT=$$GET1^DIQ(FBFILE,FBIENS,2)
+24 if FBSCID]""
QUIT
+25 SET FBSCID=$$GET1^DIQ(FBFILE,FBIENS,49)
End DoDot:3
+26 IF FBFILE=162.11
Begin DoDot:3
+27 SET FBAMT=$$GET1^DIQ(FBFILE,FBIENS,6.5)
End DoDot:3
+28 IF FBFILE=162.5
Begin DoDot:3
+29 SET FBAMT=$$GET1^DIQ(FBFILE,FBIENS,8)
+30 if FBSCID]""
QUIT
+31 ; patient control number
SET FBSCID=$$GET1^DIQ(FBFILE,FBIENS,55)
End DoDot:3
+32 SET FBTAMT=FBTAMT+FBAMT
End DoDot:2
End DoDot:1
+33 ;
+34 ; print authorized dates and total amount
+35 IF $Y+$SELECT(FBCC:FBCCI,1:8)>IOSL
DO PAGE^FBUCLET1
+36 WRITE !?8,"Authorized from: ",$$FMTE^XLFDT($PIECE(FBUCA,U,13))
+37 WRITE " Authorized to: ",$$FMTE^XLFDT($PIECE(FBUCA,U,14))
+38 WRITE !?8,"Amount approved: "
if FBTAMT
WRITE "$",$FNUMBER(FBTAMT,",",2)
+39 WRITE " Itemized list follows:"
+40 ;
+41 ; print header and detail lines for civil hospital payments
+42 IF $DATA(FBUCPAY(FBDA,162.5))
Begin DoDot:1
+43 IF $Y+$SELECT(FBCC:FBCCI,1:7)>IOSL
DO PAGE^FBUCLET1
+44 WRITE !!?8,"Patient Control Number: ",FBSCID
+45 IF $Y+$SELECT(FBCC:FBCCI,1:11)>IOSL
DO PAGE^FBUCLET1
+46 DO CHDHD
+47 SET FBIENS=""
+48 FOR
SET FBIENS=$ORDER(FBUCPAY(FBDA,162.5,FBIENS))
if FBIENS=""
QUIT
DO CHD
End DoDot:1
+49 ;
+50 ; print header and detail lines for outpatient/ancillary payments
+51 IF $DATA(FBUCPAY(FBDA,162.03))
Begin DoDot:1
+52 IF $Y+$SELECT(FBCC:FBCCI,1:7)>IOSL
DO PAGE^FBUCLET1
+53 WRITE !!?8,"Patient Account Number: ",FBSCID
+54 IF $Y+$SELECT(FBCC:FBCCI,1:11)>IOSL
DO PAGE^FBUCLET1
+55 DO ODHD
+56 SET FBIENS=""
+57 FOR
SET FBIENS=$ORDER(FBUCPAY(FBDA,162.03,FBIENS))
if FBIENS=""
QUIT
DO OD
End DoDot:1
+58 ;
+59 ; print header and detail lines for pharmacy payments
+60 IF $DATA(FBUCPAY(FBDA,162.11))
Begin DoDot:1
+61 IF $Y+$SELECT(FBCC:FBCCI,1:11)>IOSL
DO PAGE^FBUCLET1
+62 DO PDHD
+63 SET FBIENS=""
+64 FOR
SET FBIENS=$ORDER(FBUCPAY(FBDA,162.11,FBIENS))
if FBIENS=""
QUIT
DO PD
End DoDot:1
+65 ;
+66 ;set FBSCCOL flag to indicate if the suspend code column should be used
+67 ; = 1 or 0 (1 if there are any suspend codes beside "4 Other")
+68 SET FBSCCOL=0
+69 SET FBSC=""
FOR
SET FBSC=$ORDER(FBSCA(FBSC))
if FBSC=""
QUIT
IF FBSC'=4
SET FBSCCOL=1
QUIT
+70 ;
+71 ; print relevant suspend code descriptions
+72 IF FBSCCOL
Begin DoDot:1
+73 NEW FBGL,FBLBL
+74 IF $Y+$SELECT(FBCC:FBCCI,1:10)>IOSL
DO PAGE^FBUCLET1
+75 WRITE !!?8,"*Reason(s) for Suspension"
+76 SET FBSC=""
FOR
SET FBSC=$ORDER(FBSCA(FBSC))
if FBSC=""
QUIT
Begin DoDot:2
+77 IF FBSC="4"
Begin DoDot:3
+78 WRITE !?8,"(4) Other. Specific reason immediately follows item."
End DoDot:3
QUIT
+79 ; print description of suspend code from file when not "Other"
+80 SET FBGL="^FBAA(161.27,"
+81 SET FBLBL="("_FBSC_") "
+82 SET DA=$ORDER(^FBAA(161.27,"B",FBSC,0))
+83 IF $Y+$SELECT(FBCC:FBCCI,1:9)>IOSL
DO PAGE^FBUCLET1
+84 DO TXT^FBUCUTL2(FBGL,DA,1,"WC69I8",1,1,.FBCC,FBCCI,FBLBL)
End DoDot:2
End DoDot:1
+85 ;
+86 WRITE !
+87 if $DATA(FBACRR)
DO ACT
KILL FBACRR
+88 QUIT
+89 ;
ACT ; print table of adjustment reason descriptions
+1 ; Input
+2 ; FBACRR( - required, array
+3 ; FBACRR(FBADJRE)=""
+4 ; where FBADJRE = adjustment reason code, external value
+5 NEW FBADJRE,FBI,X,FBACT
+6 IF $Y+$SELECT(FBCC:FBCCI,1:10)>IOSL
DO PAGE^FBUCLET1
+7 WRITE !,?8,"*Adjustment Code Text:"
+8 SET FBADJRE=""
FOR
SET FBADJRE=$ORDER(FBACRR(FBADJRE))
if FBADJRE=""
QUIT
Begin DoDot:1
+9 ; get description of code in FBACT
+10 ; quit if error
IF $$AR^FBUTL1(,FBADJRE,,"FBACT")<0
QUIT
+11 ; print code and description
+12 KILL ^UTILITY($JOB,"W")
+13 SET DIWL=1
SET DIWF="WC79I8"
+14 ; include code in output
+15 IF $Y+$SELECT(FBCC:FBCCI,1:9)>IOSL
DO PAGE^FBUCLET1
+16 SET X=$$LJ^XLFSTR("("_FBADJRE_")",6," ")
DO ^DIWP
+17 SET DIWF="WC79I14"
+18 ; include description in output
+19 SET FBI=0
FOR
SET FBI=$ORDER(FBACT(FBI))
if FBI=""
QUIT
SET X=FBACT(FBI)
IF X]""
DO ^DIWP
+20 DO ^DIWW
End DoDot:1
+21 QUIT
+22 ;
CHDHD ; civil hospital payment detail header
+1 WRITE !!?8,"Admission Date",?24,"Discharge Date"
+2 WRITE ?40,"Amt Claimed",?53,"Amt Approved"
+3 WRITE ?67,"Adj Code*"
+4 WRITE !?8,"--------------",?24,"--------------"
+5 WRITE ?40,"-----------",?53,"------------"
+6 WRITE ?67,"--------"
+7 QUIT
CHD ; civil hospital payment detail
+1 SET FBSC=""
+2 SET DA=$PIECE(FBIENS,",")
+3 SET FBY=$GET(^FBAAI(DA,0))
+4 ; fpps line item
SET FBFPPSL=$PIECE($GET(^FBAAI(DA,3)),U,2)
+5 SET FBADJLR=$PIECE($$ADJLRA^FBCHFA(DA_","),U)
+6 if FBADJLR]""
SET FBACRR(FBADJLR)=""
+7 IF $Y+$SELECT(FBCC:FBCCI,1:10)>IOSL
DO PAGE^FBUCLET1
DO CHDHD
+8 WRITE !!?8,$$FMTE^XLFDT($PIECE(FBY,U,6)),?24,$$FMTE^XLFDT($PIECE(FBY,U,7))
+9 WRITE ?40,$JUSTIFY("$"_$FNUMBER($PIECE(FBY,U,8),",",2),11)
+10 WRITE ?53,$JUSTIFY("$"_$FNUMBER($PIECE(FBY,U,9),",",2),12)
+11 if FBADJLR=""
SET FBSC=$$GET1^DIQ(162.5,FBIENS,10)
+12 if FBSC]""
SET FBSCA(FBSC)=""
+13 WRITE ?70,$SELECT(FBADJLR]"":FBADJLR,1:FBSC)
+14 IF FBFPPSC]""
WRITE !,?8,"FPPS Claim ID: ",FBFPPSC,?36,"FPPS Line Item: ",FBFPPSL
+15 ; if "Other" suspend code then print description
+16 IF FBSC="4"
Begin DoDot:1
+17 NEW FBGL,FBLBL
+18 SET FBGL="^FBAAI("
+19 SET FBLBL="Reason for Suspension: "
+20 if $Y+$SELECT(FBCC
DO PAGE^FBUCLET1
+21 DO TXT^FBUCUTL2(FBGL,DA,1,"WC69I10",1,1,.FBCC,FBCCI,FBLBL)
End DoDot:1
+22 QUIT
ODHD ; outpatient/ancillary payment header
+1 WRITE !!?8,"Service Date",?22,"CPT-MOD"
+2 WRITE ?40,"Amt Claimed",?53,"Amt Approved"
+3 WRITE ?67,"Adj Code*"
+4 WRITE !?8,"------------",?22,"--------"
+5 WRITE ?40,"-----------",?53,"------------"
+6 WRITE ?67,"--------"
+7 QUIT
+8 ;
OD ; outpatient/ancillary payment detail
+1 NEW FBADJRE
+2 SET FBSC=""
+3 SET DA=$PIECE(FBIENS,",")
+4 SET DA(1)=$PIECE(FBIENS,",",2)
+5 SET DA(2)=$PIECE(FBIENS,",",3)
+6 SET DA(3)=$PIECE(FBIENS,",",4)
+7 SET FBY=$GET(^FBAAC(DA(3),1,DA(2),1,DA(1),1,DA,0))
+8 SET FBFPPSL=$PIECE($GET(^FBAAC(DA(3),1,DA(2),1,DA(1),1,DA,3)),U,2)
+9 SET FBADJLR=$PIECE($$ADJLRA^FBAAFA(DA_","_DA(1)_","_DA(2)_","_DA(3)_","),U)
+10 FOR FBJ=1:1
SET FBADJRE=$PIECE(FBADJLR,",",FBJ)
if FBADJRE=""
QUIT
SET FBACRR(FBADJRE)=""
+11 SET FBDOS=$PIECE($GET(^FBAAC(DA(3),1,DA(2),1,DA(1),0)),U)
+12 SET FBCPT=$$GET1^DIQ(162.03,FBIENS,.01)
+13 SET FBMODLE=$$MODL^FBAAUTL4("^FBAAC("_DA(3)_",1,"_DA(2)_",1,"_DA(1)_",1,"_DA_",""M"")","E")
+14 IF $Y+$SELECT(FBCC:FBCCI,1:10)>IOSL
DO PAGE^FBUCLET1
DO ODHD
+15 WRITE !!?8,$$FMTE^XLFDT(FBDOS)
+16 WRITE ?22,FBCPT_$SELECT($GET(FBMODLE)]"":"-"_$PIECE(FBMODLE,","),1:"")
+17 WRITE ?40,$JUSTIFY("$"_$FNUMBER($PIECE(FBY,U,2),",",2),11)
+18 WRITE ?53,$JUSTIFY("$"_$FNUMBER($PIECE(FBY,U,3),",",2),12)
+19 if FBADJLR=""
SET FBSC=$$GET1^DIQ(162.03,FBIENS,4)
+20 if FBSC]""
SET FBSCA(FBSC)=""
+21 WRITE ?70,$SELECT(FBADJLR]"":FBADJLR,1:FBSC)
+22 IF $PIECE($GET(FBMODLE),",",2)]""
Begin DoDot:1
+23 NEW FBI
+24 FOR FBI=2:1
SET FBMOD=$PIECE(FBMODLE,",",FBI)
if FBMOD=""
QUIT
Begin DoDot:2
+25 ;I $Y+4>IOSL W @IOF D HED W !," (continued)"
+26 WRITE !,?27,"-",FBMOD
End DoDot:2
End DoDot:1
+27 IF FBFPPSC]""
WRITE !,?8,"FPPS Claim ID: ",FBFPPSC,?36,"FPPS Line Item: ",FBFPPSL
+28 ; if "Other" suspend code then print description
+29 IF FBSC="4"
Begin DoDot:1
+30 NEW FBGL,FBLBL
+31 SET FBGL="^FBAAC("_DA(3)_",1,"_DA(2)_",1,"_DA(1)_",1,"
+32 SET FBLBL="Reason for Suspension: "
+33 if $Y+$SELECT(FBCC
DO PAGE^FBUCLET1
+34 DO TXT^FBUCUTL2(FBGL,DA,1,"WC69I10",1,1,.FBCC,FBCCI,FBLBL)
End DoDot:1
+35 QUIT
PDHD ; pharmacy payment detail header
+1 WRITE !!?8,"RX Date",?21,"RX #"
+2 WRITE ?40,"Amt Claimed",?53,"Amt Approved"
+3 WRITE ?67,"Adj Code*"
+4 WRITE !?8,"------------",?21,"--------"
+5 WRITE ?40,"-----------",?53,"------------"
+6 WRITE ?67,"--------"
+7 QUIT
PD ; pharmacy payment detail
+1 NEW FBADJRE
+2 SET FBSC=""
+3 SET DA=$PIECE(FBIENS,",")
+4 SET DA(1)=$PIECE(FBIENS,",",2)
+5 SET FBY=$GET(^FBAA(162.1,DA(1),"RX",DA,0))
+6 SET FBFPPSL=$PIECE($GET(^FBAA(162.1,DA(1),"RX",DA,3)),U)
+7 SET FBADJLR=$PIECE($$ADJLRA^FBRXFA(DA_","_DA(1)_","),U)
+8 FOR FBJ=1:1
SET FBADJRE=$PIECE(FBADJLR,",",FBJ)
if FBADJRE=""
QUIT
SET FBACRR(FBADJRE)=""
+9 IF $Y+$SELECT(FBCC:FBCCI,1:11)>IOSL
DO PAGE^FBUCLET1
DO PDHD
+10 WRITE !!?8,$$FMTE^XLFDT($PIECE(FBY,U,3)),?21,$$FMTE^XLFDT($PIECE(FBY,U,1))
+11 WRITE ?40,$JUSTIFY("$"_$FNUMBER($PIECE(FBY,U,4),",",2),11)
+12 WRITE ?53,$JUSTIFY("$"_$FNUMBER($PIECE(FBY,U,16),",",2),12)
+13 if FBADJLR=""
SET FBSC=$$GET1^DIQ(162.11,FBIENS,7)
+14 if FBSC]""
SET FBSCA(FBSC)=""
+15 WRITE ?70,$SELECT(FBADJLR]"":FBADJLR,1:FBSC)
+16 WRITE !?8,"Drug Name: ",$PIECE(FBY,U,2)
+17 IF FBFPPSC]""
WRITE !,?8,"FPPS Claim ID: ",FBFPPSC,?36,"FPPS Line Item: ",FBFPPSL
+18 ; if "Other" suspend code then print description
+19 IF FBSC="4"
Begin DoDot:1
+20 NEW FBGL,FBLBL
+21 SET FBGL="^FBAA(162.1,"_DA(1)_",""RX"","
+22 SET FBLBL="Reason for Suspension: "
+23 if $Y+$SELECT(FBCC
DO PAGE^FBUCLET1
+24 DO TXT^FBUCUTL2(FBGL,DA,1,"WC69I10",1,1,.FBCC,FBCCI,FBLBL)
End DoDot:1
+25 QUIT