ABME8L14 ; IHS/ASDST/DMJ - Header
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;Header Segments
;
; IHS/SD/SDR - V2.5 P8 - IM12418/IM14732/IM16264/IM16363/IM16618
; Treat rendering/attending the same
;
; IHS/SD/SDR - v2.5 p11 - NPI
;
; IHS/SD/SDR - v2.5 p12 - IM25247
; Add missing REG segment for TIN if NPI ONLY
;
EP ;START HERE
N ABM
D GETPRV^ABMEEPRV ; Build Claim Level Provider array
;
; Loop 2310A - Referring Physician Name
I $D(ABMP("PRV","F")) D
.S ABM("PRV")=$O(ABMP("PRV","F",0))
.D EP^ABME8NM1("DN")
.D WR^ABMUTL8("NM1")
.D EP^ABME8PRV("RF",ABM("PRV"))
.D WR^ABMUTL8("PRV")
.I ABMNPIU="N" D
..Q:((ABMRCID="99999")!(ABMRCID="AHCCCS866004791")) ;AZ Medicaid
..D EP^ABME8REF("EI",9999999.06,DUZ(2))
..D WR^ABMUTL8("REF")
.I ABMNPIU'="N" D
..D EP^ABME8REF(ABMP("RTYPE"),200,ABM("PRV"))
..D WR^ABMUTL8("REF")
;
; Loop 2310B - Rendering Physician Name
I $D(ABMP("PRV","R"))!($D(ABMP("PRV","A"))) D
.S ABM("PRV")=$S($D(ABMP("PRV","R")):$O(ABMP("PRV","R",0)),1:$O(ABMP("PRV","A",0)))
.D EP^ABME8NM1("82")
.D WR^ABMUTL8("NM1")
.D EP^ABME8PRV("PE",ABM("PRV"))
.D WR^ABMUTL8("PRV")
.I ABMNPIU="N" D
..D EP^ABME8REF("EI",9999999.06,DUZ(2))
..Q:((ABMRCID="99999")!(ABMRCID="AHCCCS866004791")) ;AZ Medicaid
..D WR^ABMUTL8("REF")
.I ABMNPIU'="N" D
..D EP^ABME8REF(ABMP("RTYPE"),200,ABM("PRV"))
..D WR^ABMUTL8("REF")
;
; Loop 2310C - Service Facility Name
I "21^22^31^35"[$$POS^ABMERUTL() D
.D EP^ABME8NM1("FA")
.D WR^ABMUTL8("NM1")
.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
ABME8L14 ; IHS/ASDST/DMJ - Header
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;Header Segments
+3 ;
+4 ; IHS/SD/SDR - V2.5 P8 - IM12418/IM14732/IM16264/IM16363/IM16618
+5 ; Treat rendering/attending the same
+6 ;
+7 ; IHS/SD/SDR - v2.5 p11 - NPI
+8 ;
+9 ; IHS/SD/SDR - v2.5 p12 - IM25247
+10 ; Add missing REG segment for TIN if NPI ONLY
+11 ;
EP ;START HERE
+1 NEW ABM
+2 ; Build Claim Level Provider array
DO GETPRV^ABMEEPRV
+3 ;
+4 ; Loop 2310A - Referring Physician Name
+5 IF $DATA(ABMP("PRV","F"))
Begin DoDot:1
+6 SET ABM("PRV")=$ORDER(ABMP("PRV","F",0))
+7 DO EP^ABME8NM1("DN")
+8 DO WR^ABMUTL8("NM1")
+9 DO EP^ABME8PRV("RF",ABM("PRV"))
+10 DO WR^ABMUTL8("PRV")
+11 IF ABMNPIU="N"
Begin DoDot:2
+12 ;AZ Medicaid
IF ((ABMRCID="99999")!(ABMRCID="AHCCCS866004791"))
QUIT
+13 DO EP^ABME8REF("EI",9999999.06,DUZ(2))
+14 DO WR^ABMUTL8("REF")
End DoDot:2
+15 IF ABMNPIU'="N"
Begin DoDot:2
+16 DO EP^ABME8REF(ABMP("RTYPE"),200,ABM("PRV"))
+17 DO WR^ABMUTL8("REF")
End DoDot:2
End DoDot:1
+18 ;
+19 ; Loop 2310B - Rendering Physician Name
+20 IF $DATA(ABMP("PRV","R"))!($DATA(ABMP("PRV","A")))
Begin DoDot:1
+21 SET ABM("PRV")=$SELECT($DATA(ABMP("PRV","R")):$ORDER(ABMP("PRV","R",0)),1:$ORDER(ABMP("PRV","A",0)))
+22 DO EP^ABME8NM1("82")
+23 DO WR^ABMUTL8("NM1")
+24 DO EP^ABME8PRV("PE",ABM("PRV"))
+25 DO WR^ABMUTL8("PRV")
+26 IF ABMNPIU="N"
Begin DoDot:2
+27 DO EP^ABME8REF("EI",9999999.06,DUZ(2))
+28 ;AZ Medicaid
IF ((ABMRCID="99999")!(ABMRCID="AHCCCS866004791"))
QUIT
+29 DO WR^ABMUTL8("REF")
End DoDot:2
+30 IF ABMNPIU'="N"
Begin DoDot:2
+31 DO EP^ABME8REF(ABMP("RTYPE"),200,ABM("PRV"))
+32 DO WR^ABMUTL8("REF")
End DoDot:2
End DoDot:1
+33 ;
+34 ; Loop 2310C - Service Facility Name
+35 IF "21^22^31^35"[$$POS^ABMERUTL()
Begin DoDot:1
+36 DO EP^ABME8NM1("FA")
+37 DO WR^ABMUTL8("NM1")
+38 IF ABMNPIU'="N"
Begin DoDot:2
+39 IF ABMP("ITYPE")="R"
Begin DoDot:3
+40 DO EP^ABME8REF("1C",9999999.06,ABMP("LDFN"))
+41 DO WR^ABMUTL8("REF")
End DoDot:3
+42 IF ABMP("ITYPE")="D"!(ABMP("ITYPE")="K")
Begin DoDot:3
+43 DO EP^ABME8REF("1D",9999999.06,ABMP("LDFN"))
+44 DO WR^ABMUTL8("REF")
End DoDot:3
End DoDot:2
End DoDot:1
+45 QUIT