ABME3AA0 ; IHS/ASDST/DMJ - HCFA-1500 NSF 3.01 EMC RECORD AA0 (Submitter Data) ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;
; IHS/ASDS/DMJ - 09/06/01 - V2.4 Patch 7 - NOIS HQW-0701-100066
; This is a new routine related to Medicare Part B.
;
; IHS/ASDS/DMJ - 01/03/02 - V2.4 Patch 10 - NOIS NDA-1201-180141
; Modified code to calculate submission number differently as
; Medicare saves the numbers for up to a year.
;
; *********************************************************************
;
START ;START HERE
K ABMREC(1),ABMR(1)
S ABME("RTYPE")=1
D LOOP
S ABMRT(99,"RTOT")=1
K ABME,ABM
Q
LOOP ;LOOP HERE
F I=10:10:330 D
.D @I
.I $D(^ABMEXLM("AA",+$G(ABMP("INS")),+$G(ABMP("EXP")),1,I)) D @(^(I))
.I '$G(ABMP("NOFMT")) S ABMREC(1)=$G(ABMREC(1))_ABMR(1,I)
Q
10 ;1-3 Record type
S ABMR(1,10)="AA0"
Q
20 ;4-19 Submitter ID
S ABMR(1,20)=$P($G(^ABMNINS(ABMP("LDFN"),ABMP("INS"),0)),"^",2)
S:ABMR(1,20)="" ABMR(1,20)=$P($G(^ABMNINS(DUZ(2),ABMP("INS"),0)),"^",2)
S:ABMR(1,20)="" ABMR(1,20)=$P($G(^AUTTLOC(DUZ(2),0)),"^",18)
S ABMR(1,20)=$TR(ABMR(1,20),"-")
S ABMR(1,20)=$$FMT^ABMERUTL(ABMR(1,20),16)
S ABMP("SUBID")=ABMR(1,20)
Q
30 ;20-28 Reserved
S ABMR(1,30)=""
S ABMR(1,30)=$$FMT^ABMERUTL(ABMR(1,30),9)
Q
40 ;29-34 Submission Type
D SOP^ABMERUTL
S ABMR(1,40)=ABMP("SOP")
S ABMR(1,40)=$$FMT^ABMERUTL(ABMR(1,40),6)
Q
50 ;35-40 Submission #
S ABMR(1,50)=$P($G(^ABMDTXST(DUZ(2),+$G(ABMP("XMIT")),1)),"^",6)
I ABMR(1,50)="" D
.S ABMR(1,50)="0000"_$G(ABMP("XMIT"))
.S ABMR(1,50)=$E(ABMR(1,50),$L(ABMR(1,50))-2,$L(ABMR(1,50)))
.S ABMR(1,50)=$E(DUZ(2),$L(DUZ(2))-1,$L(DUZ(2)))_ABMR(1,50)
.S ABMR(1,50)=ABMR(1,50)+100000
S ABMR(1,50)=$$FMT^ABMERUTL(ABMR(1,50),6)
Q
60 ;41-73 Submitter Name
D DIQ2 S ABMR(1,60)=ABM(9999999.06,DUZ(2),.01,"E")
S ABMR(1,60)=$$FMT^ABMERUTL(ABMR(1,60),33)
Q
70 ;74-103 Submitter Address-1
D DIQ2 S ABMR(1,70)=ABM(9999999.06,DUZ(2),.14,"E")
S ABMR(1,70)=$$FMT^ABMERUTL(ABMR(1,70),30)
Q
80 ;104-133 Submitter Address-2
S ABMR(1,80)=""
S ABMR(1,80)=$$FMT^ABMERUTL(ABMR(1,80),30)
Q
90 ;134-153 Submitter City
D DIQ2 S ABMR(1,90)=ABM(9999999.06,DUZ(2),.15,"E")
S ABMR(1,90)=$$FMT^ABMERUTL(ABMR(1,90),20)
Q
100 ;154-155 Submitter State
D DIQ2 S ABMR(1,100)=ABM(9999999.06,DUZ(2),.16,"I")
S ABMR(1,100)=$P($G(^DIC(5,+ABMR(1,100),0)),"^",2)
S ABMR(1,100)=$$FMT^ABMERUTL(ABMR(1,100),2)
Q
110 ;156-164 Submitter Zip
D DIQ2 S ABMR(1,110)=ABM(9999999.06,DUZ(2),.17,"E")
S ABMR(1,110)=$$FMT^ABMERUTL(ABMR(1,110),"9S")
Q
120 ;165-169 Submitter Region
S ABMR(1,120)=""
S ABMR(1,120)=$$FMT^ABMERUTL(ABMR(1,120),5)
Q
130 ;170-202 Submitter Contact
S ABMR(1,130)="BUSINESS OFFICE MANAGER"
S ABMR(1,130)=$$FMT^ABMERUTL(ABMR(1,130),33)
Q
140 ;203-212 Submitter Telephone Number
D DIQ2 S ABMR(1,140)=ABM(9999999.06,DUZ(2),.13,"E")
S ABMR(1,140)=$TR(ABMR(1,140),"() -")
S ABMR(1,140)=$$FMT^ABMERUTL(ABMR(1,140),10)
Q
150 ;213-220 Creation Date
S ABMR(1,150)=$$Y2KD2^ABMDUTL(DT)
Q
160 ;221-226 Submission Time
S ABMR(1,160)=""
S ABMR(1,160)=$$FMT^ABMERUTL(ABMR(1,160),6)
Q
170 ;227-242 Receiver ID
S ABMR(1,170)=$$RCID^ABMERUTL(ABMP("INS"))
S ABMR(1,170)=$$FMT^ABMERUTL(ABMR(1,170),16)
Q
180 ;243-243 Receiver Type
S ABMR(1,180)="C"
Q
190 ;244-248 Version Code-National
S ABMR(1,190)="00301"
Q
200 ;249-253 Version Code-Local
S ABMR(1,200)="00301"
Q
210 ;254-257 Test/Prod Indicator
S ABMR(1,210)=$P($G(^ABMNINS(DUZ(2),ABMP("INS"),0)),"^",4)
S ABMR(1,210)=$S(ABMR(1,210)["T":"TEST",1:"PROD")
S ABMR(1,210)=$$FMT^ABMERUTL(ABMR(1,210),4)
Q
220 ;258-265 Password
S ABMR(1,220)=$P($G(^ABMNINS(DUZ(2),ABMP("INS"),0)),"^",3)
S ABMR(1,220)=$$FMT^ABMERUTL(ABMR(1,220),8)
Q
230 ;266-266 Retransmission Status
S ABMR(1,230)=" "
Q
240 ;267-282 Original Submitter ID
S ABMR(1,240)=""
S ABMR(1,240)=$$FMT^ABMERUTL(ABMR(1,240),16)
Q
250 ;283-283 Vendor Application Cat.
S ABMR(1,250)=" "
Q
260 ;284-288 Vendor Software Version
S ABMR(1,260)="2.5 "
Q
270 ;289-290 Vendor Software Update
S ABMR(1,270)="P0"
Q
280 ;291-291 Coordination of Benefits File Indicator
S ABMR(1,280)=""
S ABMR(1,280)=$$FMT^ABMERUTL(ABMR(1,280),1)
Q
290 ;292-299 Process from Date
S ABMR(1,290)=""
S ABMR(1,290)=$$FMT^ABMERUTL(ABMR(1,290),8)
Q
300 ;300-307 Process thru Date
S ABMR(1,300)=""
S ABMR(1,300)=$$FMT^ABMERUTL(ABMR(1,300),8)
Q
310 ;308-308 Acknowledgement Requested
S ABMR(1,310)=""
S ABMR(1,310)=$$FMT^ABMERUTL(ABMR(1,310),1)
Q
320 ;309-316 Date of Receipt
S ABMR(1,320)=""
S ABMR(1,320)=$$FMT^ABMERUTL(ABMR(1,320),8)
Q
330 ;317-320 Filler - National
S ABMR(1,330)=""
S ABMR(1,330)=$$FMT^ABMERUTL(ABMR(1,330),4)
Q
DIQ2 ;GET LOCATION INFORMATION
Q:$D(ABM(9999999.06,DUZ(2)))
N I S DIQ="ABM",DIQ(0)="IE",DIC="^AUTTLOC(",DA=DUZ(2)
S DR=".01;.13;.14;.15;.16;.17;.21"
D EN^DIQ1 K DIQ
Q
ABME3AA0 ; IHS/ASDST/DMJ - HCFA-1500 NSF 3.01 EMC RECORD AA0 (Submitter Data) ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;
+3 ; IHS/ASDS/DMJ - 09/06/01 - V2.4 Patch 7 - NOIS HQW-0701-100066
+4 ; This is a new routine related to Medicare Part B.
+5 ;
+6 ; IHS/ASDS/DMJ - 01/03/02 - V2.4 Patch 10 - NOIS NDA-1201-180141
+7 ; Modified code to calculate submission number differently as
+8 ; Medicare saves the numbers for up to a year.
+9 ;
+10 ; *********************************************************************
+11 ;
START ;START HERE
+1 KILL ABMREC(1),ABMR(1)
+2 SET ABME("RTYPE")=1
+3 DO LOOP
+4 SET ABMRT(99,"RTOT")=1
+5 KILL ABME,ABM
+6 QUIT
LOOP ;LOOP HERE
+1 FOR I=10:10:330
Begin DoDot:1
+2 DO @I
+3 IF $DATA(^ABMEXLM("AA",+$GET(ABMP("INS")),+$GET(ABMP("EXP")),1,I))
DO @(^(I))
+4 IF '$GET(ABMP("NOFMT"))
SET ABMREC(1)=$GET(ABMREC(1))_ABMR(1,I)
End DoDot:1
+5 QUIT
10 ;1-3 Record type
+1 SET ABMR(1,10)="AA0"
+2 QUIT
20 ;4-19 Submitter ID
+1 SET ABMR(1,20)=$PIECE($GET(^ABMNINS(ABMP("LDFN"),ABMP("INS"),0)),"^",2)
+2 IF ABMR(1,20)=""
SET ABMR(1,20)=$PIECE($GET(^ABMNINS(DUZ(2),ABMP("INS"),0)),"^",2)
+3 IF ABMR(1,20)=""
SET ABMR(1,20)=$PIECE($GET(^AUTTLOC(DUZ(2),0)),"^",18)
+4 SET ABMR(1,20)=$TRANSLATE(ABMR(1,20),"-")
+5 SET ABMR(1,20)=$$FMT^ABMERUTL(ABMR(1,20),16)
+6 SET ABMP("SUBID")=ABMR(1,20)
+7 QUIT
30 ;20-28 Reserved
+1 SET ABMR(1,30)=""
+2 SET ABMR(1,30)=$$FMT^ABMERUTL(ABMR(1,30),9)
+3 QUIT
40 ;29-34 Submission Type
+1 DO SOP^ABMERUTL
+2 SET ABMR(1,40)=ABMP("SOP")
+3 SET ABMR(1,40)=$$FMT^ABMERUTL(ABMR(1,40),6)
+4 QUIT
50 ;35-40 Submission #
+1 SET ABMR(1,50)=$PIECE($GET(^ABMDTXST(DUZ(2),+$GET(ABMP("XMIT")),1)),"^",6)
+2 IF ABMR(1,50)=""
Begin DoDot:1
+3 SET ABMR(1,50)="0000"_$GET(ABMP("XMIT"))
+4 SET ABMR(1,50)=$EXTRACT(ABMR(1,50),$LENGTH(ABMR(1,50))-2,$LENGTH(ABMR(1,50)))
+5 SET ABMR(1,50)=$EXTRACT(DUZ(2),$LENGTH(DUZ(2))-1,$LENGTH(DUZ(2)))_ABMR(1,50)
+6 SET ABMR(1,50)=ABMR(1,50)+100000
End DoDot:1
+7 SET ABMR(1,50)=$$FMT^ABMERUTL(ABMR(1,50),6)
+8 QUIT
60 ;41-73 Submitter Name
+1 DO DIQ2
SET ABMR(1,60)=ABM(9999999.06,DUZ(2),.01,"E")
+2 SET ABMR(1,60)=$$FMT^ABMERUTL(ABMR(1,60),33)
+3 QUIT
70 ;74-103 Submitter Address-1
+1 DO DIQ2
SET ABMR(1,70)=ABM(9999999.06,DUZ(2),.14,"E")
+2 SET ABMR(1,70)=$$FMT^ABMERUTL(ABMR(1,70),30)
+3 QUIT
80 ;104-133 Submitter Address-2
+1 SET ABMR(1,80)=""
+2 SET ABMR(1,80)=$$FMT^ABMERUTL(ABMR(1,80),30)
+3 QUIT
90 ;134-153 Submitter City
+1 DO DIQ2
SET ABMR(1,90)=ABM(9999999.06,DUZ(2),.15,"E")
+2 SET ABMR(1,90)=$$FMT^ABMERUTL(ABMR(1,90),20)
+3 QUIT
100 ;154-155 Submitter State
+1 DO DIQ2
SET ABMR(1,100)=ABM(9999999.06,DUZ(2),.16,"I")
+2 SET ABMR(1,100)=$PIECE($GET(^DIC(5,+ABMR(1,100),0)),"^",2)
+3 SET ABMR(1,100)=$$FMT^ABMERUTL(ABMR(1,100),2)
+4 QUIT
110 ;156-164 Submitter Zip
+1 DO DIQ2
SET ABMR(1,110)=ABM(9999999.06,DUZ(2),.17,"E")
+2 SET ABMR(1,110)=$$FMT^ABMERUTL(ABMR(1,110),"9S")
+3 QUIT
120 ;165-169 Submitter Region
+1 SET ABMR(1,120)=""
+2 SET ABMR(1,120)=$$FMT^ABMERUTL(ABMR(1,120),5)
+3 QUIT
130 ;170-202 Submitter Contact
+1 SET ABMR(1,130)="BUSINESS OFFICE MANAGER"
+2 SET ABMR(1,130)=$$FMT^ABMERUTL(ABMR(1,130),33)
+3 QUIT
140 ;203-212 Submitter Telephone Number
+1 DO DIQ2
SET ABMR(1,140)=ABM(9999999.06,DUZ(2),.13,"E")
+2 SET ABMR(1,140)=$TRANSLATE(ABMR(1,140),"() -")
+3 SET ABMR(1,140)=$$FMT^ABMERUTL(ABMR(1,140),10)
+4 QUIT
150 ;213-220 Creation Date
+1 SET ABMR(1,150)=$$Y2KD2^ABMDUTL(DT)
+2 QUIT
160 ;221-226 Submission Time
+1 SET ABMR(1,160)=""
+2 SET ABMR(1,160)=$$FMT^ABMERUTL(ABMR(1,160),6)
+3 QUIT
170 ;227-242 Receiver ID
+1 SET ABMR(1,170)=$$RCID^ABMERUTL(ABMP("INS"))
+2 SET ABMR(1,170)=$$FMT^ABMERUTL(ABMR(1,170),16)
+3 QUIT
180 ;243-243 Receiver Type
+1 SET ABMR(1,180)="C"
+2 QUIT
190 ;244-248 Version Code-National
+1 SET ABMR(1,190)="00301"
+2 QUIT
200 ;249-253 Version Code-Local
+1 SET ABMR(1,200)="00301"
+2 QUIT
210 ;254-257 Test/Prod Indicator
+1 SET ABMR(1,210)=$PIECE($GET(^ABMNINS(DUZ(2),ABMP("INS"),0)),"^",4)
+2 SET ABMR(1,210)=$SELECT(ABMR(1,210)["T":"TEST",1:"PROD")
+3 SET ABMR(1,210)=$$FMT^ABMERUTL(ABMR(1,210),4)
+4 QUIT
220 ;258-265 Password
+1 SET ABMR(1,220)=$PIECE($GET(^ABMNINS(DUZ(2),ABMP("INS"),0)),"^",3)
+2 SET ABMR(1,220)=$$FMT^ABMERUTL(ABMR(1,220),8)
+3 QUIT
230 ;266-266 Retransmission Status
+1 SET ABMR(1,230)=" "
+2 QUIT
240 ;267-282 Original Submitter ID
+1 SET ABMR(1,240)=""
+2 SET ABMR(1,240)=$$FMT^ABMERUTL(ABMR(1,240),16)
+3 QUIT
250 ;283-283 Vendor Application Cat.
+1 SET ABMR(1,250)=" "
+2 QUIT
260 ;284-288 Vendor Software Version
+1 SET ABMR(1,260)="2.5 "
+2 QUIT
270 ;289-290 Vendor Software Update
+1 SET ABMR(1,270)="P0"
+2 QUIT
280 ;291-291 Coordination of Benefits File Indicator
+1 SET ABMR(1,280)=""
+2 SET ABMR(1,280)=$$FMT^ABMERUTL(ABMR(1,280),1)
+3 QUIT
290 ;292-299 Process from Date
+1 SET ABMR(1,290)=""
+2 SET ABMR(1,290)=$$FMT^ABMERUTL(ABMR(1,290),8)
+3 QUIT
300 ;300-307 Process thru Date
+1 SET ABMR(1,300)=""
+2 SET ABMR(1,300)=$$FMT^ABMERUTL(ABMR(1,300),8)
+3 QUIT
310 ;308-308 Acknowledgement Requested
+1 SET ABMR(1,310)=""
+2 SET ABMR(1,310)=$$FMT^ABMERUTL(ABMR(1,310),1)
+3 QUIT
320 ;309-316 Date of Receipt
+1 SET ABMR(1,320)=""
+2 SET ABMR(1,320)=$$FMT^ABMERUTL(ABMR(1,320),8)
+3 QUIT
330 ;317-320 Filler - National
+1 SET ABMR(1,330)=""
+2 SET ABMR(1,330)=$$FMT^ABMERUTL(ABMR(1,330),4)
+3 QUIT
DIQ2 ;GET LOCATION INFORMATION
+1 IF $DATA(ABM(9999999.06,DUZ(2)))
QUIT
+2 NEW I
SET DIQ="ABM"
SET DIQ(0)="IE"
SET DIC="^AUTTLOC("
SET DA=DUZ(2)
+3 SET DR=".01;.13;.14;.15;.16;.17;.21"
+4 DO EN^DIQ1
KILL DIQ
+5 QUIT