ABMEAA0 ; IHS/ASDST/DMJ - HCFA-1500 EMC RECORD AA0 (Submitter Data) Envoy version ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;
; IHS/ASDS/DMJ - 03/01/01 - V2.4 P5 - NOIS HQW-0301-100010
; This is a new routine to address a new electronic format for Envoy
;
; IHS/FCS/DRS - 09/17/01 - V2.4 P9
; Part 14a - Payer ID changes
;
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:290 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(^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)="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
; ABM*2.4*9 IHS/FCS/DRS 09/21/01 ; Part 14a - give priority to the Envoy ID
; And if it's not there, fall back to the $P(^AUTNINS(D0,0),U,8) ID #
S ABMR(1,170)=""
I $$ENVOY^ABMEF19 D
. S ABMR(1,170)=$$ENVY^ABMERUTL(ABMP("INS"),ABMP("VTYP"))
I ABMR(1,170)="" 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)=$G(ABMR(1,40))
S ABMR(1,180)=$E(ABMR(1,180))
S:ABMR(1,180)="" ABMR(1,180)=" "
Q
190 ;244-248 Version Code-National
S ABMR(1,190)="00200"
Q
200 ;249-253 Version Code-Local
S ABMR(1,200)="00200"
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-292 Filler (National Use)
S ABMR(1,280)=" "
Q
290 ;293-320 Filler (Local Use)
S ABMR(1,290)=""
S ABMR(1,290)=$$FMT^ABMERUTL(ABMR(1,290),28)
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
ABMEAA0 ; IHS/ASDST/DMJ - HCFA-1500 EMC RECORD AA0 (Submitter Data) Envoy version ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;
+3 ; IHS/ASDS/DMJ - 03/01/01 - V2.4 P5 - NOIS HQW-0301-100010
+4 ; This is a new routine to address a new electronic format for Envoy
+5 ;
+6 ; IHS/FCS/DRS - 09/17/01 - V2.4 P9
+7 ; Part 14a - Payer ID changes
+8 ;
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:290
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(^AUTTLOC(DUZ(2),0)),"^",18)
+2 SET ABMR(1,20)=$TRANSLATE(ABMR(1,20),"-")
+3 SET ABMR(1,20)=$$FMT^ABMERUTL(ABMR(1,20),16)
+4 SET ABMP("SUBID")=ABMR(1,20)
+5 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)="0000"_$GET(ABMP("XMIT"))
+2 SET ABMR(1,50)=$EXTRACT(ABMR(1,50),$LENGTH(ABMR(1,50))-2,$LENGTH(ABMR(1,50)))
+3 SET ABMR(1,50)=$EXTRACT(DUZ(2),$LENGTH(DUZ(2))-1,$LENGTH(DUZ(2)))_ABMR(1,50)
+4 SET ABMR(1,50)=ABMR(1,50)+100000
+5 SET ABMR(1,50)=$$FMT^ABMERUTL(ABMR(1,50),6)
+6 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 ; ABM*2.4*9 IHS/FCS/DRS 09/21/01 ; Part 14a - give priority to the Envoy ID
+2 ; And if it's not there, fall back to the $P(^AUTNINS(D0,0),U,8) ID #
+3 SET ABMR(1,170)=""
+4 IF $$ENVOY^ABMEF19
Begin DoDot:1
+5 SET ABMR(1,170)=$$ENVY^ABMERUTL(ABMP("INS"),ABMP("VTYP"))
End DoDot:1
+6 IF ABMR(1,170)=""
SET ABMR(1,170)=$$RCID^ABMERUTL(ABMP("INS"))
+7 SET ABMR(1,170)=$$FMT^ABMERUTL(ABMR(1,170),16)
+8 QUIT
180 ;243-243 Receiver Type
+1 SET ABMR(1,180)=$GET(ABMR(1,40))
+2 SET ABMR(1,180)=$EXTRACT(ABMR(1,180))
+3 IF ABMR(1,180)=""
SET ABMR(1,180)=" "
+4 QUIT
190 ;244-248 Version Code-National
+1 SET ABMR(1,190)="00200"
+2 QUIT
200 ;249-253 Version Code-Local
+1 SET ABMR(1,200)="00200"
+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-292 Filler (National Use)
+1 SET ABMR(1,280)=" "
+2 QUIT
290 ;293-320 Filler (Local Use)
+1 SET ABMR(1,290)=""
+2 SET ABMR(1,290)=$$FMT^ABMERUTL(ABMR(1,290),28)
+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