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

ABME3DA1.m

Go to the documentation of this file.
ABME3DA1 ; IHS/ASDST/DMJ - HCFA-1500 NSF 3.01 EMC RECORD DA1 (Insurance Information) ;  
 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
 ;
 ; 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 ABMR(31),ABMREC(31,ABME("S#"))
 S ABME("RTYPE")=31       ; Record type
 D SET^ABMERUTL
 D PAYED^ABMERUTL
 D ADDR
 D LOOP
 D S90^ABMERUTL           ; Increment record type counter
 K ABMADR,ABMP("PAYED")
 Q
 ;
LOOP ;LOOP HERE
 F I=10:10:390 D
 .D @I
 .I $D(^ABMEXLM("AA",+$G(ABMP("INS")),+$G(ABMP("EXP")),31,I)) D @(^(I))
 .I '$G(ABMP("NOFMT")) S ABMREC(31,ABME("S#"))=$G(ABMREC(31,ABME("S#")))_ABMR(31,I)
 Q
 ;
10 ;1-3 Record ID
 S ABMR(31,10)="DA1"
 Q
 ;
20 ;4-5 Sequence #
 S ABMR(31,20)="0"_ABME("S#")
 S ABMR(31,20)=$$FMT^ABMERUTL(ABMR(31,20),2)
 Q
 ;
30 ;6-22 Patient Control Number
 S ABMR(31,30)=ABMP("PCN")
 S ABMR(31,30)=$$FMT^ABMERUTL(ABMR(31,30),17)
 Q
 ;
40 ;23-52 Payor Address Line 1
 S ABMR(31,40)=ABMADR(2)
 S ABMR(31,40)=$$FMT^ABMERUTL(ABMR(31,40),30)
 Q
 ;
50 ;53-82 Payor Address Line 2
 S ABMR(31,50)=""
 S ABMR(31,50)=$$FMT^ABMERUTL(ABMR(31,50),30)
 Q
 ;
60 ;83-102 Payor City
 S ABMR(31,60)=ABMADR(3)
 S ABMR(31,60)=$$FMT^ABMERUTL(ABMR(31,60),20)
 Q
 ;
70 ;103-104 Payor State
 S ABMR(31,70)=ABMADR(4)
 S ABMR(31,70)=$$FMT^ABMERUTL(ABMR(31,70),2)
 Q
 ;
80 ;105-113 Payor Zip
 S ABMR(31,80)=ABMADR(5)
 S ABMR(31,80)=$$FMT^ABMERUTL(ABMR(31,80),"9S")
 Q
90 ;114-120 Dissallowed Cost Cont
 S ABMR(31,90)=""
 S ABMR(31,90)=$$FMT^ABMERUTL(ABMR(31,90),7)
 Q
100 ;121-127 Disallowed Other
 S ABMR(31,100)=""
 S ABMR(31,100)=$$FMT^ABMERUTL(ABMR(31,100),7)
 Q
110 ;128-134 Allowed Amount
 S ABMR(31,110)=""
 S ABMR(31,110)=$$FMT^ABMERUTL(ABMR(31,110),7)
 Q
120 ;135-141 Deductible Amount
 S ABMR(31,120)=""
 S ABMR(31,120)=$$FMT^ABMERUTL(ABMR(31,120),7)
 Q
130 ;142-148 Coinsurance Amount
 S ABMR(31,130)=""
 S ABMR(31,130)=$$FMT^ABMERUTL(ABMR(31,130),7)
 Q
140 ;149-155 Payor Amount Payed
 S ABMR(31,140)=$G(ABMP("PAYED",+ABME("INS")))
 S ABMR(31,140)=$$FMT^ABMERUTL(ABMR(31,140),"7NRJ2")
 Q
150 ;156-156 Zero Pay Indicator
 S ABMR(31,150)=""
 S ABMR(31,150)=$$FMT^ABMERUTL(ABMR(31,150),1)
 Q
160 ;157-158 Adjucation Ind 1
 S ABMR(31,160)=""
 S ABMR(31,160)=$$FMT^ABMERUTL(ABMR(31,160),2)
 Q
170 ;159-160 Adjudication Ind 2
 S ABMR(31,170)=""
 S ABMR(31,170)=$$FMT^ABMERUTL(ABMR(31,170),2)
 Q
180 ;161-162 Adjudication Ind 3
 S ABMR(31,180)=""
 S ABMR(31,180)=$$FMT^ABMERUTL(ABMR(31,180),2)
 Q
190 ;163-163 Champus Spnsr Branch
 S ABMR(31,190)=""
 S ABMR(31,190)=$$FMT^ABMERUTL(ABMR(31,190),1)
 Q
200 ;164-165 Champus Spnsr Grade
 S ABMR(31,200)=""
 S ABMR(31,200)=$$FMT^ABMERUTL(ABMR(31,200),2)
 Q
210 ;166-166 Champus Spnsr Status
 S ABMR(31,210)=""
 S ABMR(31,210)=$$FMT^ABMERUTL(ABMR(31,210),1)
 Q
220 ;167-174 Ins Card Effect Date
 S ABMR(31,220)=""
 S ABMR(31,220)=$$FMT^ABMERUTL(ABMR(31,220),8)
 Q
230 ;175-182 Ins Card Term Date
 S ABMR(31,230)=""
 S ABMR(31,230)=$$FMT^ABMERUTL(ABMR(31,230),8)
 Q
240 ;183-189 Balance Due
 S ABMR(31,240)=""
 S ABMR(31,240)=$$FMT^ABMERUTL(ABMR(31,240),"7NRJ2")
 Q
250 ;190-197 Eomb Date 1
 S ABMR(31,250)=""
 S ABMR(31,250)=$$FMT^ABMERUTL(ABMR(31,250),8)
 Q
260 ;198-205 Eomb Date 2
 S ABMR(31,260)=""
 S ABMR(31,260)=$$FMT^ABMERUTL(ABMR(31,260),8)
 Q
270 ;206-213 Eomb Date 3
 S ABMR(31,270)=""
 S ABMR(31,270)=$$FMT^ABMERUTL(ABMR(31,270),8)
 Q
280 ;214-221 Eomb Date 4
 S ABMR(31,280)=""
 S ABMR(31,280)=$$FMT^ABMERUTL(ABMR(31,280),8)
 Q
290 ;222-229 Claim Receipt Date
 S ABMR(31,290)=""
 S ABMR(31,290)=$$FMT^ABMERUTL(ABMR(31,290),8)
 Q
300 ;230-238 Amt Paid to Bene
 S ABMR(31,300)=""
 S ABMR(31,300)=$$FMT^ABMERUTL(ABMR(31,300),"9NRJ2")
 Q
310 ;239-253 Bene Check\EFT Trace No
 S ABMR(31,310)=""
 S ABMR(31,310)=$$FMT^ABMERUTL(ABMR(31,310),15)
 Q
320 ;254-261 Bene Check Date
 S ABMR(31,320)=""
 S ABMR(31,320)=$$FMT^ABMERUTL(ABMR(31,320),8)
 Q
330 ;262-270 Amt Paid to Prov
 S ABMR(31,330)=""
 S ABMR(31,330)=$$FMT^ABMERUTL(ABMR(31,330),"9NRJ2")
 Q
340 ;271-285 Prov Check\EFT Trace No
 S ABMR(31,340)=""
 S ABMR(31,340)=$$FMT^ABMERUTL(ABMR(31,340),15)
 Q
350 ;286-293 Prov Check Date
 S ABMR(31,350)=""
 S ABMR(31,350)=$$FMT^ABMERUTL(ABMR(31,350),8)
 Q
360 ;294-302 Interest Paid
 S ABMR(31,360)=""
 S ABMR(31,360)=$$FMT^ABMERUTL(ABMR(31,360),"9NRJ2")
 Q
370 ;303-311 Approved Amt
 S ABMR(31,370)=""
 S ABMR(31,370)=$$FMT^ABMERUTL(ABMR(31,370),"9NRJ2")
 Q
380 ;312-312 Contract Agreement Indicator
 S ABMR(31,380)=""
 S ABMR(31,380)=$$FMT^ABMERUTL(ABMR(31,380),1)
 Q
390 ;313-320 Filler National
 S ABMR(31,390)=""
 S ABMR(31,390)=$$FMT^ABMERUTL(ABMR(31,390),8)
 Q
ADDR ;Payor Address Info
 K ABMADR
 N I F I=1:1:5 S ABMADR(I)=$P(^AUTNINS(ABME("INS"),0),"^",I)
 S ABMADR(4)=$P($G(^DIC(5,+ABMADR(4),0)),"^",2)
 Q
EX(ABMX,ABMY,ABMZ) ;EXTRINSIC FUNCTION HERE
 ;
 ;  INPUT:  ABMX = data element
 ;          ABMY = bill internal entry number
 ;          ABMZ = Insurer priority (1 thru 3)
 ;
 ; OUTPUT:     Y = bill internal entry number
 ;
 S ABMP("BDFN")=ABMY
 D SET^ABMERUTL
 S ABME("INS")=ABMZ
 I '$D(^ABMDBILL(DUZ(2),ABMP("BDFN"),13,"B",ABME("INS"))) S Y="" Q Y
 D ISET^ABMERINS
 I '$G(ABMP("NOFMT")) S ABMP("FMT")=0
 D @ABMX
 S Y=ABMR(31,ABMX)
 I $D(ABMP("FMT")) S ABMP("FMT")=1
 K ABMR(31,ABMX),ABME,ABMX,ABMY,ABMZ,ABM
 Q Y