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

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

There is a newer version: 024-13
Show newest version
        <rule id="IFN6432" name="Regional Nodes Positive, RX Summ--Scope Reg LN Sur (NAACCR)" tag="N6432" java-path="lines.line" category="inter-field" depends="Year_of_Diagnosis">
            <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2021' || line.regionalNodesPositive == null)
    return true
if (line.rxSummScopeRegLnSur == null || line.typeOfReportingSource == '7')
    return true

if (['00790', '00795', '00822', '00830', '99999'].contains(line.schemaId) && !Functions.matches(line.primarySite, /^C42[0134]|C589|C7[012]\d|C75[123]|C76[1-8]|C77\d|C809$/)
    && Functions.matches(line.rxSummScopeRegLnSur, /^\d$/))
    return true

if (line.rxSummScopeRegLnSur == '0') {
        Integer dolcYear = Functions.asInt(line.dateOfLastContactYear)
        Integer dolcMonth = Functions.asInt(line.dateOfLastContactMonth)
        Integer dolcDay = Functions.asInt(line.dateOfLastContactDay)
        Integer dxYear = Functions.asInt(line.dateOfDiagnosisYear)
        Integer dxMonth = Functions.asInt(line.dateOfDiagnosisMonth)
        Integer dxDay = Functions.asInt(line.dateOfDiagnosisDay)

        if ((line.vitalStatus == '0' && (Boolean)((Closure)Context.compareDatesWithinMonths).call(dolcYear, dolcMonth, dolcDay, dxYear, dxMonth, dxDay, 5)) || line.typeOfReportingSource == '6')
            return Functions.matches(line.regionalNodesPositive, /^[0-8]\d|9[078]$/)

        else
            return line.regionalNodesPositive == '98'
    }
else if (line.rxSummScopeRegLnSur == '1' && !['95','00'].contains(line.regionalNodesPositive))
    return false
else if (Functions.matches(line.rxSummScopeRegLnSur, /^[4-7]$/) && line.regionalNodesPositive == '98')
    return false
return true]]></expression>
            <message>RX Summ--Scope Reg LN Sur conflicts with Regional Nodes Positive</message>
            <description><![CDATA[This edit checks that Regional Nodes Positive is coded
consistently with RX Summ--Scope Reg LN Sur.

1. This edit is skipped for any of the following conditions:
    a. Diagnosis date is pre-2021, blank (unknown), or invalid
    b. Regional Nodes Positive is blank
    c. RX Summ--Scope Reg LN Sur is blank
    d. Type of Reporting Source = 7 (Death Certificate Only)

2. If Schema ID = 00790, 00795, 00822, 00830, or 99999, and Primary Site not = C420, C421, C423, C424, C589, C700-C709, C710-C729, C751-C753, C761-C768, C770-C779, or C809
    If RX Summ--Scope Reg LN Sur = 0-9, the edit passes.

3. If RX Summ--Scope Reg LN Sur = 0 (no nodal procedure performed)
    A. then if Vital Status = 0 and Date of Last Contact <= 5 months from Date of Diagnosis,
    or Type of Reporting Source = 6 (Autopsy Only), Regional Nodes Positive must = 00-90,97, or 98.
    B. For all other cases, Regional Nodes Positive must = 98 (no nodes examined)

4. If RX Summ--Scope Reg LN Sur = 1 (biopsy or aspiration of lymph node only)
    Regional Nodes Positive must = 95 (positive aspiration or
    core biopsy of regional nodes) or 00 (all nodes examined negative)

5. If RX Summ--Scope Reg LN Sur = 4-7 (regional nodal procedure performed)
    Regional Nodes Positive must not = 98 (no nodes examined)]]></description>
            <history>
                <event version="SE21-021-04" user="beverung" date="2021-03-31" ref="68636">Edit created.</event>
                <event version="SE21-021-04" user="kirbyk" date="2021-05-14" ref="68663">Updated skip conditions and valid Regional Nodes Positive values.</event>
                <event version="SE21-021-05" user="kirbyk" date="2021-05-26" ref="68673">Removed Class of Case skip condition.</event>
                <event version="SE22-022-01" user="secristc" date="2022-02-14" ref="68797">Removed schema skip condition, changed logic for RX Summ-Scope = 0.</event>
                <event version="SE22-022-05" user="kirbyk" date="2022-05-17" ref="68995">Replaced non-ASCII characters in description.</event>
                <event version="SE23-023-03" user="shearerw" date="2023-05-24" ref="69216">Fix logic for DOLC within 5 months of DX date to allow difference in year.</event>
                <event version="SE24-024-06" user="shearerw" date="2024-06-27" ref="69485">Add logic to pass edit for certain Schema ID and Primary Site combinations.</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy