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

ABMEH15.m

Go to the documentation of this file.
ABMEH15 ; IHS/ASDST/DMJ - HCFA-1500 EMC RECORD BA1 (Provider) ;     
 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
 ;
 ; IHS/ASDS/DMJ - 04/18/00 - V2.4 Patch 1 - NOIS HQW-0500-100040
 ;     Modified location code to check for satellite first.  If no
 ;     satellite, use parent.
 ; IHS/ASDS/DMJ - 08/30/00 - V2.4 Patch 3 - NOIS HQW-0800-100133
 ;     Modified to check provider number under DUZ(2) if missing
 ;     ABMP("LDFN")
 ;
START ;START HERE
 K ABMREC(15),ABMR(15)
 S ABME("RTYPE")=15
 D LOOP
 S ABMRT(95,"RTOT")=ABMRT(95,"RTOT")+1
 K ABME,ABM
 Q
 ;
LOOP ;LOOP HERE
 F I=10:10:200 D
 .D @I
 .I $D(^ABMEXLM("AA",+$G(ABMP("INS")),+$G(ABMP("EXP")),15,I)) D @(^(I))
 .I '$G(ABMP("NOFMT")) S ABMREC(15)=$G(ABMREC(15))_ABMR(15,I)
 Q
 ;
10 ;Record type
 S ABMR(15,10)="BA1"
 Q
20 ;4-18 EMC Provider ID
 S ABMR(15,20)=$P($G(^ABMNINS(ABMP("LDFN"),ABMP("INS"),1,ABMP("VTYP"),0)),"^",8)
 S:ABMR(15,20)="" ABMR(15,20)=$P($G(^ABMNINS(DUZ(2),ABMP("INS"),1,ABMP("VTYP"),0)),"^",8)
 S:ABMR(15,20)="" ABMR(15,20)=$P($G(^AUTNINS(ABMP("INS"),15,ABMP("LDFN"),0)),"^",2)
 S:$$RCID^ABMERUTL(ABMP("INS"))=99999 ABMR(15,20)="00"_ABMR(15,20) ;TMJ changed and tested
 S ABMR(15,20)=$$FMT^ABMERUTL(ABMR(15,20),15)
 Q
30 ;19-21 Type of Batch
 S ABMR(15,30)=100
 I $$RCID^ABMERUTL(ABMP("INS"))'=99999 D
 .S:ABMP("VTYP")=998 ABMR(15,30)=200
 .S:ABMP("VTYP")=997 ABMR(15,30)=300
 Q
 ;
40 ;22-25 Batch Number
 S ABMR(15,40)=$G(ABMEF("BATCH#"))
 S ABMR(15,40)=$$FMT^ABMERUTL(ABMR(15,40),"4NR")
 Q
50 ;26-31 Batch ID
 S ABMR(15,50)=$G(ABMR(1,50))
 S ABMR(15,50)=$$FMT^ABMERUTL(ABMR(15,50),6)
 Q
60 ;32-34 Provider Type Org
 S ABMR(15,60)=""
 S ABMR(15,60)=$$FMT^ABMERUTL(ABMR(15,60),3)
 Q
70 ;35-64 Prov Svc Addr 1
 D DIQ1
 S ABMR(15,70)=$G(ABM(9999999.06,DUZ(2),.14,"E"))
 S ABMR(15,70)=$$FMT^ABMERUTL(ABMR(15,70),30)
 Q
80 ;65-94 Prov Svc Addr2
 S ABMR(15,80)=""
 S ABMR(15,80)=$$FMT^ABMERUTL(ABMR(15,80),30)
 Q
90 ;95-114 Prov Svc City
 S ABMR(15,90)=$G(ABM(9999999.06,DUZ(2),.15,"E"))
 S ABMR(15,90)=$$FMT^ABMERUTL(ABMR(15,90),20)
 Q
100 ;115-116 Prov Svc State
 S ABMR(15,100)=$G(ABM(9999999.06,DUZ(2),.16,"I"))
 S ABMR(15,100)=$P($G(^DIC(5,+ABMR(15,100),0)),"^",2)
 S ABMR(15,100)=$$FMT^ABMERUTL(ABMR(15,100),2)
 Q
