ABME8L6 ; IHS/ASDST/DMJ - Header
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;Header Segments
;
; 01/09/04 V2.5 P5 - 837 Modifications
; Don't send ICD's if flat rate (PX)
;
; IHS/SD/SDR - v2.5 p6 - 7/16/04 - IM14148 - Added code to remove
; QTY segment if Medicare and not inpatient
;
; IHS/SD/SDR - v2.5 p12 - IM24245
; Added check back for flat rate but made it conditional
; for bill type'=131 and Medicaid Exempt (NM Mcd)
; They don't want ICD-9s
;
START ;START HERE
D DXSET^ABMUTL8(ABMP("BDFN"))
D EP^ABME8HI("BK")
D WR^ABMUTL8("HI")
I $G(ABMDX(2))'="" D
.D EP^ABME8HI("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"))
I $G(ABMPX(1))'="" D
.D EP^ABME8HI("BP")
.D WR^ABMUTL8("HI")
I $G(ABMPX(2))'="" D
.D EP^ABME8HI("BO")
.D WR^ABMUTL8("HI")
I $O(^ABMDBILL(DUZ(2),ABMP("BDFN"),57,0)) D
.D OSSET^ABMUTL8(ABMP("BDFN"))
.D EP^ABME8HI("BI")
.D WR^ABMUTL8("HI")
I $O(^ABMDBILL(DUZ(2),ABMP("BDFN"),51,0)) D
.D OCSET^ABMUTL8(ABMP("BDFN"))
.D EP^ABME8HI("BH")
.D WR^ABMUTL8("HI")
I $O(^ABMDBILL(DUZ(2),ABMP("BDFN"),55,0)) D
.D VASET^ABMUTL8(ABMP("BDFN"))
.D EP^ABME8HI("BE")
.D WR^ABMUTL8("HI")
I $O(^ABMDBILL(DUZ(2),ABMP("BDFN"),53,0)) D
.D CDSET^ABMUTL8(ABMP("BDFN"))
.D EP^ABME8HI("BG")
.D WR^ABMUTL8("HI")
I $P(ABMB6,"^",6) D
.D EP^ABME8QTY("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^ABME8QTY("CA")
.D WR^ABMUTL8("QTY")
Q
ABME8L6 ; IHS/ASDST/DMJ - Header
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;Header Segments
+3 ;
+4 ; 01/09/04 V2.5 P5 - 837 Modifications
+5 ; Don't send ICD's if flat rate (PX)
+6 ;
+7 ; IHS/SD/SDR - v2.5 p6 - 7/16/04 - IM14148 - Added code to remove
+8 ; QTY segment if Medicare and not inpatient
+9 ;
+10 ; IHS/SD/SDR - v2.5 p12 - IM24245
+11 ; Added check back for flat rate but made it conditional
+12 ; for bill type'=131 and Medicaid Exempt (NM Mcd)
+13 ; They don't want ICD-9s
+14 ;
START ;START HERE
+1 DO DXSET^ABMUTL8(ABMP("BDFN"))
+2 DO EP^ABME8HI("BK")
+3 DO WR^ABMUTL8("HI")
+4 IF $GET(ABMDX(2))'=""
Begin DoDot:1
+5 DO EP^ABME8HI("BF")
+6 DO WR^ABMUTL8("HI")
End DoDot:1
+7 SET ABMP("FLAT")=$$FLAT^ABMDUTL(ABMP("INS"),ABMP("VTYP"),ABMP("VDT"))
+8 IF $PIECE($GET(^ABMNINS(ABMP("LDFN"),ABMP("INS"),1,ABMP("VTYP"),1)),U,9)'="N"
DO PXSET^ABMUTL8(ABMP("BDFN"))
+9 IF $GET(ABMPX(1))'=""
Begin DoDot:1
+10 DO EP^ABME8HI("BP")
+11 DO WR^ABMUTL8("HI")
End DoDot:1
+12 IF $GET(ABMPX(2))'=""
Begin DoDot:1
+13 DO EP^ABME8HI("BO")
+14 DO WR^ABMUTL8("HI")
End DoDot:1
+15 IF $ORDER(^ABMDBILL(DUZ(2),ABMP("BDFN"),57,0))
Begin DoDot:1
+16 DO OSSET^ABMUTL8(ABMP("BDFN"))
+17 DO EP^ABME8HI("BI")
+18 DO WR^ABMUTL8("HI")
End DoDot:1
+19 IF $ORDER(^ABMDBILL(DUZ(2),ABMP("BDFN"),51,0))
Begin DoDot:1
+20 DO OCSET^ABMUTL8(ABMP("BDFN"))
+21 DO EP^ABME8HI("BH")
+22 DO WR^ABMUTL8("HI")
End DoDot:1
+23 IF $ORDER(^ABMDBILL(DUZ(2),ABMP("BDFN"),55,0))
Begin DoDot:1
+24 DO VASET^ABMUTL8(ABMP("BDFN"))
+25 DO EP^ABME8HI("BE")
+26 DO WR^ABMUTL8("HI")
End DoDot:1
+27 IF $ORDER(^ABMDBILL(DUZ(2),ABMP("BDFN"),53,0))
Begin DoDot:1
+28 DO CDSET^ABMUTL8(ABMP("BDFN"))
+29 DO EP^ABME8HI("BG")
+30 DO WR^ABMUTL8("HI")
End DoDot:1
+31 IF $PIECE(ABMB6,"^",6)
Begin DoDot:1
+32 DO EP^ABME8QTY("NA")
+33 DO WR^ABMUTL8("QTY")
End DoDot:1
+34 IF $PIECE(ABMB7,"^",3)
Begin DoDot:1
+35 ; QUIT if Medicare and not inpatient
+36 IF $PIECE($GET(^AUTNINS(ABMP("INS"),2)),U)="R"
IF (ABMP("VTYP")'=111)
QUIT
+37 DO EP^ABME8QTY("CA")
+38 DO WR^ABMUTL8("QTY")
End DoDot:1
+39 QUIT