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
ABME8L7 ; IHS/ASDST/DMJ - Header
+1 ;;2.6;IHS 3P BILLING SYSTEM;**3**;NOV 12, 2009
+2 ;Header Segments
+3 ;
+4 ; IHS/SD/SDR - v2.5 p8 - task 6 - Don't send attending if ambulance
+5 ; IHS/SD/SDR - v2.5 p11 - NPI
+6 ; IHS/SD/SDR - v2.5 p12 - IM24975 - Changes for Value Options
+7 ; IHS/SD/SDR - v2.5 p12 - IM25247 - Add missing REF segment for TIN if NPI ONLY
+8 ; IHS/SD/SDR - abm*2.6*3 - HEAT8933 - do REF*LU for ND Medicaid
+9 ;
EP ;START HERE
+1 NEW ABM
+2 ; Build Claim Level Provider array
DO GETPRV^ABMEEPRV
+3 SET ABMPAYER=ABMP("INS")
+4 ;
+5 ; Loop 2310A - Attending Physician Name
+6 SET ABMLOOP="2310A"
+7 IF $DATA(ABMP("PRV","A"))
Begin DoDot:1
+8 IF $GET(ABMP("CLIN"))="A3"
QUIT
+9 SET ABM("PRV")=$ORDER(ABMP("PRV","A",0))
+10 DO EP^ABME8NM1("71")
+11 DO WR^ABMUTL8("NM1")
+12 DO EP^ABME8PRV("AT",ABM("PRV"))
+13 DO WR^ABMUTL8("PRV")
+14 IF ABMNPIU="N"
Begin DoDot:2
+15 ;Remove REF, OK Medicaid only
IF (ABMNPIU="N")&(ABMP("EXP")=21)&(($PIECE($GET(^AUTNINS(ABMP("INS"),0)),U)="OKLAHOMA MEDICAID")!($PIECE($GET(^AUTNINS(ABMP("INS"),0)),U)["OK MEDICAID"))
QUIT
+16 ;AZ Medicaid
IF ((ABMRCID="99999")!(ABMRCID="AHCCCS866004791"))
QUIT
+17 DO EP^ABME8REF("EI",9999999.06,DUZ(2))
+18 DO WR^ABMUTL8("REF")
End DoDot:2
+19 IF ABMNPIU'="N"
Begin DoDot:2
+20 ;I ABMRCID="FHC&AFFILIATES" D ;abm*2.6*3 HEAT8933
+21 ;abm*2.6*3 HEAT8933
IF ABMRCID="FHC&AFFILIATES"!($PIECE($GET(^AUTNINS(ABMP("INS"),0)),U)="NORTH DAKOTA MEDICAID")
Begin DoDot:3
+22 DO EP^ABME8REF("LU",9999999.06,ABMP("LDFN"))
+23 DO WR^ABMUTL8("REF")
End DoDot:3
+24 IF '$TEST
DO EP^ABME8REF(ABMP("RTYPE"),200,ABM("PRV"))
DO WR^ABMUTL8("REF")
End DoDot:2
End DoDot:1
+25 KILL ABMLOOP
+26 ;
+27 ; Loop 2310B - Operating Physician Name
+28 IF $DATA(ABMP("PRV","O"))
Begin DoDot:1
+29 IF $$RCID^ABMUTLP(ABMP("INS"))=731476619
QUIT
+30 SET ABM("PRV")=$ORDER(ABMP("PRV","O",0))
+31 DO EP^ABME8NM1("72")
+32 DO WR^ABMUTL8("NM1")
+33 IF ABMNPIU="N"
Begin DoDot:2
+34 DO EP^ABME8REF("EI",9999999.06,DUZ(2))
+35 ;Remove REF, OK Medicaid only
IF (ABMNPIU="N")&(ABMP("EXP")=21)&(($PIECE($GET(^AUTNINS(ABMP("INS"),0)),U)="OKLAHOMA MEDICAID")!($PIECE($GET(^AUTNINS(ABMP("INS"),0)),U)["OK MEDICAID"))
QUIT
+36 ;AZ Medicaid
IF ((ABMRCID="99999")!(ABMRCID="AHCCCS866004791"))
QUIT
+37 DO WR^ABMUTL8("REF")
End DoDot:2
+38 IF ABMNPIU'="N"
Begin DoDot:2
+39 IF ABMRCID="FHC&AFFILIATES"
Begin DoDot:3
+40 DO EP^ABME8REF("LU",9999999.06,ABMP("LDFN"))
+41 DO WR^ABMUTL8("REF")
End DoDot:3
+42 IF '$TEST
DO EP^ABME8REF(ABMP("RTYPE"),200,ABM("PRV"))
DO WR^ABMUTL8("REF")
End DoDot:2
End DoDot:1
+43 ;
+44 ; Loop 2310C - Other Physician Name
+45 IF $DATA(ABMP("PRV","T"))
Begin DoDot:1
+46 IF $$RCID^ABMUTLP(ABMP("INS"))=731476619
QUIT
+47 SET ABM("PRV")=$ORDER(ABMP("PRV","T",0))
+48 DO EP^ABME8NM1("73")
+49 DO WR^ABMUTL8("NM1")
+50 IF ABMNPIU="N"
Begin DoDot:2
+51 DO EP^ABME8REF("EI",9999999.06,DUZ(2))
+52 DO WR^ABMUTL8("REF")
End DoDot:2
+53 IF ABMNPIU'="N"
Begin DoDot:2
+54 IF ABMRCID="FHC&AFFILIATES"
Begin DoDot:3
+55 DO EP^ABME8REF("LU",9999999.06,ABMP("LDFN"))
+56 DO WR^ABMUTL8("REF")
End DoDot:3
+57 IF '$TEST
DO EP^ABME8REF(ABMP("RTYPE"),200,ABM("PRV"))
DO WR^ABMUTL8("REF")
End DoDot:2
End DoDot:1
+58 ;
+59 ; Loop 2310E - Service Facility Name
+60 IF ABMP("LDFN")'=DUZ(2)
Begin DoDot:1
+61 DO EP^ABME8NM1("FA")
+62 DO WR^ABMUTL8("NM1")
+63 DO EP^ABME8N3(4,ABMP("LDFN"))
+64 DO WR^ABMUTL8("N3")
+65 DO EP^ABME8N4(4,ABMP("LDFN"))
+66 DO WR^ABMUTL8("N4")
+67 IF ABMNPIU'="N"
Begin DoDot:2
+68 IF ABMP("ITYPE")="R"
Begin DoDot:3
+69 DO EP^ABME8REF("1C",9999999.06,ABMP("LDFN"))
+70 DO WR^ABMUTL8("REF")
End DoDot:3
+71 IF ABMP("ITYPE")="D"!(ABMP("ITYPE")="K")
Begin DoDot:3
+72 DO EP^ABME8REF("1D",9999999.06,ABMP("LDFN"))
+73 DO WR^ABMUTL8("REF")
End DoDot:3
End DoDot:2
End DoDot:1
+74 QUIT