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

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

There is a newer version: 024-13
Show newest version
        <rule id="IF160" name="Systemic RX, Surgery 03-2022, Systemic/Sur Seq (COC)" tag="N0759" java-path="lines.line" category="inter-field" depends="RX_Summ--BRM,RX_Summ--Chemo,RX_Summ--Hormone,RX_Summ--Scope_Reg_LN_Sur,RX_Summ--Surg_Oth_Reg-Dis,RX_Summ--Surg_Prim_Site,RX_Summ--Systemic_Sur_Seq,RX_Summ--Transplnt-Endocr,Regional_Nodes_Examined,Year_of_Diagnosis">
            <expression><![CDATA[if (line.rxSummSurgPrimSite == null || line.rxSummScopeRegLnSur == null ||
   line.rxSummSurgOthRegDis == null || line.rxSummBrm == null ||
   line.rxSummChemo == null || line.rxSummHormone == null ||
   line.rxSummTransplntEndocr == null || line.rxSummSystemicSurSeq == null ||
   line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear > '2022')
    return true

boolean primSite = line.rxSummSurgPrimSite >= '10' && line.rxSummSurgPrimSite <= '90'
boolean scopePre2012Surg = line.dateOfDiagnosisYear < '2012' && Functions.matches(line.rxSummScopeRegLnSur, /^[1-7]$/)
boolean scope12To17Surg = line.dateOfDiagnosisYear >= '2012' && line.dateOfDiagnosisYear < '2018' && ((line.regionalNodesExamined >= '01' && line.regionalNodesExamined <= '98' && line.rxSummScopeRegLnSur == '2') || Functions.matches(line.rxSummScopeRegLnSur, /^1|[3-7]$/))
boolean scope18To20Surg = line.dateOfDiagnosisYear >= '2018' && line.dateOfDiagnosisYear < '2021' && ((line.regionalNodesExamined >= '01' && line.regionalNodesExamined <= '98' && line.rxSummScopeRegLnSur == '2') || Functions.matches(line.rxSummScopeRegLnSur, /^[3-7]$/))
boolean scopePost20Surg = line.dateOfDiagnosisYear >= '2021' && Functions.matches(line.rxSummScopeRegLnSur, /^[2-7]$/)
boolean otherSurg = Functions.matches(line.rxSummSurgOthRegDis, /^[1-5]$/)
boolean therapyPerformed = line.rxSummBrm == '01' || Functions.matches(line.rxSummChemo, /^0[1-3]$/) || line.rxSummHormone == '01' || Functions.matches(line.rxSummTransplntEndocr, /(^[1-3]\d|40$)/)

if ((primSite || scopePre2012Surg || scope12To17Surg || scope18To20Surg || scopePost20Surg || otherSurg) && therapyPerformed)
    return Functions.matches(line.rxSummSystemicSurSeq, /^[2-7]|9$/)

boolean noPrimSite = line.rxSummSurgPrimSite == '00' || line.rxSummSurgPrimSite == '99'
boolean noOtherSurg = line.rxSummSurgOthRegDis == '0'
boolean regionalNodes1220 = (line.regionalNodesExamined == '00' || line.regionalNodesExamined == '99') && (line.dateOfDiagnosisYear >= '2012' && line.dateOfDiagnosisYear < '2021')
boolean scopePre2012NoSurg = line.dateOfDiagnosisYear < '2012' && line.rxSummScopeRegLnSur == '0'
boolean scope12To17NoSurg = line.dateOfDiagnosisYear >= '2012' && line.dateOfDiagnosisYear < '2018' && (line.rxSummScopeRegLnSur == '0' || ((regionalNodes1220) && line.rxSummScopeRegLnSur == '2'))
boolean scope18To20NoSurg = line.dateOfDiagnosisYear >= '2018' && line.dateOfDiagnosisYear < '2021' && (line.rxSummScopeRegLnSur == '0' || ((regionalNodes1220) && line.rxSummScopeRegLnSur == '2'))
boolean scopePost20NoSurg = line.dateOfDiagnosisYear >= '2021' && Functions.matches(line.rxSummScopeRegLnSur, /^[0-1]$/)
boolean surgeryAlsoNotPerformed = line.rxSummSurgPrimSite == '98' && line.rxSummScopeRegLnSur == '9'
boolean noTherapy = Functions.matches(line.rxSummBrm, /(^00|8[2-8]|99$)/) &&
   Functions.matches(line.rxSummChemo, /(^00|8[2-8]|99$)/) &&
   Functions.matches(line.rxSummHormone, /(^00|8[2-8]|99$)/) &&
   Functions.matches(line.rxSummTransplntEndocr, /(^00|8[2-8]|99$)/)

if ((noPrimSite && noOtherSurg && (scopePre2012NoSurg || scope12To17NoSurg || scope18To20NoSurg || scopePost20NoSurg)) || (surgeryAlsoNotPerformed && noOtherSurg) || noTherapy)
    return line.rxSummSystemicSurSeq == '0'

return true]]></expression>
            <message>Conflict among systemic RX, Surgery, and Systemic Surg Seq</message>
            <description><![CDATA[This edit is skipped if any of the fields are blank.
            This edit is skipped for diagnosis date blank (unknown), invalid, or after 2022.

1. If surgery was performed AND if systemic therapy was given, then RX Summ-Systemic/Sur Seq must specify a sequence (codes 2-7, 9).
    A. Surgery is considered performed if ANY of the following three conditions are true:
        1. RX Summ-Surg Prim Site 03-2022 = 10-90
        2. RX Summ-Scope Reg LN Sur:
            For cases diagnosed prior to 2012:
                1-7
            For cases diagnosed 2012-2017:
                1, 2 (only if Regional Nodes Examined = 01-98), 3-7
            For cases diagnosed 2018-2020:
                2 (if Regional Nodes Examined = 01-98), 3-7
            For cases diagnosed 2021+:
                2-7
        3. RX Summ-Surg Oth Reg/Dis = 1-5

    B. Systemic therapy is considered performed if ANY of the following four conditions are true:
        1. RX Summ-BRM = 01
        2. RX SummChemo = 01-03
        3. RX Summ-Hormone = 01
        4. RX Summ-Transplnt/Endocr = 10-40

2. If surgery was not performed OR there was no systemic therapy, then RX Summ-Systemic/Sur Seq must = 0 (no systemic therapy and/or surgical procedures).
    A. Surgery is considered not performed if ALL of the following conditions are true:
        1. RX Summ-Surg Prim Site 03-2022 = 00 or 99
        2. RX Summ-Scope Reg LN Sur:
            For cases diagnosed prior to 2012:
                0
            For cases diagnosed 2012-2017:
                0 (for all cases)
                2 (only if Regional Nodes Examined 00 or 99)
            For cases diagnosed 2018-2020:
                0
                2 (only if Regional Nodes Examined 00 or 99)
            For cases diagnosed 2021 or later:
                0-1  (for all cases)
        3. RX Summ-Surg Oth Reg = 0

    B. Surgery is also considered not performed if ALL of the following conditions are true:
        1. RX Summ-Surg Prim Site 03-2022 = 98 (coded for hematopoietic, ill-defined and unknown sites)
        2. RX Summ-Scope Reg LN Sur: 9
        3. RX Summ-Surg Oth Reg = 0

    C. Systemic therapy is considered not performed if ALL of the following four conditions are true:
        1. RX Summ-BRM = 00, 82-88, 99
        2. RX Summ-Chemo = 00, 82-88, 99
        3. RX Summ-Hormone = 00, 82-88, 99
        4. RX Summ-Transplnt/Endocr = 00, 82-88, 99]]></description>
            <history>
                <event version="SE12-002-01" user="murphyr" date="2010-01-06">Changed 82-87 range to 82-88</event>
                <event version="SE12-008-01" user="murphyr" date="2012-08-09" ref="66719">Changed &apos;yes/no&apos; surgery definition for scope for 2012+ cases</event>
                <event version="SE12-008-02" user="murphyr" date="2012-09-11" ref="66741">Changed &quot;is considered not performed if ANY of the following&quot; to &quot;is considered not performed if ALL of the following&quot; for 2.A, 2.B and 2.C.</event>
                <event version="SE16-016-08" user="depryf" date="2017-11-22" ref="67674">Edit syntax updated to allow pre-compilation optimization; no change in behavior.</event>
                <event version="SE18-020-01" user="depryf" date="2020-02-04" ref="68281">Changed property names to align with NAACCR XML IDs.</event>
                <event version="SE21-021-03" user="secristm" date="2020-02-25" ref="68580">Changed &apos;yes/no&apos; surgery definition for scope for 2017+ cases</event>
                <event version="SE22-022-03" user="secristc" date="2022-04-26" ref="68973">Added 99 as valid code for RX Summ fields for sequence code 0</event>
                <event version="SE23-023-01" user="secristc" date="2023-01-25" ref="69088">Added condition for 2023+, changed name.</event>
                <event version="SE23-023-10" user="shearerw" date="2024-01-22" ref="69322">Fixes to scope18To20NoSurg condition.</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy