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

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

The newest version!
        <rule id="IFN6208" name="Summary Stage 2018, EOD Tumor/Nodes/Mets, Prostate (SEER)" tag="N6208" java-path="lines.line" category="inter-field" depends="Year_of_Diagnosis">
            <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2019' || line.summaryStage2018 == null || line.typeOfReportingSource == '7')
    return true
if (line.eodPrimaryTumor == null && line.prostatePathologicalExtension == null && line.eodRegionalNodes == null && line.eodMets == null)
    return true
if (line.schemaId == null || line.schemaId != '00580')
    return true

if (line.summaryStage2018 == '0') {
    boolean condition1 = line.eodPrimaryTumor == '000' && Functions.matches(line.prostatePathologicalExtension, /^[089]00|950|999$/)
    boolean condition2 = ['800', '999'].contains(line.eodPrimaryTumor) && line.prostatePathologicalExtension == '000'

    return (condition1 || condition2) && line.eodRegionalNodes == '000' && line.eodMets == '00'
}
else if (line.summaryStage2018 == '1' || line.summaryStage2018 == '2') {
    boolean condition1 = !['000', '800', '999'].contains(line.eodPrimaryTumor)
    boolean condition2 = !Functions.matches(line.prostatePathologicalExtension, /^[089]00|950|999$/)

    return (condition1 || condition2) && ['000', '999'].contains(line.eodRegionalNodes) && line.eodMets == '00'
}
else if (line.summaryStage2018 == '3') {
    return !['000', '999'].contains(line.eodRegionalNodes) && line.eodMets == '00'
}
else if (line.summaryStage2018 == '4') {
    boolean condition1 = !['000', '800', '999'].contains(line.eodPrimaryTumor)
    boolean condition2 = !Functions.matches(line.prostatePathologicalExtension, /^[089]00|950|999$/)

    return (condition1 || condition2) && !['000', '999'].contains(line.eodRegionalNodes) && line.eodMets == '00'
}

if (Functions.matches(line.eodMets, /^[1-6]\d|70$/))
    return line.summaryStage2018 == '7'

return true]]></expression>
            <message>Summary Stage 2018 conflicts with EOD Primary Tumor, EOD Prostate Pathologic Extension, EOD Regional Nodes, and EOD Mets</message>
            <description><![CDATA[This edit checks consistency of coding between Summary Stage 2018 for in situ
and invasive cases, and EOD Primary Tumor, Prostate Pathological Extension,
EOD Regional Nodes, and EOD Mets for Schema ID 00580, Prostate.

1. This edit is skipped if any of the following conditions is true:
    a. Diagnosis date is invalid, blank (unknown), or before 2019.
    b. Schema ID is blank or not 00580
    c. Summary Stage 2018 is blank
    d. EOD Primary Tumor, EOD Prostate Pathological Extension, EOD Regional Nodes,
        and EOD Mets are all blank
    e. Type of Reporting Source = 7 (Death Certificate Only)

2. If Summary Stage 2018 = 0 (in situ)
    EOD Primary Tumor must = 000 (in situ) and EOD Prostate Pathological Extension
    must = 000 (in situ), 800 (no evidence of primary tumor), 900 (no
    prostatectomy or autopsy performed), 950 (prostatectomy not part of first
    course of treatment) or 999 (unknown extension)
    OR
    EOD Primary Tumor must = 800 (no evidence of primary tumor) or 999 (unknown
    extension) and EOD Prostate Pathological Extension must = 000 (in situ)
    AND
    EOD Regional Nodes must = 000 and EOD Mets must = 00

3. If Summary Stage 2018 = 1 (localized) or 2 (regional by direct extension)
    EOD Primary Tumor must not = 000 or 800 or 999
    or EOD Prostate Pathological Extension must not = 000, 800, 900, 950, or 999
    AND
    EOD Regional Nodes must = 000 or 999 and EOD Mets must = 00

4. If Summary Stage 2018 = 3 (regional to lymph nodes)
    EOD Regional Nodes must not = 000 or 999
    AND EOD Mets must = 00

5. If Summary Stage 2018 = 4 (regional by direct extension and nodal
    involvement)
    EOD Primary Tumor must not = 000, 800, or 999
    or EOD Prostate Pathological Extension must not = 000, 800, 900, 950, or 999
    AND
    EOD Regional Nodes must not = 000 or 999 and EOD Mets must = 00

6. If EOD Mets = 10, 30, 50, 70,
    Summary Stage 2018 must = 7.]]></description>
            <history>
                <event version="SE21-021-04" user="beverung" date="2021-03-16" ref="68583">Edit created.</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy