ABME3XA0 ; IHS/ASDST/DMJ - HCFA-1500 NSF3.01 RECORD XA0 (Claim Trailer) ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;Original;DMJ;08/18/95 10:11 AM
;
; IHS/ASDS/DMJ - V2.4 P7 - 9/6/01 NOIS HQW-0701-100066
; This is a new routine related to Medicare Part B.
;
START ;START HERE
K ABMREC(90)
S ABME("RTYPE")=90
D SET^ABMERUTL,LOOP
F I="RTOT","DTOT" D
.S ABMRT(95,I)=+$G(ABMRT(95,I))+$G(ABMRT(90,I))
S ABMRT(95,"CTOT")=+$G(ABMRT(95,"CTOT"))+1
K ABM,ABME,ABMRT(90)
Q
LOOP ;LOOP HERE
F I=10:10:250 D
.D @I
.I $D(^ABMEXLM("AA",+$G(ABMP("INS")),+$G(ABMP("EXP")),90,I)) D @(^(I))
.I '$G(ABMP("NOFMT")) S ABMREC(90)=$G(ABMREC(90))_ABMR(90,I)
Q
10 ;1-3 Record ID
S ABMR(90,10)="XA0"
Q
20 ;4-5 Filler
S ABMR(90,20)=""
S ABMR(90,20)=$$FMT^ABMERUTL(ABMR(90,20),2)
Q
30 ;6-22 Patient Control Number
S ABMR(90,30)=ABMP("PCN")
S ABMR(90,30)=$$FMT^ABMERUTL(ABMR(90,30),17)
Q
40 ;
S ABMR(90,40)=""
Q
50 ;23-24 Record Type Cxx Count
S ABMR(90,50)=$$FMT^ABMERUTL(+$G(ABMRT(90,50)),"2NR")
Q
60 ;25-26 Record Type Dxx Count
S ABMR(90,60)=$$FMT^ABMERUTL(+$G(ABMRT(90,60)),"2NR")
Q
70 ;27-28 Record Type Exx Count
S ABMR(90,70)=$$FMT^ABMERUTL(+$G(ABMRT(90,70)),"2NR")
Q
80 ;29-30 Record Type Fxx Count
S ABMR(90,80)=$$FMT^ABMERUTL(+$G(ABMRT(90,90)),"2NR")
Q
90 ;31-32 Record Type Gxx Count
S ABMR(90,90)=$$FMT^ABMERUTL(+$G(ABMRT(90,100)),"2NR")
Q
100 ;33-34 Record Type Hxx Count
S ABMR(90,100)=$$FMT^ABMERUTL(+$G(ABMRT(90,110)),"2NR")
Q
110 ;35-37 Physical Record Count
S ABMR(90,110)=$$FMT^ABMERUTL(+$G(ABMRT(90,40)),"3NR")
Q
120 ;38-77 Reserved
S ABMR(90,120)=""
S ABMR(90,120)=$$FMT^ABMERUTL(ABMR(90,120),40)
Q
130 ;78-84 Total Claim Charges
S ABMR(90,130)=$$FMT^ABMERUTL(+$G(ABMRT(90,150)),"7NRJ2")
Q
140 ;85-91 Total Disallowed Cost Cont Chgs
S ABMR(90,140)=""
S ABMR(90,140)=$$FMT^ABMERUTL(ABMR(90,140),"7NRJ2")
Q
150 ;92-98 Total Disallowed Other Charges
S ABMR(90,150)=""
S ABMR(90,150)=$$FMT^ABMERUTL(ABMR(90,150),"7NRJ2")
Q
160 ;99-105 Total Allowed Amount
S ABMR(90,160)=+$G(ABMRT(90,150))-ABMR(90,140)-ABMR(90,150)
S ABMR(90,160)=$$FMT^ABMERUTL(ABMR(90,160),"7NRJ2")
Q
170 ;106-112 Total Deductible Amount
S ABMR(90,170)=""
S ABMR(90,170)=$$FMT^ABMERUTL(ABMR(90,170),"7NRJ2")
Q
180 ;113-119 Total Coinsurance Amount
S ABMR(90,180)=""
S ABMR(90,180)=$$FMT^ABMERUTL(ABMR(90,180),"7NRJ2")
Q
190 ;120-126 Total Payor Amount Paid
S ABMR(90,190)=$G(ABMP("PAYED"))
S ABMR(90,190)=$$FMT^ABMERUTL(ABMR(90,190),"7NRJ2")
Q
200 ;127-133 Patient Amount Payed
S ABMR(90,200)=$P($G(^ABMDBILL(DUZ(2),ABMP("BDFN"),9)),"^",9)
S ABMR(90,200)=$$FMT^ABMERUTL(ABMR(90,200),"7NRJ2")
Q
210 ;134-140 Total Purchase Service Charges
S ABMR(90,210)=""
S ABMR(90,210)=$$FMT^ABMERUTL(ABMR(90,210),"7NRJ2")
Q
220 ;141-156 Provider Discount Information
S ABMR(90,220)=""
S ABMR(90,220)=$$FMT^ABMERUTL(ABMR(90,220),16)
Q
230 ;157-259 Remarks
S ABMR(90,230)=""
S ABMR(90,230)=$$FMT^ABMERUTL(ABMR(90,230),103)
Q
240 ;260-290 Filler (National)
S ABMR(90,240)=""
S ABMR(90,240)=$$FMT^ABMERUTL(ABMR(90,240),31)
Q
250 ;291-320 Filler (Local)
S ABMR(90,250)=""
S ABMR(90,250)=$$FMT^ABMERUTL(ABMR(90,250),30)
Q
ABME3XA0 ; IHS/ASDST/DMJ - HCFA-1500 NSF3.01 RECORD XA0 (Claim Trailer) ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;Original;DMJ;08/18/95 10:11 AM
+3 ;
+4 ; IHS/ASDS/DMJ - V2.4 P7 - 9/6/01 NOIS HQW-0701-100066
+5 ; This is a new routine related to Medicare Part B.
+6 ;
START ;START HERE
+1 KILL ABMREC(90)
+2 SET ABME("RTYPE")=90
+3 DO SET^ABMERUTL
DO LOOP
+4 FOR I="RTOT","DTOT"
Begin DoDot:1
+5 SET ABMRT(95,I)=+$GET(ABMRT(95,I))+$GET(ABMRT(90,I))
End DoDot:1
+6 SET ABMRT(95,"CTOT")=+$GET(ABMRT(95,"CTOT"))+1
+7 KILL ABM,ABME,ABMRT(90)
+8 QUIT
LOOP ;LOOP HERE
+1 FOR I=10:10:250
Begin DoDot:1
+2 DO @I
+3 IF $DATA(^ABMEXLM("AA",+$GET(ABMP("INS")),+$GET(ABMP("EXP")),90,I))
DO @(^(I))
+4 IF '$GET(ABMP("NOFMT"))
SET ABMREC(90)=$GET(ABMREC(90))_ABMR(90,I)
End DoDot:1
+5 QUIT
10 ;1-3 Record ID
+1 SET ABMR(90,10)="XA0"
+2 QUIT
20 ;4-5 Filler
+1 SET ABMR(90,20)=""
+2 SET ABMR(90,20)=$$FMT^ABMERUTL(ABMR(90,20),2)
+3 QUIT
30 ;6-22 Patient Control Number
+1 SET ABMR(90,30)=ABMP("PCN")
+2 SET ABMR(90,30)=$$FMT^ABMERUTL(ABMR(90,30),17)
+3 QUIT
40 ;
+1 SET ABMR(90,40)=""
+2 QUIT
50 ;23-24 Record Type Cxx Count
+1 SET ABMR(90,50)=$$FMT^ABMERUTL(+$GET(ABMRT(90,50)),"2NR")
+2 QUIT
60 ;25-26 Record Type Dxx Count
+1 SET ABMR(90,60)=$$FMT^ABMERUTL(+$GET(ABMRT(90,60)),"2NR")
+2 QUIT
70 ;27-28 Record Type Exx Count
+1 SET ABMR(90,70)=$$FMT^ABMERUTL(+$GET(ABMRT(90,70)),"2NR")
+2 QUIT
80 ;29-30 Record Type Fxx Count
+1 SET ABMR(90,80)=$$FMT^ABMERUTL(+$GET(ABMRT(90,90)),"2NR")
+2 QUIT
90 ;31-32 Record Type Gxx Count
+1 SET ABMR(90,90)=$$FMT^ABMERUTL(+$GET(ABMRT(90,100)),"2NR")
+2 QUIT
100 ;33-34 Record Type Hxx Count
+1 SET ABMR(90,100)=$$FMT^ABMERUTL(+$GET(ABMRT(90,110)),"2NR")
+2 QUIT
110 ;35-37 Physical Record Count
+1 SET ABMR(90,110)=$$FMT^ABMERUTL(+$GET(ABMRT(90,40)),"3NR")
+2 QUIT
120 ;38-77 Reserved
+1 SET ABMR(90,120)=""
+2 SET ABMR(90,120)=$$FMT^ABMERUTL(ABMR(90,120),40)
+3 QUIT
130 ;78-84 Total Claim Charges
+1 SET ABMR(90,130)=$$FMT^ABMERUTL(+$GET(ABMRT(90,150)),"7NRJ2")
+2 QUIT
140 ;85-91 Total Disallowed Cost Cont Chgs
+1 SET ABMR(90,140)=""
+2 SET ABMR(90,140)=$$FMT^ABMERUTL(ABMR(90,140),"7NRJ2")
+3 QUIT
150 ;92-98 Total Disallowed Other Charges
+1 SET ABMR(90,150)=""
+2 SET ABMR(90,150)=$$FMT^ABMERUTL(ABMR(90,150),"7NRJ2")
+3 QUIT
160 ;99-105 Total Allowed Amount
+1 SET ABMR(90,160)=+$GET(ABMRT(90,150))-ABMR(90,140)-ABMR(90,150)
+2 SET ABMR(90,160)=$$FMT^ABMERUTL(ABMR(90,160),"7NRJ2")
+3 QUIT
170 ;106-112 Total Deductible Amount
+1 SET ABMR(90,170)=""
+2 SET ABMR(90,170)=$$FMT^ABMERUTL(ABMR(90,170),"7NRJ2")
+3 QUIT
180 ;113-119 Total Coinsurance Amount
+1 SET ABMR(90,180)=""
+2 SET ABMR(90,180)=$$FMT^ABMERUTL(ABMR(90,180),"7NRJ2")
+3 QUIT
190 ;120-126 Total Payor Amount Paid
+1 SET ABMR(90,190)=$GET(ABMP("PAYED"))
+2 SET ABMR(90,190)=$$FMT^ABMERUTL(ABMR(90,190),"7NRJ2")
+3 QUIT
200 ;127-133 Patient Amount Payed
+1 SET ABMR(90,200)=$PIECE($GET(^ABMDBILL(DUZ(2),ABMP("BDFN"),9)),"^",9)
+2 SET ABMR(90,200)=$$FMT^ABMERUTL(ABMR(90,200),"7NRJ2")
+3 QUIT
210 ;134-140 Total Purchase Service Charges
+1 SET ABMR(90,210)=""
+2 SET ABMR(90,210)=$$FMT^ABMERUTL(ABMR(90,210),"7NRJ2")
+3 QUIT
220 ;141-156 Provider Discount Information
+1 SET ABMR(90,220)=""
+2 SET ABMR(90,220)=$$FMT^ABMERUTL(ABMR(90,220),16)
+3 QUIT
230 ;157-259 Remarks
+1 SET ABMR(90,230)=""
+2 SET ABMR(90,230)=$$FMT^ABMERUTL(ABMR(90,230),103)
+3 QUIT
240 ;260-290 Filler (National)
+1 SET ABMR(90,240)=""
+2 SET ABMR(90,240)=$$FMT^ABMERUTL(ABMR(90,240),31)
+3 QUIT
250 ;291-320 Filler (Local)
+1 SET ABMR(90,250)=""
+2 SET ABMR(90,250)=$$FMT^ABMERUTL(ABMR(90,250),30)
+3 QUIT