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

ABMEAA0.m

Go to the documentation of this file.
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