Summary Table
Categories |
Total Count |
PII |
0 |
URL |
0 |
DNS |
0 |
EKL |
0 |
IP |
0 |
PORT |
0 |
VsID |
0 |
CF |
0 |
AI |
0 |
VPD |
0 |
PL |
0 |
Other |
0 |
File Content
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
<Class name="EDIGW.Rules.NM1Rules">
<Super>EDIGW.Rules.RulesHelper</Super>
<TimeCreated>65016,55850.390227</TimeCreated>
<Method name="AnyNM1">
<Description>
5010Rep-14.01.01: Loop 1000A NM1 Submitter Name Entity Type Qualifier Situational Rule
Verify that Healthshare rejects X12 837 Healthcare Claim files if the NM101 Segment of 1000A = 41 and is received where NM102 is 1 (Person) and NM104 is blank or null.
5010Rep-14.01.02: Loop 1000A NM1 Submitter Name Identification Code Qualifier Situational Rule
Verify that Healthshare rejects X12 837 Healthcare Claim files if an NM1 Segment of 1000A is received where NM108 and NM109 are not included
5010Rep-14.01.03: Loop 2010AA NM1 Billing Provider Name Identification Code Qualifier Situational Rule
Verify that Healthshare rejects X12 837 Healthcare Claim files if the NM1 Segment of 2010AA = 85 is received where NM108 is present but NM109 is not, and vice versa.
5010Rep-14.01.04: Loop 2010AB NM1 Pay-To Address Name Entity Type Qualifier Situational Rule
Verify that Healthshare rejects X12 837 Healthcare Claim files if the NM101 Segment of 2010AB = 87 and is received where NM102 does not = 2 (Non-person entity)</Description>
<ClassMethod>1</ClassMethod>
<FormalSpec>source:EnsLib.EDI.X12.Document="",objTXNSET:CREPOS.TXNSET999="",path:%String="",pIndex:%Integer=0</FormalSpec>
<ReturnType>%Status</ReturnType>
<Implementation><![CDATA[
Set status = $$$OK, retStatus = $$$OK
Set (pNM101,pNM102,pNM103,pNM104,pNM105,pNM106,pNM107,pNM108,pNM109) = ""
If path [ "loop1000A.NM1" Set pNM101="R*41",pNM102="R*1:2",pNM103="R**1:60",pNM108="R*46",pNM109="R**2:80"
If path [ "loop1000B.NM1" Set pNM101="R*40",pNM102="R*2",pNM103="R**1:60",pNM108="R*46",pNM109="R**2:80"
If path [ "loop2010AA.NM1" Set pNM101="R*85",pNM102="R*2",pNM103="R**1:60",pNM108="S*XX",pNM109="S**2:80"
If path [ "loop2010AB.NM1" Set pNM101="R*87",pNM102="R*2"
If path [ "loop2010AC.NM1" Set pNM101="R*PE",pNM102="R*2",pNM103="R**1:60",pNM108="R*PI:XV",pNM109="R**2:80"
If path [ "loop2010BA.NM1" Set pNM101="R*IL",pNM102="R*1:2",pNM103="R**1:60",pNM108="R*II:MI",pNM109="R**2:80"
If path [ "loop2010BB.NM1" Set pNM101="R*PR",pNM102="R*2",pNM103="R**1:60",pNM108="R*PI:XV",pNM109="R**2:80"
If path [ "loop2010CA.NM1" Set pNM101="R*QC",pNM102="R*1",pNM103="R**1:60"
If path [ "loop2310A.NM1" Set pNM101="R*71",pNM102="R*1",pNM103="R**1:60",pNM108="S*XX",pNM109="S**2:80"
If path [ "loop2310B.NM1" Set pNM101="R*72",pNM102="R*1",pNM103="R**1:60",pNM108="S*XX",pNM109="S**2:80"
If path [ "loop2310C.NM1" Set pNM101="R*ZZ",pNM102="R*1",pNM103="R**1:60",pNM108="S*XX",pNM109="S**2:80"
If path [ "loop2310D.NM1" Set pNM101="R*82",pNM102="R*1",pNM103="R**1:60",pNM108="S*XX",pNM109="S**2:80"
If path [ "loop2310E.NM1" Set pNM101="R*77",pNM102="R*2",pNM103="R**1:60",pNM108="S*XX",pNM109="S**2:80"
If path [ "loop2310F.NM1" Set pNM101="R*DN",pNM102="R*1",pNM103="R**1:60",pNM108="S*XX",pNM109="S**2:80"
If path [ "loop2330A.NM1" Set pNM101="R*IL",pNM102="R*1:2",pNM103="R**1:60",pNM108="R*II:MI",pNM109="R**2:80"
If path [ "loop2330B.NM1" Set pNM101="R*PR",pNM102="R*2",pNM103="R**1:60",pNM108="R*PI:XV",pNM109="R**2:80"
If path [ "loop2330C.NM1" Set pNM101="R*71",pNM102="R*1"
If path [ "loop2330D.NM1" Set pNM101="R*72",pNM102="R*1"
If path [ "loop2330E.NM1" Set pNM101="R*ZZ",pNM102="R*1"
If path [ "loop2330F.NM1" Set pNM101="R*77",pNM102="R*2"
If path [ "loop2330G.NM1" Set pNM101="R*82",pNM102="R*1"
If path [ "loop2330H.NM1" Set pNM101="R*DN",pNM102="R*1"
If path [ "loop2330I.NM1" Set pNM101="R*85",pNM102="R*2"
If path [ "loop2420A.NM1" Set pNM101="R*72",pNM102="R*1",pNM103="R**1:60",pNM108="S*XX",pNM109="S**2:80"
If path [ "loop2420B.NM1" Set pNM101="R*ZZ",pNM102="R*1",pNM103="R**1:60",pNM108="S*XX",pNM109="S**2:80"
If path [ "loop2420C.NM1" Set pNM101="R*82",pNM102="R*1",pNM103="R**1:60",pNM108="S*XX",pNM109="S**2:80"
If path [ "loop2420D.NM1" Set pNM101="R*DN",pNM102="R*1",pNM103="R**1:60",pNM108="S*XX",pNM109="S**2:80"
Set pList = $ListBuild(pNM101,pNM102,pNM103,pNM104,pNM105,pNM106,pNM107,pNM108,pNM109)
Set status = ..NM1Generic(source,objTXNSET,path,pList)
If retStatus Set retStatus = status
Quit retStatus
]]></Implementation>
</Method>
<Method name="NM1Generic">
<ClassMethod>1</ClassMethod>
<FormalSpec>source:EnsLib.EDI.X12.Document,objTXNSET:CREPOS.TXNSET999,path:%String,pList:%List</FormalSpec>
<ReturnType>%Status</ReturnType>
<Implementation><![CDATA[
Do ##class(EDIGW.Utility).DEBUG($$$DebugRules,"NM1Generic "_path)
#dim objSegNM1 As EnsLib.EDI.X12.Segment
set st=$$$OK,posIK401=0,retSC=$$$OK
set objSegNM1 = source.GetSegmentAt(path,.status)
Set pNM101 = $List(pList,1)
Set pNM102 = $List(pList,2)
Set pNM103 = $List(pList,3)
Set pNM108 = $List(pList,8)
Set pNM109 = $List(pList,9)
Set NM101 = source.GetSegmentAt(path).GetValueAt("EntityIdentifierCode")
set status = ..CheckExpectedValue(NM101,pNM101,"Entity Identifier Code")
if $$$ISERR(status) Set retSC=0,err = ..logError(source,objTXNSET,path,8,98,$$$SEGhasDataElemErr,$$$InvalidCodeValue,NM101,"NM1Generic",status)
Set NM102 = source.GetSegmentAt(path).GetValueAt("EntityTypeQualifier")
set NM103 = source.GetSegmentAt(path).GetValueAt("NameLastorOrganizationName")
if (NM102=""),(pNM102'="") {
Set st=$$$ERROR($$$GeneralError, "Missing Entity Type Qualifier"),retSC=0
Set err = ..logError(source,objTXNSET,path,3,1065,$$$SEGhasDataElemErr,$$$RequiredDataElemMissing,NM102,"NM1Generic",st)
}
if (NM102 = $$$NM102isPerson) {
if (pNM103'=""),(NM103="") {
Set st=$$$ERROR($$$GeneralError, "Missing Last Name"),retSC=0
Set err = ..logError(source,objTXNSET,path,3,1035,$$$SEGhasDataElemErr,$$$RequiredDataElemMissing,NM103,"NM1Generic",st)
}
// Per George B email on 1/4/2019 - NM104 is always optional
//set NM104=source.GetSegmentAt(path).GetValueAt("NameFirst")
//if NM104="" {
// Set st=$$$ERROR($$$GeneralError, "Missing First Name"),retSC=0
// Set err = ..logError(source,objTXNSET,path,4,1036,$$$SEGhasDataElemErr,$$$RequiredDataElemMissing,NM104,"NM1Generic",st)
//}
}
if (NM102 '= $$$NM102isPerson) {
if (pNM103'=""),(NM103="") {
Set st=$$$ERROR($$$GeneralError, "Missing Organisation Name"),retSC=0
Set err = ..logError(source,objTXNSET,path,3,1035,$$$SEGhasDataElemErr,$$$RequiredDataElemMissing,NM103,"NM1Generic",st)
}
}
set status = ..CheckExpectedLength(NM103,pNM103,"Last Name or Organization Name",.IK403)
if $$$ISERR(status) set retSC=0,err=..logError(source,objTXNSET,path,3,1035,$$$SEGhasDataElemErr,IK403,NM103,"NM1Generic",status)
set posIK401 = 0,st=$$$OK
set NM108 = source.GetSegmentAt(path).GetValueAt("IdentificationCodeQualifier")
set NM109 = source.GetSegmentAt(path).GetValueAt("IdentificationCode")
if (NM108'=""),(NM109="") set posIK401=9,st=$$$ERROR($$$GeneralError, "Missing Identification Code")
if (NM109'=""),(NM108="") set posIK401=8,st=$$$ERROR($$$GeneralError, "Missing Identification Code Qualifier")
if ($E(pNM108,1,1)="R"),(NM108="") set posIK401=8,st=$$$ERROR($$$GeneralError, "Missing Identification Code Qualifier")
if ($E(pNM109,1,1)="R"),(NM109="") set posIK401=9,st=$$$ERROR($$$GeneralError, "Missing Identification Code")
if (posIK401=8) {
Set retSC=0
Set err=..logError(source,objTXNSET,path,8,66,$$$SEGhasDataElemErr,$$$RequiredDataElemMissing,"","NM1Generic",st)
}
if (posIK401=9) {
Set retSC=0
Set err=..logError(source,objTXNSET,path,9,67,$$$SEGhasDataElemErr,$$$RequiredDataElemMissing,"","NM1Generic",st)
}
set status = ..CheckExpectedValue(NM108,pNM108,"Identification Code Qualifier.")
if $$$ISERR(status) Set retSC=0,err = ..logError(source,objTXNSET,path,8,66,$$$SEGhasDataElemErr,$$$InvalidCodeValue,NM108,"NM1Generic",status)
set status = ..CheckExpectedLength(NM109,pNM109,"Identification Code",.IK403)
if $$$ISERR(status) set retSC=0,err = ..logError(source,objTXNSET,path,9,67,$$$SEGhasDataElemErr,IK403,NM109,"NM1Generic",status)
Quit retSC
]]></Implementation>
</Method>
<Method name="NM1ofLoop2420D">
<Description>
LOOP2420D NM1
NM1 - Situational - Required on an outpatient claim when the Referring Provider is different
than the Attending Provider.
AND
The Referring Provider for this line is different than the Referring Provider
reported in Loop ID 2310F (claim level).
NM101 = DN
NM102 1
NM103 required 1 - 60
NM104 situational - required if person has first name
NM108 situational = XX
NM109 situational 2 - 80</Description>
<ClassMethod>1</ClassMethod>
<FormalSpec>source:EnsLib.EDI.X12.Document="",objTXNSET:CREPOS.TXNSET999="",path:%String="",pIndex:%Integer=0</FormalSpec>
<ReturnType>%Status</ReturnType>
<Implementation><![CDATA[
Set status = $$$OK // To Do: Check Situational Rule
If $$$ISERR(status) Quit status
Set pNM101 = "R*DN"
Set pNM102 = "R*1"
Set pNM103 = "R**1:60"
Set pNM104 = ""
Set pNM105 = ""
Set pNM106 = ""
Set pNM107 = ""
Set pNM108 = "S*XX"
Set pNM109 = "S**2:80"
Set pList = $ListBuild(pNM101,pNM102,pNM103,pNM104,pNM105,pNM106,pNM107,pNM108,pNM109)
Set status = ..NM1Generic(source,objTXNSET,path,pList)
Quit status
]]></Implementation>
</Method>
</Class>
</Export>