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

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

There is a newer version: 024-13
Show newest version
<rule id="IFN5022" name="Date Initial RX SEER, Ca Dir RX 2018-2022 (SEER)" tag="N5022" java-path="lines.line" category="inter-field">
            <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2018' || line.dateOfDiagnosisYear > '2022')
    return true

boolean siteCondition = Functions.matches(line.primarySite, /^C(42[0134]|589|7[0127]\d|75[1-3]|76[0-8]|809)$/) || line.schemaId == '99999'

boolean rxSummScopeRegLnSurYesCondition = false
if (Functions.matches(line.rxSummScopeRegLnSur, /^[3-7]$/))
    rxSummScopeRegLnSurYesCondition = true
else if (line.rxSummScopeRegLnSur == '1' && line.dateOfDiagnosisYear < '2021')
    rxSummScopeRegLnSurYesCondition = true
else if (line.rxSummScopeRegLnSur == '2' && line.dateOfDiagnosisYear >= '2018' && line.dateOfDiagnosisYear <= '2020' && Functions.matches(line.regionalNodesExamined, /^0[1-9]|[1-8]\d|9[0-8]$/))
    rxSummScopeRegLnSurYesCondition = true
else if (line.rxSummScopeRegLnSur == '2' && line.dateOfDiagnosisYear >= '2021')
    rxSummScopeRegLnSurYesCondition = true

boolean rxSummScopeNoCondition = false

if (line.rxSummScopeRegLnSur == '9' && siteCondition)
    rxSummScopeNoCondition = true
else if (line.rxSummScopeRegLnSur == '0')
    rxSummScopeNoCondition = true
else if (line.rxSummScopeRegLnSur == '1' && line.dateOfDiagnosisYear >= '2021')
    rxSummScopeNoCondition = true

if ((line.rxSummSurgPrimSite == '00' || line.rxSummSurgPrimSite == '98') &&
    rxSummScopeNoCondition &&
    line.rxSummSurgOthRegDis == '0' &&
    (line.phase1RadiationTreatmentModality == '00' || line.phase1RadiationTreatmentModality == '99') &&
    line.rxSummSurgRadSeq == '0' &&
    Functions.matches(line.rxSummBrm, /^00|8[25-8]$/) &&
    Functions.matches(line.rxSummChemo, /^00|8[25-8]$/) &&
    Functions.matches(line.rxSummHormone, /^00|8[25-8]$/) &&
    Functions.matches(line.rxSummTransplntEndocr, /^00|8[25-8]$/) &&
    Functions.matches(line.rxSummOther, /^[078]$/))
        return line.dateInitialRxSeerYear == null

if (line.dateInitialRxSeerYear != null)
    return Functions.matches(line.rxSummSurgPrimSite, /^[1-8]\d|90$/) ||
    rxSummScopeRegLnSurYesCondition ||
    Functions.matches(line.rxSummSurgOthRegDis, /^[1-5]$/) ||
    Functions.matches(line.phase1RadiationTreatmentModality, /^0[1-9]|1[0-6]|98$/) ||
    Functions.matches(line.rxSummSurgRadSeq, /^[2-9]$/) ||
    line.rxSummBrm == '01' ||
    Functions.matches(line.rxSummChemo, /^0[1-3]$/) ||
    line.rxSummHormone == '01' ||
    Functions.matches(line.rxSummTransplntEndocr, /^1[0-2]|[234]0$/) ||
    Functions.matches(line.rxSummOther, /^[1236]$/)

return true]]></expression>
            <message>Date of Initial RX-SEER, Cancer-Directed Therapy 2018-2022 conflict.</message>
            <description><![CDATA[This edit verifies that Date Initial RX SEER is coded consistently with treatment data items.

This edit is skipped if one of the following is true:
   1.  Year of diagnosis is blank or invalid
   2.  Year of diagnosis is less than 2018 or greater than 2022

The following table specifies the values for each treatment field for known to have not been
performed (NO) and for known to have been performed (YES).

If all treatment fields specify NO, then Date Initial RX SEER must specify no therapy performed (Date Initial RX SEER is blank).

If Date Initial RX SEER is a known date (not blank), then ALL treatment fields cannot specify NO.

======================================================================
RX Summ--Surg Primary Site 03-2022

  NO:      00, 98
  YES:     10-90

======================================================================
RX Summ--Surg Scope Reg LN Sur for the following primary sites:
  NO:
           9    Primary Site code = C420, C421, C423, C424, C589,
                C700-C709, C710-C729, C751-C753, C761-C768, C770-C779, C809,
                SchemaId 99999, C760
           0 for all other primary sites
           1 for all other primary sites for diagnosis 2021+
  YES:     1 for all other primary sites for diagnosis prior to 2021
           2 (for all other primary sites if Regional Nodes Examined = 01-98 for diagnosis 2018-2020)
           2 (for all other primary sites for diagnosis 2021+)
           3-7 (for all other primary sites)

======================================================================
RX Summ--Surg Oth Reg/Dis

  NO:      0
  YES:     1-5

======================================================================
Phase I Radiation Treatment Modality

  NO:      00, 99
  YES:     01-16, 98

======================================================================
RX Summ--Surg/Rad Seq

  NO:        0
  YES:       2-9

======================================================================
RX Summ--BRM

  NO:      00,82,85-88
  YES:     01

======================================================================
RX Summ--Chemo

  NO:      00,82,85-88
  YES:     01-03

======================================================================
RX Summ--Hormone

  NO:      00,82,85-88
  YES:     01

======================================================================
RX Summ--Transplant/Endocr

  NO:      00,82,85-88
  YES:     10-12,20,30,40

======================================================================
RX Summ--Other

  NO:      0,7,8
  YES:     1,2,3,6]]></description>
            <history>
                <event version="SE18-019-01" user="kirbyk" date="2019-04-01" ref="68159">Edit created.</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="SE18-020-05" user="beverung" date="2020-07-29" ref="68377">Phase I Radiation Treatment Modality code 98 added to codes meaning radiation performed. RX Summ--Scope Reg LN Sur code 1 changed from YES to NO for treatment fields.</event>
                <event version="SE18-020-05" user="kirbyk" date="2020-08-18" ref="68504">Edit now applies to cases diagnosed 2018+; updated NO conditions for RX Summ--Surg Scope Reg LN Sur.</event>
                <event version="SE18-020-07" user="beverung" date="2020-09-22" ref="68526">Edit now checks Reason for No Radiation instead of Phase I Radiation Traatment Modality.</event>
                <event version="SE18-020-08" user="kirbyk" date="2020-10-13" ref="68531">Fixed YES/NO values for Reason for No Radiation.</event>
                <event version="SE21-021-03" user="beverung" date="2021-03-02" ref="68559">Update logic/description with 2021 changes.</event>
                <event version="SE22-022-01" user="beverung" date="2022-01-14" ref="68775">Remove site restriction on RX Summ--Surg Scope Reg LN Sur lymphoma condition and add ill-defined condition.</event>
                <event version="SE22-022-03" user="beverung" date="2022-04-27" ref="68949">Change edit name and update edit logic for 2022.</event>
                <event version="SE23-023-01" user="secristc" date="2023-01-27" ref="69096">Change edit name and update edit logic for 2023.</event>
                <event version="SE23-023-02" user="cooki" date="2023-05-12" ref="69264">Added pre-2021 logic for RX Summ--Surg Scope Reg LN Sur.</event>
                <event version="SE24-024-01" user="beverung" date="2024-02-02" ref="69331">Updated description.</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy