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

ABME5HI.m

Go to the documentation of this file.
ABME5HI ; IHS/ASDST/DMJ - 837 HI Segment 
 ;;2.6;IHS Third Party Billing System;**6,8,9,10,11,14,16,18**;NOV 12, 2009;Build 289
 ;Transaction Set Header
 ;IHS/SD/SDR - 2.6*14 - ICD10 002F - Added code to put A for ICD10 codes
 ;IHS/SD/SDR - 2.6*16 - HEAT217211 - Fixed typo for HI02
 ;IHS/SD/SDR - 2.6*16 - HEAT231506 - Added code so second DX will print for 837D
 ;IHS/SD/SDR - 2.6*18 - HEAT242924 - Made 4 DXs print for 837D; was only printing 2
 ;
EP(X) ;EP
 K ABMREC("HI"),ABMR("HI")
 S ABME("RTYPE")="HI"
 S ABMEIC=X
 D LOOP
 K ABME,ABM
 Q
LOOP ;LOOP HERE
 F I=10:10:130 D
 .D @I
 .I $D(^ABMEXLM("AA",+$G(ABMP("INS")),+$G(ABMP("EXP")),ABME("RTYPE"),I)) D @(^(I))
 .I $G(ABMREC("HI"))'="" S ABMREC("HI")=ABMREC("HI")_"*"
 .S ABMREC("HI")=$G(ABMREC("HI"))_ABMR("HI",I)
 Q
10 ;segment
 S ABMR("HI",10)="HI"
 Q
20 ;HI01 - Health Care Code Information
 S ABMR("HI",20)=""
 I ABMEIC="BK" S ABMR("HI",20)=$$DXP^ABMUTL8(ABMP("BDFN"))
 I ABMEIC="BF" S ABMR("HI",20)=$G(ABMDX(2))
 ;I ABMEIC="BJ"!(ABMEIC="PR") S ABMR("HI",20)=ABMEIC_":"_$G(ABMDX("ADM"))  ;abm*2.6*14 ICD10 002F
 I ABMEIC="BJ"!(ABMEIC="PR") S ABMR("HI",20)=$S((+$G(ABMDX("ADMTYP"))>1):"A"_ABMEIC,1:ABMEIC)_":"_$G(ABMDX("ADM"))  ;abm*2.6*14 ICD10 002F
 I ABMEIC="BN" S ABMR("HI",20)=$G(ABMDXE(1))
 I ABMEIC="BR" S ABMR("HI",20)=$G(ABMPX(1))
 I ABMEIC="BQ" S ABMR("HI",20)=$G(ABMPX(2))
 I ABMEIC="BI" S ABMR("HI",20)=$G(ABMOS(1))
 I ABMEIC="BH" S ABMR("HI",20)=$G(ABMOC(1))
 I ABMEIC="BE" S ABMR("HI",20)=$G(ABMVA(1))
 I ABMEIC="BG" S ABMR("HI",20)=$G(ABMCD(1))
 I ABMEIC="BZ" S ABMR("HI",20)=$$DXP^ABMUTL8(ABMP("BDFN"))
 Q
