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

ABME5L2.m

Go to the documentation of this file.
ABME5L2 ; IHS/ASDST/DMJ - Header 
 ;;2.6;IHS Third Party Billing System;**6,8,9,10,21,27**;NOV 12, 2009;Build 486
 ;Header Segments
 ;IHS/SD/SDR 2.6*21 HEAT172519 - Added MEDICAID FQHC and CD MEDICAID to WASHINGTON MEDICAID check
 ;IHS/SD/SDR 2.6*21 HEAT236026 - Added Dental Medicaid FQHC to check 2000A PRV segment
 ;IHS/SD/SDR 2.6*27 CR9867 For PRV segment removed hardcoding for specific insurers and added check for new parameter instead
 ;
START ;START HERE
 K ABMHLCNT
 S ABMLOOP="2000A"
 D EP^ABME5HL(20,1)
 D WR^ABMUTL8("HL")
 ;I ABMP("EXP")=31!((ABMRCID="NMMAD")&(ABMP("EXP")=32))!((ABMP("EXP")=32)&(ABMP("VTYP")=831)) D  ;abm*2.6*8 HEAT49305
 ;I ABMP("EXP")=31!((ABMRCID="NMMAD")&(ABMP("EXP")=32))!((ABMP("EXP")=32)&(ABMP("VTYP")=831))!($P($G(^AUTNINS(ABMP("INS"),0)),U)["WASHINGTON MEDICAID")!(ABMP("EXP")=33) D  ;abm*2.6*8 HEAT49305  ;abm*2.6*9 HEAT57952
 ;I ABMP("EXP")=31!((ABMRCID="NMMAD")&(ABMP("EXP")=32))!((ABMP("EXP")=32)&(ABMP("VTYP")=831))!($P($G(^AUTNINS(ABMP("INS"),0)),U)["WASHINGTON MEDICAID") D  ;abm*2.6*8 HEAT49305  ;abm*2.6*9 HEAT57952  ;abm*2.6*21 IHS/SD/SDR HEAT172519
 ;I ABMP("EXP")=31!((ABMRCID="NMMAD")&(ABMP("EXP")=32))!((ABMP("EXP")=32)&(ABMP("VTYP")=831))!("^WASHINGTON MEDICAID^MEDICAID FQHC^CD MEDICAID^"[("^"_($P($G(^AUTNINS(ABMP("INS"),0)),U)_"^"))) D  ;abm*2.6*9 HEAT57952  ;abm*2.6*21 IHS/SD/SDR HEAT172519  ;abm*2.6*21 IHS/SD/SDR HEAT236026
 ;start old abm*2.6*27 IHS/SD/AML CR9867
 ;;start new abm*2.6*21 IHS/SD/SDR HEAT172519, HEAT236026, HEAT206174
 ;S ABMDFLG=0
 ;I ABMP("EXP")=31!((ABMRCID="NMMAD")&(ABMP("EXP")=32))!((ABMP("EXP")=32)&(ABMP("VTYP")=831)) S ABMDFLG=1
 ;I ("^WASHINGTON MEDICAID^MEDICAID FQHC^CD MEDICAID^WISCONSIN MEDICAID^"[("^"_($P($G(^AUTNINS(ABMP("INS"),0)),U)_"^"))) S ABMDFLG=1
 ;I (ABMP("EXP")=33&($P($G(^AUTNINS(ABMP("INS"),0)),U)="WA MEDICAID DENTAL")) S ABMDFLG=1
 ;I ABMDFLG=1 D
 ;.D EP^ABME5PRV("BI",DUZ(2))
 ;.D WR^ABMUTL8("PRV")
 ;.;end new abm*2.6*21 IHS/SD/SDR HEAT172519, HEAT236026, HEAT206174
 ;end old start new abm*2.6*27 IHS/SD/AML CR9867
 D EP^ABME5PRV("BI",ABMP("LDFN"))
 I $P($G(^ABMNINS(ABMP("LDFN"),ABMP("INS"),1,ABMP("VTYP"),1)),U,23)'=""  D
 .D WR^ABMUTL8("PRV")
 ;end new abm*2.6*27 IHS/SD/AML CR9867
 S ABMP("PAYDFN")=$P($G(^ABMDPARM(DUZ(2),1,2)),U,3)
 S ABMLOOP="2010AA"
 D EP^ABME5NM1(85)
 D WR^ABMUTL8("NM1")
 D EP^ABME5N3(4,DUZ(2))
 D WR^ABMUTL8("N3")
 D EP^ABME5N4(4,DUZ(2))
 D WR^ABMUTL8("N4")
 D EP^ABME5REF("EI",9999999.06,DUZ(2))
 D WR^ABMUTL8("REF")
 S ABMNPIU=$$NPIUSAGE^ABMUTLF(DUZ(2),ABMP("INS"))
 ;start new code abm*2.6*10 HEAT46645 IHS/SD/AML 6/1/12
 I ABMNPIU=""!(ABMNPIU="L")!(ABMNPIU="B") D
 .D EP^ABME5REF("0B",9999999.06,DUZ(2))
 .D WR^ABMUTL8("REF")
 ;end new code abm*2.6*10 HEAT46645 IHS/SD/AML 6/1/12
 K ABMIDCD
 I ABMP("PAYDFN")'=DUZ(2) D
 .;Q:$P($G(^AUTNINS(ABMP("INS"),2)),U)="D"&($P($G(^AUTNINS(ABMP("INS"),0)),U)["OK")  ;abm*2.6*10 HEAT73780
 .Q:$$GET1^DIQ(9999999.181,$$GET1^DIQ(9999999.18,ABMP("INS"),".211","I"),1,"I")="D"&($P($G(^AUTNINS(ABMP("INS"),0)),U)["OK")  ;abm*2.6*10 HEAT73780
 .S ABMLOOP="2010AB"
 .D EP^ABME5NM1(87)
 .D WR^ABMUTL8("NM1")
 .D EP^ABME5N3(9999999.06,ABMP("PAYDFN"))
 .D WR^ABMUTL8("N3")
 .D EP^ABME5N4(9999999.06,ABMP("PAYDFN"))
 .D WR^ABMUTL8("N4")
 .K ABMIDCD
 .K ABMLOOP
 Q
PIREFID ;EP - Find EMC Ref ID for Private Ins.
 S:ABMP("ITYPE")="H" ABMIDCD="BQ"
 S:ABMP("ITYPE")="C" ABMIDCD="1H"
 I "M^P^W^F"[ABMP("ITYPE") S ABMIDCD="G2"
 I ABMIDCD="G2",ABMP("ITYPE")'="M" D
 .I $P($G(^ABMNINS(DUZ(2),ABMP("INS"),1,ABMP("VTYP"),1)),U)]"" D
 ..S ABMIDCD=$P($G(^ABMNINS(DUZ(2),ABMP("INS"),1,ABMP("VTYP"),1)),U)
 ..S ABMIDCD=$P($G(^ABMREFID(ABMIDCD,0)),U)
 ..S:ABMIDCD="" ABMIDCD="G2"
 Q