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

ABME5L14.m

Go to the documentation of this file.
ABME5L14 ; IHS/SD/SDR - Header 
 ;;2.6;IHS 3P BILLING SYSTEM;**6,8,9,14,21**;NOV 12, 2009;Build 379
 ;Header Segments
 ;IHS/SD/SDR - 2.6*14 - HEAT70826 - Modified to remove 2310B loop based on SGTM entry
 ;IHS/SD/SDR - 2.6*21 - HEAT70826 - Change made in p14 was incomplete.  P21 fixes it up.
 ;
EP ;START HERE
 N ABM
 D GETPRV^ABMEEPRV   ;Build Claim Level Provider array
 ;
 ; Loop 2310A - Referring Physician Name
 S ABMLOOP="2310A"
 I $D(ABMP("PRV","F")) D
 .S ABM("PRV")=$O(ABMP("PRV","F",0))
 .D EP^ABME5NM1("DN")
 .D WR^ABMUTL8("NM1")
 .D EP^ABME5PRV("RF",ABM("PRV"))
 .D WR^ABMUTL8("PRV")
 .;I ABMNPIU="N" D
 .;.Q:((ABMRCID="99999")!(ABMRCID="AHCCCS866004791"))  ;AZ Medicaid
 .;.D EP^ABME5REF("EI",9999999.06,DUZ(2))
 .;.D WR^ABMUTL8("REF")
 .I ABMNPIU'="N" D
 ..D EP^ABME5REF(ABMP("RTYPE"),200,ABM("PRV"))
 ..D WR^ABMUTL8("REF")
 ;
 ; Loop 2310B - Rendering Physician Name
 S ABMLOOP="2310B"
 I $D(ABMP("PRV","R"))!($D(ABMP("PRV","A"))) D
 .;I $D(^ABMNINS(ABMP("LDFN"),ABMP("INS"),2.5,"ASEND",ABMP("EXP"),"2310B","N"))=1 Q  ;abm*2.6*14 HEAT70826  ;abm*2.6*21 IHS/SD/SDR HEAT70826
 .;start new abm*2.6*21 IHS/SD/SDR HEAT70826
 .S ABMOFLG=0
 .I $D(^ABMNINS(ABMP("LDFN"),ABMP("INS"),2.5,"ASEND",ABMP("EXP"),"2310B","00","0","N"))>0 D
 ..S ABMO=0
 ..F  S ABMO=$O(^ABMNINS(ABMP("LDFN"),ABMP("INS"),2.5,"ASEND",ABMP("EXP"),"2310B","00","0","N",ABMO)) Q:'ABMO  D
 ...I $P($G(^ABMNINS(ABMP("LDFN"),ABMP("INS"),2.5,ABMO,0)),U,6)=""!($P($G(^ABMNINS(ABMP("LDFN"),ABMP("INS"),2.5,ABMO,0)),U,6)=ABMP("VTYP")) S ABMOFLG=1
 .Q:ABMOFLG=1
 .;end new abm*2.6*21 IHS/SD/SDR HEAT70826
 .S ABM("PRV")=$S($D(ABMP("PRV","R")):$O(ABMP("PRV","R",0)),1:$O(ABMP("PRV","A",0)))
 .D EP^ABME5NM1("82")
 .D WR^ABMUTL8("NM1")
 .D EP^ABME5PRV("PE",ABM("PRV"))
 .D WR^ABMUTL8("PRV")
 .;I ABMNPIU="N" D
 .;.D EP^ABME5REF("EI",9999999.06,DUZ(2))
 .;.Q:((ABMRCID="99999")!(ABMRCID="AHCCCS866004791"))  ;AZ Medicaid
 .;.D WR^ABMUTL8("REF")
 .I ABMNPIU'="N" D
 ..D EP^ABME5REF(ABMP("RTYPE"),200,ABM("PRV"))
 ..D WR^ABMUTL8("REF")
 ;
 ; Loop 2310C - Service Facility Name
 S ABMLOOP="2310C"
 ;I "21^22^31^35"[$$POS^ABMERUTL() D  ;abm*2.6*8
 ;I $P($G(^DIC(4,DUZ(2),0)),U)'=($P($G(^DIC(4,ABMP("LDFN"),0)),U)) D  ;abm*2.6*8  ;abm*2.6*9 HEAT57746
 S ABMSLOC=$P($G(^ABMNINS(ABMP("LDFN"),ABMP("INS"),1,ABMP("VTYP"),1)),U,17)  ;abm*2.6*9 HEAT57746
 I ((ABMSLOC="S")!((ABMSLOC="D")!(ABMSLOC="")&($P($G(^DIC(4,DUZ(2),0)),U)'=$P($G(^DIC(4,ABMP("LDFN"),0)),U)))) D  ;abm*2.6*8  ;abm*2.6*9 HEAT57746
 .D EP^ABME5NM1("77")
 .D WR^ABMUTL8("NM1")
 .;abm*2.6*9 NOHEAT IHS/SD/AML 1/19/2012 - Add Service Line Address
 .D EP^ABME5N3(4,ABMP("LDFN"))
 .D WR^ABMUTL8("N3")
 .D EP^ABME5N4(4,ABMP("LDFN"))
 .D WR^ABMUTL8("N4")
 .;abm*2.6*9 NOHEAT IHS/SD/AML 1/19/2012 - End Add Service Line Address
 .;I ABMNPIU'="N" D
 .;.I ABMP("ITYPE")="R" D
 .;..D EP^ABME5REF("1C",9999999.06,ABMP("LDFN"))
 .;..D WR^ABMUTL8("REF")
 .;.I ABMP("ITYPE")="D"!(ABMP("ITYPE")="K") D
 .;..D EP^ABME5REF("1D",9999999.06,ABMP("LDFN"))
 .;..D WR^ABMUTL8("REF")
 ;
 ; Loop 2310E - Supervising Physician Name
 S ABMLOOP="2310E"
 I $D(ABMP("PRV","S")) D
 .S ABM("PRV")=$O(ABMP("PRV","S",0))
 .D EP^ABME5NM1("DQ")
 .D WR^ABMUTL8("NM1")
 Q