110 ;117-125 Prov Svc Zip     
 S ABMR(15,110)=$G(ABM(9999999.06,DUZ(2),.17,"E"))
 S ABMR(15,110)=$$FMT^ABMERUTL(ABMR(15,110),9)
 Q
120 ;126-135 Prov Svc Phone
 S ABMR(15,120)=$G(ABM(9999999.06,DUZ(2),.13,"E"))
 S ABMR(15,120)=$TR(ABMR(15,120),"()- ")
 S ABMR(15,120)=$$FMT^ABMERUTL(ABMR(15,120),10)
 Q
130 ;136-165 Prov Pay To Addr1     
 D DIQ2
 S ABMR(15,130)=$G(ABM(9999999.06,+ABMP("PAYDFN"),.14,"E"))
 S ABMR(15,130)=$$FMT^ABMERUTL(ABMR(15,130),30)
 Q
140 ;166-195 Prov Pay To Addr2
 S ABMR(15,140)=""
 S ABMR(15,140)=$$FMT^ABMERUTL(ABMR(15,140),30)
 Q
150 ;196-215 Prov Pay To City
 S ABMR(15,150)=$G(ABM(9999999.06,+ABMP("PAYDFN"),.15,"E"))
 S ABMR(15,150)=$$FMT^ABMERUTL(ABMR(15,150),20)
 Q
160 ;216-217 Prov Pay To State
 S ABMR(15,160)=$G(ABM(9999999.06,+ABMP("PAYDFN"),.16,"I"))
 S ABMR(15,160)=$P($G(^DIC(5,+ABMR(15,160),0)),"^",2)
 S ABMR(15,160)=$$FMT^ABMERUTL(ABMR(15,160),2)
 Q
170 ;218-226 Prov Pay To Zip
 S ABMR(15,170)=$G(ABM(9999999.06,+ABMP("PAYDFN"),.17,"E"))
 S ABMR(15,170)=$$FMT^ABMERUTL(ABMR(15,170),9)
 Q
180 ;227-236 Prov Pay To Phone
 S ABMR(15,180)=$G(ABM(9999999.06,+ABMP("PAYDFN"),.13,"E"))
 S ABMR(15,180)=$TR(ABMR(15,180),"()- ")
 S ABMR(15,180)=$$FMT^ABMERUTL(ABMR(15,180),10)
 Q
190 ;237-278 Filler (National Use)
 S ABMR(15,190)=""
 S ABMR(15,190)=$$FMT^ABMERUTL(ABMR(15,190),42)
 Q
200 ;279-320 Filler (Local Use)
 S ABMR(15,200)=""
 S ABMR(15,200)=$$FMT^ABMERUTL(ABMR(15,200),42)
 Q
DIQ1 ;PULL LOCATION DATA VIA DIQ1
 N I
 S DIQ="ABM("
 S DIQ(0)="IE"
 S DIC="^AUTTLOC("
 S DA=DUZ(2)
 S DR=".01;.13;.14;.15;.16;.17;.21;.22"
 D EN^DIQ1
 Q
DIQ2 ;pay to info
 N I
 S ABMP("PAYDFN")=$P($G(^ABMDPARM(DUZ(2),1,2)),"^",3)
 Q:ABMP("PAYDFN")=""
 Q:ABMP("PAYDFN")=DUZ(2)
 S DA=ABMP("PAYDFN")
 S DR=".01;.13;.14;.15;.16;.17;.21"
 D EN^DIQ1
 K DIQ
 Q
DIQ3 ;GET SITE PARAMETER INFO    
 N I
 S DIQ="ABM("
 S DIQ(0)="E"
 S DIC="^ABMDPARM(DUZ(2),"
 S DA=1
 S DR=.26
 D EN^DIQ1 K DIQ
 Q
 ;
EX(ABMX,ABMY) ;EXTRINSIC FUNCTION HERE
 ;
 ;  INPUT:  ABMX = data element
 ;             Y = bill internal entry number
 ;
 ; OUTPUT:     Y = bill internal entry number
 ;
 S ABMP("BDFN")=ABMY
 D SET^ABMERUTL
 I '$G(ABMP("NOFMT")) S ABMP("FMT")=0
 D @ABMX
 S Y=ABMR(20,ABMX)
 K ABMR(20,ABMX),ABME,ABM,ABMX,ABMY
 I $D(ABMP("FMT")) S ABMP("FMT")=1
 Q Y