All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edits.seer.internal.rules.IFN6156.xml Maven / Gradle / Ivy

There is a newer version: 024-13
Show newest version
        <rule id="IFN6156" name="Mets at DX, Colon/Rectum, EOD Mets (SEER)" tag="N6156" java-path="lines.line" category="inter-field" depends="Year_of_Diagnosis">
            <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2021' || line.typeOfReportingSource == '7')
    return true
if (line.eodMets == null || line.schemaId == null || line.schemaId != '00200')
    return true
if (line.metsAtDxBone == null && line.metsAtDxBrain == null && line.metsAtDxDistantLn == null && line.metsAtDxLiver == null && line.metsAtDxLung == null && line.metsAtDxOther == null)
    return true

boolean metsAtDxBoneCondition = line.metsAtDxBone == null || ['0','9'].contains(line.metsAtDxBone)
boolean metsAtDxBrainCondition = line.metsAtDxBrain == null || ['0','9'].contains(line.metsAtDxBrain)
boolean metsAtDxDistantLnCondition = line.metsAtDxDistantLn == null || ['0','9'].contains(line.metsAtDxDistantLn)
boolean metsAtDxLiverCondition = line.metsAtDxLiver == null || ['0','9'].contains(line.metsAtDxLiver)
boolean metsAtDxLungCondition = line.metsAtDxLung == null || ['0','9'].contains(line.metsAtDxLung)
boolean metsAtDxOtherCondition = line.metsAtDxOther == null || ['0','9'].contains(line.metsAtDxOther)

int count = 0
if (line.metsAtDxBone == '1')
    count++
if (line.metsAtDxBrain == '1')
    count++
if (line.metsAtDxLiver == '1')
    count++
if (line.metsAtDxLung == '1')
    count++
if (line.metsAtDxOther == '1')
    count++

if (line.metsAtDxDistantLn == '1' && metsAtDxBoneCondition && metsAtDxBrainCondition && metsAtDxLiverCondition && metsAtDxLungCondition && metsAtDxOtherCondition && !['10','30','70'].contains(line.eodMets))
    return false
if (count == 1 && metsAtDxDistantLnCondition && !['20','40','50'].contains(line.eodMets))
    return false
if (count == 1 && line.metsAtDxDistantLn == '1' && !['30','40','50'].contains(line.eodMets))
    return false
if (count > 1 && (line.metsAtDxDistantLn == '1' || metsAtDxDistantLnCondition) && !['40','50'].contains(line.eodMets))
    return false
if (line.metsAtDxOther == '2' && line.eodMets != '50')
    return false
if (['10','30'].contains(line.eodMets) && line.metsAtDxDistantLn != '1')
    return false
if (line.eodMets == '50' && !['1','2'].contains(line.metsAtDxOther))
    return false
return true]]></expression>
            <message>Mets at DX fields conflict with EOD Mets for Colon/Rectum</message>
            <description><![CDATA[This edit verifies that Mets at DX-Bone, Mets at DX-Brain,
Mets at DX-Distant LN, Mets at DX-Liver, Mets at DX-Lung, and Mets at DX-Other
are coded consistently with EOD Mets for Schema ID 00200, Colon and Rectum.

1. The edit is skipped for the following conditions:
    a. Date of Diagnosis before 2021, blank (unknown), or invalid.
    b. Schema ID is blank or not 00200
    c. Mets at DX-Bone, Mets at DX-Brain, Mets at DX-Distant LN,
        Mets at DX-Liver, Mets at DX-Lung, and Mets at DX-Other are all blank
    d. EOD Mets is blank
    e. Type of Reporting Source is 7 (Death Certificate Only)

2. If Mets at DX-Distant LN = 1 (and Mets at DX-Bone = 0,9, Mets at DX-Brain = 0,9,
       Mets at DX-Liver = 0,9, Mets at DX-Lung = 0,9, Mets at DX-Other = 0,9, or
      fields are empty)
      then EOD Mets must = 10, 30, or 70

3. If only one of Mets at DX-Bone=1, Mets at DX-Brain=1, Mets at DX-Liver=1,
       and Mets at DX-Lung=1, Mets at DX-Other = 1 (and Mets at DX-LN = 0,9, or
      fields are empty),
       then EOD Mets must = 20, 40, or 50

4. If only one of Mets at DX-Bone=1, Mets at DX-Brain=1, Mets at DX-Liver=1,and
      Mets at DX-Lung=1, and Mets at DX-Other = 1 (and Mets at DX-Distant LN = 1)
       then EOD Mets must = 30, 40, or 50

5. If more than one of Mets at DX-Bone, Mets at DX-Brain, Mets at DX-Liver,
       Mets at DX-Lung, and Mets at DX-Other = 1 (and Mets at DX-Distant LN = 0,1,9
      or empty)
        then EOD Mets must = 40 or 50

6. If Mets at DX-Other = 2
       then EOD Mets must = 50

7. If EOD Mets = 10 or 30 (Distant lymph nodes)
      then Mets at DX-Distant LN must = 1

8. If EOD Mets = 50 (Peritoneal surface metastasis, carcinomatosis)
       then Mets at DX-Other must= 1 or 2]]></description>
            <history>
                <event version="SE21-021-04" user="beverung" date="2021-04-14" ref="68608">Edit created.</event>
                <event version="SE21-021-09" user="beverung" date="2021-08-26" ref="68723">Updated to add EOD Mets = 40 to logic for conditions 3 and 4.</event>
                <event version="SE22-022-08" user="secristc" date="2022-06-23" ref="69011">Updated error message.</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy