ABME5L6 ; IHS/ASDST/DMJ - Header
;;2.6;IHS Third Party Billing System;**6,8**;NOV 12, 2009
;Header Segments
;
START ;START HERE
D DXSET^ABMUTL8(ABMP("BDFN"))
;principal DX (BK)
D EP^ABME5HI("BK")
D WR^ABMUTL8("HI")
;admitting (BJ) or patient's reason for visit (PR)
I $E(ABMP("BTYP"),1,2)=11 D EP^ABME5HI("BJ") D WR^ABMUTL8("HI")
I $E(ABMP("BTYP"),1,2)'=11,$G(ABMDX("ADM"))'="" D EP^ABME5HI("PR") D WR^ABMUTL8("HI")
;external cause of injury (BN)
I $D(ABMDXE) D
.D EP^ABME5HI("BN")
.D WR^ABMUTL8("HI")
;other (BF)
I $G(ABMDX(2))'="" D
.D EP^ABME5HI("BF")
.D WR^ABMUTL8("HI")
;
S ABMP("FLAT")=$$FLAT^ABMDUTL(ABMP("INS"),ABMP("VTYP"),ABMP("VDT"))
I $P($G(^ABMNINS(ABMP("LDFN"),ABMP("INS"),1,ABMP("VTYP"),1)),U,9)'="N" D PXSET^ABMUTL8(ABMP("BDFN"))
;principal PX (BR)
I $G(ABMPX(1))'="" D
.D EP^ABME5HI("BR")
.D WR^ABMUTL8("HI")
I $G(ABMPX(2))'="" D
.D EP^ABME5HI("BQ")
.D WR^ABMUTL8("HI")
I $O(^ABMDBILL(DUZ(2),ABMP("BDFN"),57,0)) D
.D OSSET^ABMUTL8(ABMP("BDFN"))
.D EP^ABME5HI("BI")
.D WR^ABMUTL8("HI")
I $O(^ABMDBILL(DUZ(2),ABMP("BDFN"),51,0)) D
.D OCSET^ABMUTL8(ABMP("BDFN"))
.D EP^ABME5HI("BH")
.D WR^ABMUTL8("HI")
I $O(^ABMDBILL(DUZ(2),ABMP("BDFN"),55,0)) D
.D VASET^ABMUTL8(ABMP("BDFN"))
.D EP^ABME5HI("BE")
.D WR^ABMUTL8("HI")
I $O(^ABMDBILL(DUZ(2),ABMP("BDFN"),53,0)) D
.D CDSET^ABMUTL8(ABMP("BDFN"))
.D EP^ABME5HI("BG")
.D WR^ABMUTL8("HI")
;start old code abm*2.6*8 5010
;I $P(ABMB6,"^",6) D
;.D EP^ABME5QTY("NA")
;.D WR^ABMUTL8("QTY")
;I $P(ABMB7,"^",3) D
;.; QUIT if Medicare and not inpatient
;.I $P($G(^AUTNINS(ABMP("INS"),2)),U)="R",(ABMP("VTYP")'=111) Q
;.D EP^ABME5QTY("CA")
;.D WR^ABMUTL8("QTY")
;end old code abm*2.6*8 5010
Q
ABME5L6 ; IHS/ASDST/DMJ - Header
+1 ;;2.6;IHS Third Party Billing System;**6,8**;NOV 12, 2009
+2 ;Header Segments
+3 ;
START ;START HERE
+1 DO DXSET^ABMUTL8(ABMP("BDFN"))
+2 ;principal DX (BK)
+3 DO EP^ABME5HI("BK")
+4 DO WR^ABMUTL8("HI")
+5 ;admitting (BJ) or patient's reason for visit (PR)
+6 IF $EXTRACT(ABMP("BTYP"),1,2)=11
DO EP^ABME5HI("BJ")
DO WR^ABMUTL8("HI")
+7 IF $EXTRACT(ABMP("BTYP"),1,2)'=11
IF $GET(ABMDX("ADM"))'=""
DO EP^ABME5HI("PR")
DO WR^ABMUTL8("HI")
+8 ;external cause of injury (BN)
+9 IF $DATA(ABMDXE)
Begin DoDot:1
+10 DO EP^ABME5HI("BN")
+11 DO WR^ABMUTL8("HI")
End DoDot:1
+12 ;other (BF)
+13 IF $GET(ABMDX(2))'=""
Begin DoDot:1
+14 DO EP^ABME5HI("BF")
+15 DO WR^ABMUTL8("HI")
End DoDot:1
+16 ;
+17 SET ABMP("FLAT")=$$FLAT^ABMDUTL(ABMP("INS"),ABMP("VTYP"),ABMP("VDT"))
+18 IF $PIECE($GET(^ABMNINS(ABMP("LDFN"),ABMP("INS"),1,ABMP("VTYP"),1)),U,9)'="N"
DO PXSET^ABMUTL8(ABMP("BDFN"))
+19 ;principal PX (BR)
+20 IF $GET(ABMPX(1))'=""
Begin DoDot:1
+21 DO EP^ABME5HI("BR")
+22 DO WR^ABMUTL8("HI")
End DoDot:1
+23 IF $GET(ABMPX(2))'=""
Begin DoDot:1
+24 DO EP^ABME5HI("BQ")
+25 DO WR^ABMUTL8("HI")
End DoDot:1
+26 IF $ORDER(^ABMDBILL(DUZ(2),ABMP("BDFN"),57,0))
Begin DoDot:1
+27 DO OSSET^ABMUTL8(ABMP("BDFN"))
+28 DO EP^ABME5HI("BI")
+29 DO WR^ABMUTL8("HI")
End DoDot:1
+30 IF $ORDER(^ABMDBILL(DUZ(2),ABMP("BDFN"),51,0))
Begin DoDot:1
+31 DO OCSET^ABMUTL8(ABMP("BDFN"))
+32 DO EP^ABME5HI("BH")
+33 DO WR^ABMUTL8("HI")
End DoDot:1
+34 IF $ORDER(^ABMDBILL(DUZ(2),ABMP("BDFN"),55,0))
Begin DoDot:1
+35 DO VASET^ABMUTL8(ABMP("BDFN"))
+36 DO EP^ABME5HI("BE")
+37 DO WR^ABMUTL8("HI")
End DoDot:1
+38 IF $ORDER(^ABMDBILL(DUZ(2),ABMP("BDFN"),53,0))
Begin DoDot:1
+39 DO CDSET^ABMUTL8(ABMP("BDFN"))
+40 DO EP^ABME5HI("BG")
+41 DO WR^ABMUTL8("HI")
End DoDot:1
+42 ;start old code abm*2.6*8 5010
+43 ;I $P(ABMB6,"^",6) D
+44 ;.D EP^ABME5QTY("NA")
+45 ;.D WR^ABMUTL8("QTY")
+46 ;I $P(ABMB7,"^",3) D
+47 ;.; QUIT if Medicare and not inpatient
+48 ;.I $P($G(^AUTNINS(ABMP("INS"),2)),U)="R",(ABMP("VTYP")'=111) Q
+49 ;.D EP^ABME5QTY("CA")
+50 ;.D WR^ABMUTL8("QTY")
+51 ;end old code abm*2.6*8 5010
+52 QUIT