Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ABMEH90

ABMEH90.m

Go to the documentation of this file.
ABMEH90 ; IHS/ASDST/DMJ - HCFA-1500 EMC RECORD XA0 (Claim Trailer) ;    
 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
 ;Original;DMJ;08/18/95 10:11 AM
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,120)),"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)=""
 N I F I=1:1:4 D
 .Q:'$D(^ABMDBILL(DUZ(2),ABMP("BDFN"),61,I,0))
 .S:I>1 ABMR(90,230)=ABMR(90,230)_" "
 .S ABMR(90,230)=ABMR(90,230)_^ABMDBILL(DUZ(2),ABMP("BDFN"),61,I,0)
 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