30 ;HI02 - Health Care Code Information
 S ABMR("HI",30)=""
 ;I ABMEIC="BK",ABMP("EXP")=32 S ABMR("HI",30)=$G(ABMDX(2))  ;abm*2.6*16 IHS/SD/SDR HEAT231506
 I ABMEIC="BK",(ABMP("EXP")=32!(ABMP("EXP")=33)) S ABMR("HI",30)=$G(ABMDX(2))  ;abm*2.6*16 IHS/SD/SDR HEAT231506
 I ABMEIC="BF",$D(ABMDX(2)) S ABMR("HI",30)=$G(ABMDX(3))
 I ABMEIC="BQ",$D(ABMPX(3)) S ABMR("HI",30)=$G(ABMPX(3))
 ;I ABMEIC="BN",$D(ABMDXE(2)) S ABMR("HI",30)=$G(ABMDXE(2))  ;abm*2.6*10 NOHEAT
 ;I ABMEIC="BN",$D(ABMDXE(2)),(ABMR("HI",20)'=ABMDXE(2)) S ABMR("HI",30)=$G(ABMDXE(2))  ;abm*2.6*10 NOHEAT don't print E-code if entry is same E-code  ;abm*2.6*16 IHS/SD/SDR HEAT217211
 I ABMEIC="BN",$D(ABMDXE(2)),(ABMR("HI",30)'=ABMDXE(2)) S ABMR("HI",30)=$G(ABMDXE(2))  ;abm*2.6*10 NOHEAT don't print E-code if entry is same E-code  ;abm*2.6*16 IHS/SD/SDR HEAT217211
 I ABMEIC="BH" S ABMR("HI",30)=$G(ABMOC(2))  ;abm*2.6*9 IHS/SD/AML 2/15/2012 HEAT59363
 I ABMEIC="BE" S ABMR("HI",30)=$G(ABMVA(2))  ;abm*2.6*11 IHS/SD/AML HEAT89676
 Q
40 ;HI03 - Health Care Code Information
 S ABMR("HI",40)=""
 ;I ABMEIC="BK",ABMP("EXP")=32 S ABMR("HI",40)=$G(ABMDX(3))  ;abm*2.6*18 IHS/SD/SDR HEAT242924
 I ABMEIC="BK",(ABMP("EXP")=32!(ABMP("EXP")=33)) S ABMR("HI",40)=$G(ABMDX(3))  ;abm*2.6*18 IHS/SD/SDR HEAT242924
 I ABMEIC="BF",$D(ABMDX(3)) S ABMR("HI",40)=$G(ABMDX(4))
 I ABMEIC="BQ",$D(ABMPX(4)) S ABMR("HI",40)=$G(ABMPX(4))
 I ABMEIC="BN",$D(ABMDXE(3)) S ABMR("HI",40)=$G(ABMDXE(3))
 I ABMEIC="BH" S ABMR("HI",40)=$G(ABMOC(3))  ;abm*2.6*9 IHS/SD/AML 2/15/2012 HEAT59363
 I ABMEIC="BE" S ABMR("HI",40)=$G(ABMVA(3))  ;abm*2.6*11 IHS/SD/AML HEAT89676
 Q
50 ;HI04 - Health Care Code Information
 S ABMR("HI",50)=""
 ;I ABMEIC="BK",ABMP("EXP")=32 S ABMR("HI",50)=$G(ABMDX(4))  ;abm*2.6*18 IHS/SD/SDR HEAT242924
 I ABMEIC="BK",(ABMP("EXP")=32!(ABMP("EXP")=33)) S ABMR("HI",50)=$G(ABMDX(4))  ;abm*2.6*18 IHS/SD/SDR HEAT242924
 I ABMEIC="BF",$D(ABMDX(4)) S ABMR("HI",50)=$G(ABMDX(5))
 I ABMEIC="BQ",$D(ABMPX(5)) S ABMR("HI",50)=$G(ABMPX(5))
 I ABMEIC="BN",$D(ABMDXE(4)) S ABMR("HI",50)=$G(ABMDXE(4))
 I ABMEIC="BH" S ABMR("HI",50)=$G(ABMOC(4))  ;abm*2.6*9 IHS/SD/AML 2/15/2012 HEAT59363
 I ABMEIC="BE" S ABMR("HI",50)=$G(ABMVA(4))  ;abm*2.6*11 IHS/SD/AML HEAT89676
 Q
60 ;HI05 - Health Care Code Information
 S ABMR("HI",60)=""
 I ABMEIC="BK",ABMP("EXP")=32 S ABMR("HI",60)=$G(ABMDX(5))
 I ABMEIC="BF",$D(ABMDX(5)) S ABMR("HI",60)=$G(ABMDX(6))
 I ABMEIC="BQ",$D(ABMPX(6)) S ABMR("HI",60)=$G(ABMPX(6))
 I ABMEIC="BN",$D(ABMDXE(5)) S ABMR("HI",60)=$G(ABMDXE(5))
 I ABMEIC="BH" S ABMR("HI",60)=$G(ABMOC(5))  ;abm*2.6*9 IHS/SD/AML 2/15/2012 HEAT59363
 I ABMEIC="BE" S ABMR("HI",60)=$G(ABMVA(5))  ;abm*2.6*11 IHS/SD/AML HEAT89676
 Q
70 ;HI06 - Health Care Code Information
 S ABMR("HI",70)=""
 I ABMEIC="BK",ABMP("EXP")=32 S ABMR("HI",70)=$G(ABMDX(6))
 I ABMEIC="BF",$D(ABMDX(6)) S ABMR("HI",70)=$G(ABMDX(7))
 I ABMEIC="BQ",$D(ABMPX(7)) S ABMR("HI",70)=$G(ABMPX(7))
 I ABMEIC="BN",$D(ABMDXE(6)) S ABMR("HI",70)=$G(ABMDXE(6))
 I ABMEIC="BH" S ABMR("HI",70)=$G(ABMOC(6))  ;abm*2.6*9 IHS/SD/AML 2/15/2012 HEAT59363
 I ABMEIC="BE" S ABMR("HI",70)=$G(ABMVA(6))  ;abm*2.6*11 IHS/SD/AML HEAT89676
 Q
80 ;HI07 - Health Care Code Information
 S ABMR("HI",80)=""
 I ABMEIC="BK",ABMP("EXP")=32 S ABMR("HI",80)=$G(ABMDX(7))
 I ABMEIC="BF",$D(ABMDX(7)) S ABMR("HI",80)=$G(ABMDX(8))
 I ABMEIC="BQ",$D(ABMPX(8)) S ABMR("HI",80)=$G(ABMPX(8))
 I ABMEIC="BN",$D(ABMDXE(7)) S ABMR("HI",80)=$G(ABMDXE(7))
 I ABMEIC="BH" S ABMR("HI",80)=$G(ABMOC(7))  ;abm*2.6*9 IHS/SD/AML 2/15/2012 HEAT59363
 I ABMEIC="BE" S ABMR("HI",80)=$G(ABMVA(7))  ;abm*2.6*11 IHS/SD/AML HEAT89676
 Q
90 ;HI08 - Health Care Code Information
 S ABMR("HI",90)=""
 I ABMEIC="BK",ABMP("EXP")=32 S ABMR("HI",90)=$G(ABMDX(8))
 I ABMEIC="BF",$D(ABMDX(8)) S ABMR("HI",90)=$G(ABMDX(9))
 I ABMEIC="BQ",$D(ABMPX(9)) S ABMR("HI",90)=$G(ABMPX(9))
 I ABMEIC="BN",$D(ABMDXE(8)) S ABMR("HI",90)=$G(ABMDXE(8))
 I ABMEIC="BH" S ABMR("HI",90)=$G(ABMOC(8))  ;abm*2.6*9 IHS/SD/AML 2/15/2012 HEAT59363
 I ABMEIC="BE" S ABMR("HI",90)=$G(ABMVA(8))  ;abm*2.6*11 IHS/SD/AML HEAT89676
 Q
100 ;HI09 - Health Care Code Information
 S ABMR("HI",100)=""
 I ABMEIC="BK",ABMP("EXP")=32 S ABMR("HI",100)=$G(ABMDX(9))
 I ABMEIC="BF",$D(ABMDX(9)) S ABMR("HI",100)=$G(ABMDX(10))
 I ABMEIC="BQ",$D(ABMPX(10)) S ABMR("HI",100)=$G(ABMPX(10))
 I ABMEIC="BN",$D(ABMDXE(9)) S ABMR("HI",100)=$G(ABMDXE(9))
 I ABMEIC="BH" S ABMR("HI",100)=$G(ABMOC(9))  ;abm*2.6*9 IHS/SD/AML 2/15/2012 HEAT59363
 I ABMEIC="BE" S ABMR("HI",100)=$G(ABMVA(9))  ;abm*2.6*11 IHS/SD/AML HEAT89676
 Q
110 ;HI10 - Health Care Code Information
 S ABMR("HI",110)=""
 I ABMEIC="BK",ABMP("EXP")=32 S ABMR("HI",110)=$G(ABMDX(10))
 I ABMEIC="BF",$D(ABMDX(10)) S ABMR("HI",110)=$G(ABMDX(11))
 I ABMEIC="BQ",$D(ABMPX(11)) S ABMR("HI",110)=$G(ABMPX(11))
 I ABMEIC="BN",$D(ABMDXE(10)) S ABMR("HI",110)=$G(ABMDXE(10))
 I ABMEIC="BH" S ABMR("HI",110)=$G(ABMOC(10))  ;abm*2.6*9 IHS/SD/AML 2/15/2012 HEAT59363
 I ABMEIC="BE" S ABMR("HI",110)=$G(ABMVA(10))  ;abm*2.6*11 IHS/SD/AML HEAT89676
 Q
120 ;HI11 - Health Care Code Information
 S ABMR("HI",120)=""
 I ABMEIC="BK",ABMP("EXP")=32 S ABMR("HI",120)=$G(ABMDX(11))
 I ABMEIC="BF",$D(ABMDX(11)) S ABMR("HI",120)=$G(ABMDX(12))
 I ABMEIC="BQ",$D(ABMPX(12)) S ABMR("HI",120)=$G(ABMPX(12))
 I ABMEIC="BN",$D(ABMDXE(11)) S ABMR("HI",120)=$G(ABMDXE(11))
 I ABMEIC="BH" S ABMR("HI",120)=$G(ABMOC(11))  ;abm*2.6*9 IHS/SD/AML 2/15/2012 HEAT59363
 I ABMEIC="BE" S ABMR("HI",120)=$G(ABMVA(11))  ;abm*2.6*11 IHS/SD/AML HEAT89676
 Q
130 ;HI12 - Health Care Code Information
 S ABMR("HI",130)=""
 I ABMEIC="BK",ABMP("EXP")=32 S ABMR("HI",130)=$G(ABMDX(12))
 I ABMEIC="BF",$D(ABMDX(12)) S ABMR("HI",130)=$G(ABMDX(13))
 I ABMEIC="BQ",$D(ABMPX(13)) S ABMR("HI",130)=$G(ABMPX(13))
 I ABMEIC="BN",$D(ABMDXE(12)) S ABMR("HI",130)=$G(ABMDXE(12))
 I ABMEIC="BH" S ABMR("HI",130)=$G(ABMOC(12))  ;abm*2.6*9 IHS/SD/AML 2/15/2012 HEAT59363
 I ABMEIC="BE" S ABMR("HI",130)=$G(ABMVA(12))  ;abm*2.6*11 IHS/SD/AML HEAT89676
 Q