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

ABME8L7.m

Go to the documentation of this file.
ABME8L7 ; IHS/ASDST/DMJ - Header 
 ;;2.6;IHS 3P BILLING SYSTEM;**3**;NOV 12, 2009
 ;Header Segments
 ;
 ; IHS/SD/SDR - v2.5 p8 - task 6 - Don't send attending if ambulance
 ; IHS/SD/SDR - v2.5 p11 - NPI
 ; IHS/SD/SDR - v2.5 p12 - IM24975 - Changes for Value Options
 ; IHS/SD/SDR - v2.5 p12 - IM25247 - Add missing REF segment for TIN if NPI ONLY
 ; IHS/SD/SDR - abm*2.6*3 - HEAT8933 - do REF*LU for ND Medicaid
 ;
EP ;START HERE
 N ABM
 D GETPRV^ABMEEPRV             ; Build Claim Level Provider array
 S ABMPAYER=ABMP("INS")
 ;
 ; Loop 2310A - Attending Physician Name
 S ABMLOOP="2310A"
 I $D(ABMP("PRV","A")) D
 .Q:$G(ABMP("CLIN"))="A3"
 .S ABM("PRV")=$O(ABMP("PRV","A",0))
 .D EP^ABME8NM1("71")
 .D WR^ABMUTL8("NM1")
 .D EP^ABME8PRV("AT",ABM("PRV"))
 .D WR^ABMUTL8("PRV")
 .I ABMNPIU="N" D
 ..Q:(ABMNPIU="N")&(ABMP("EXP")=21)&(($P($G(^AUTNINS(ABMP("INS"),0)),U)="OKLAHOMA MEDICAID")!($P($G(^AUTNINS(ABMP("INS"),0)),U)["OK MEDICAID"))  ;Remove REF, OK Medicaid only
 ..Q:((ABMRCID="99999")!(ABMRCID="AHCCCS866004791"))  ;AZ Medicaid
 ..D EP^ABME8REF("EI",9999999.06,DUZ(2))
 ..D WR^ABMUTL8("REF")
 .I ABMNPIU'="N" D
 ..;I ABMRCID="FHC&AFFILIATES" D  ;abm*2.6*3 HEAT8933
 ..I ABMRCID="FHC&AFFILIATES"!($P($G(^AUTNINS(ABMP("INS"),0)),U)="NORTH DAKOTA MEDICAID") D  ;abm*2.6*3 HEAT8933
 ...D EP^ABME8REF("LU",9999999.06,ABMP("LDFN"))
 ...D WR^ABMUTL8("REF")
 ..E  D EP^ABME8REF(ABMP("RTYPE"),200,ABM("PRV")),WR^ABMUTL8("REF")
 K ABMLOOP
 ;
 ; Loop 2310B - Operating Physician Name
 I $D(ABMP("PRV","O")) D
 .Q:$$RCID^ABMUTLP(ABMP("INS"))=731476619
 .S ABM("PRV")=$O(ABMP("PRV","O",0))
 .D EP^ABME8NM1("72")
 .D WR^ABMUTL8("NM1")
 .I ABMNPIU="N" D
 ..D EP^ABME8REF("EI",9999999.06,DUZ(2))
 ..Q:(ABMNPIU="N")&(ABMP("EXP")=21)&(($P($G(^AUTNINS(ABMP("INS"),0)),U)="OKLAHOMA MEDICAID")!($P($G(^AUTNINS(ABMP("INS"),0)),U)["OK MEDICAID"))  ;Remove REF, OK Medicaid only
 ..Q:((ABMRCID="99999")!(ABMRCID="AHCCCS866004791"))  ;AZ Medicaid
 ..D WR^ABMUTL8("REF")
 .I ABMNPIU'="N" D
 ..I ABMRCID="FHC&AFFILIATES" D
 ...D EP^ABME8REF("LU",9999999.06,ABMP("LDFN"))
 ...D WR^ABMUTL8("REF")
 ..E  D EP^ABME8REF(ABMP("RTYPE"),200,ABM("PRV")),WR^ABMUTL8("REF")
 ;
 ; Loop 2310C - Other Physician Name
 I $D(ABMP("PRV","T")) D
 .Q:$$RCID^ABMUTLP(ABMP("INS"))=731476619
 .S ABM("PRV")=$O(ABMP("PRV","T",0))
 .D EP^ABME8NM1("73")
 .D WR^ABMUTL8("NM1")
 .I ABMNPIU="N" D
 ..D EP^ABME8REF("EI",9999999.06,DUZ(2))
 ..D WR^ABMUTL8("REF")
 .I ABMNPIU'="N" D
 ..I ABMRCID="FHC&AFFILIATES" D
 ...D EP^ABME8REF("LU",9999999.06,ABMP("LDFN"))
 ...D WR^ABMUTL8("REF")
 ..E  D EP^ABME8REF(ABMP("RTYPE"),200,ABM("PRV")),WR^ABMUTL8("REF")
 ;
 ; Loop 2310E - Service Facility Name
 I ABMP("LDFN")'=DUZ(2) D
 .D EP^ABME8NM1("FA")
 .D WR^ABMUTL8("NM1")
 .D EP^ABME8N3(4,ABMP("LDFN"))
 .D WR^ABMUTL8("N3")
 .D EP^ABME8N4(4,ABMP("LDFN"))
 .D WR^ABMUTL8("N4")
 .I ABMNPIU'="N" D
 ..I ABMP("ITYPE")="R" D
 ...D EP^ABME8REF("1C",9999999.06,ABMP("LDFN"))
 ...D WR^ABMUTL8("REF")
 ..I ABMP("ITYPE")="D"!(ABMP("ITYPE")="K") D
 ...D EP^ABME8REF("1D",9999999.06,ABMP("LDFN"))
 ...D WR^ABMUTL8("REF")
 Q