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

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

There is a newer version: 024-13
Show newest version
        <rule id="IF354" name="CS Items, Type Reporting Source-DCO (SEER)" tag="N2414" java-path="lines.line" category="inter-field" depends="Histologic_Type_ICD-O-3,Primary_Site,Year_of_Diagnosis">
            <expression><![CDATA[String dxYear = line.dateOfDiagnosisYear
String behav = line.behaviorCodeIcdO3
String schema = line._csSchemaId

if (schema == null || dxYear == null || dxYear < '2004' || dxYear > '2017' || behav == '2' || line.typeOfReportingSource != '7' ||
    ((behav == '0' || behav == '1') && schema != 'brain' && schema != 'cns_other' && schema != 'intracranial_gland') ||
    ((dxYear == '2016' || dxYear == '2017') && line.csExtension == null))
        return true

String tumSize = line.csTumorSize
String tumSizeExtEval = line.csTumorSizeExtEval
String ext = line.csExtension
String nodes =  line.csLymphNodes
String nodesEval = line.csLymphNodesEval
String metsAtDx = line.csMetsAtDx
String metsEval = line.csMetsEval
String ssf1 = line.csSiteSpecificFactor1
String ssf2 = line.csSiteSpecificFactor2
String ssf3 = line.csSiteSpecificFactor3
String ssf4 = line.csSiteSpecificFactor4
String ssf5 = line.csSiteSpecificFactor5
String ssf6 = line.csSiteSpecificFactor6
String ssf7 = line.csSiteSpecificFactor7
String ssf8 = line.csSiteSpecificFactor8
String ssf9 = line.csSiteSpecificFactor9
String ssf10 = line.csSiteSpecificFactor10
String ssf11 = line.csSiteSpecificFactor11
String ssf12 = line.csSiteSpecificFactor12
String ssf13 = line.csSiteSpecificFactor13
String ssf14 = line.csSiteSpecificFactor14
String ssf15 = line.csSiteSpecificFactor15
String ssf16 = line.csSiteSpecificFactor16
String ssf17 = line.csSiteSpecificFactor17
String ssf18 = line.csSiteSpecificFactor18
String ssf19 = line.csSiteSpecificFactor19
String ssf20 = line.csSiteSpecificFactor20
String ssf21 = line.csSiteSpecificFactor21
String ssf22 = line.csSiteSpecificFactor22
String ssf23 = line.csSiteSpecificFactor23
String ssf24 = line.csSiteSpecificFactor24
String metsBone = line.csMetsAtDxBone
String metsBrain = line.csMetsAtDxBrain
String metsLiver = line.csMetsAtDxLiver
String metsLung = line.csMetsAtDxLung
String metsVasc = line.lymphVascularInvasion

String failingProp = null
if (tumSize != '988' && tumSize != '999' && tumSize != null)
    failingProp = 'line.csTumorSize'
else if (((behav == '0' || behav == '1') && (schema == 'brain' ||  schema == 'cns_other' || schema == 'intracranial_gland')) && ext != '050' && ext != '999' && ext != null)
    failingProp = 'line.csExtension'
else if (schema == 'heme_retic' && ext != '800' && ext != '999' && ext != null)
    failingProp = 'line.csExtension'
else if (schema == 'myeloma_plasma_cell_disorder' && ext != '800' && ext != '810' && ext != '820' && ext != '999' && ext != null)
    failingProp = 'line.csExtension'
else if (schema == 'lymphoma_ocular_adnexa' && ext != '989' && ext != '999' && ext != null)
    failingProp = 'line.csExtension'
else if (schema != 'heme_retic' && schema != 'myeloma_plasma_cell_disorder' && (schema != 'brain' || (behav != '0' && behav != '1')) && schema != 'cns_other' && schema != 'intracranial_gland' && ext != '988' && ext != '999' && ext != null)
    failingProp = 'line.csExtension'
else if (tumSizeExtEval != '9' && tumSizeExtEval != null)
    failingProp = 'line.csTumorSizeExtEval'
else if (schema == 'myeloma_plasma_cell_disorder' && nodes != '987' && nodes != '988' && nodes != '999' && nodes != null)
    failingProp = 'line.csLymphNodes'
else if (schema != 'myeloma_plasma_cell_disorder' && nodes != '988' && nodes != '999' && nodes != null)
    failingProp = 'line.csLymphNodes'
else if (nodesEval != '9' && nodesEval != null)
    failingProp = 'line.csLymphNodesEval'
else if (metsAtDx != '98' && metsAtDx != '99' && metsAtDx != null)
    failingProp = 'line.csMetsAtDx'
else if (metsEval != '9' && metsEval != null)
    failingProp = 'line.csMetsEval'
else if (schema == 'retinoblastoma' && ssf1 != '960' && ssf1 != null)
    failingProp = 'line.csSiteSpecificFactor1'
else if ((schema == 'bladder' || schema == 'kidney_renal_pelvis' || schema == 'urethra') &&  ssf1 != '987' && ssf1 != '988' && ssf1 != '999' && ssf1 != null)
    failingProp = 'line.csSiteSpecificFactor1'
else if (schema != 'retinoblastoma' && schema != 'bladder' && schema != 'kidney_renal_pelvis' && schema != 'urethra' && ssf1 != '988' && ssf1 != '999' && ssf1 != null)
    failingProp = 'line.csSiteSpecificFactor1'
else if ((schema == 'myeloma_plasma_cell_disorder' || schema == 'skin_eyelid') && ssf2 != '987' && ssf2 != '988' && ssf2 != '999' && ssf2 != null)
    failingProp = 'line.csSiteSpecificFactor2'
else if (schema != 'myeloma_plasma_cell_disorder' && schema != 'skin_eyelid' && ssf2 != '988' && ssf2 != '999' && ssf2 != null)
    failingProp = 'line.csSiteSpecificFactor2'
else if (schema == 'breast' && ssf3 != '988' && ssf3 != '099' && ssf3 != null)
    failingProp = 'line.csSiteSpecificFactor3'
else if (schema == 'prostate' && ssf3 != '960' && ssf3 != null)
    failingProp = 'line.csSiteSpecificFactor3'
else if (schema == 'myeloma_plasma_cell_disorder' && ssf3 != '987' && ssf3 != '988' && ssf3 != '999' && ssf3 != null)
    failingProp = 'line.csSiteSpecificFactor3'
else if (schema != 'breast' && schema != 'prostate' && schema != 'myeloma_plasma_cell_disorder' && ssf3 != '988' && ssf3 != '999' && ssf3 != null)
    failingProp = 'line.csSiteSpecificFactor3'
else if (schema == 'prostate' && ssf4 != '550' && ssf4 != '988' && ssf4 != '999' && ssf4 != null)
    failingProp = 'line.csSiteSpecificFactor4'
else if (schema != 'prostate' && ssf4 != '987' && ssf4 != '988' && ssf4 != '999' && ssf4 != null)
    failingProp = 'line.csSiteSpecificFactor4'
else if (ssf5 != '987' && ssf5 != '988' && ssf5 != '999' && ssf5 != null)
    failingProp = 'line.csSiteSpecificFactor5'
else if (ssf6 != '987' && ssf6 != '988' && ssf6 != '999' && ssf6 != null)
    failingProp = 'line.csSiteSpecificFactor6'
else if (ssf7 != '987' && ssf7 != '988' && ssf7 != '999' && ssf7 != null)
    failingProp = 'line.csSiteSpecificFactor7'
else if (ssf8 != '988' && ssf8 != '999' && ssf8 != null)
    failingProp = 'line.csSiteSpecificFactor8'
else if (ssf9 != '988' && ssf9 != '999' && ssf9 != null)
    failingProp = 'line.csSiteSpecificFactor9'
else if (ssf10 != '988' && ssf10 != '999' && ssf10 != null)
    failingProp = 'line.csSiteSpecificFactor10'
else if (ssf11 != '988' && ssf11 != '999' && ssf11 != null)
    failingProp = 'line.csSiteSpecificFactor11'
else if (ssf12 != '988' && ssf12 != '999' && ssf12 != null)
    failingProp = 'line.csSiteSpecificFactor12'
else if (ssf13 != '988' && ssf13 != '999' && ssf13 != null)
    failingProp = 'line.csSiteSpecificFactor13'
else if (ssf14 != '988' && ssf14 != '999' && ssf14 != null)
    failingProp = 'line.csSiteSpecificFactor14'
else if (ssf15 != '988' && ssf15 != '999' && ssf15 != null)
    failingProp = 'line.csSiteSpecificFactor15'
else if (ssf16 != '988' && ssf16 != '999' && ssf16 != null)
    failingProp = 'line.csSiteSpecificFactor16'
else if (ssf17 != '988' && ssf17 != '999' && ssf17 != null)
    failingProp = 'line.csSiteSpecificFactor17'
else if (ssf18 != '988' && ssf18 != '999' && ssf18 != null)
    failingProp = 'line.csSiteSpecificFactor18'
else if (ssf19 != '988' && ssf19 != '999' && ssf19 != null)
    failingProp = 'line.csSiteSpecificFactor19'
else if (ssf20 != '988' && ssf20 != '999' && ssf20 != null)
    failingProp = 'line.csSiteSpecificFactor20'
else if (ssf21 != '988' && ssf21 != '999' && ssf21 != null)
    failingProp = 'line.csSiteSpecificFactor21'
else if (ssf22 != '988' && ssf22 != '999' && ssf22 != null)
    failingProp = 'line.csSiteSpecificFactor22'
else if (ssf23 != '988' && ssf23 != '999' && ssf23 != null)
    failingProp = 'line.csSiteSpecificFactor23'
else if (ssf24 != '988' && ssf24 != '999' && ssf24 != null)
    failingProp = 'line.csSiteSpecificFactor24'
else if (metsBone != '8' && metsBone != '9' && metsBone != null)
    failingProp = 'line.csMetsAtDxBone'
else if (metsBrain != '8' && metsBrain != '9' && metsBrain != null)
    failingProp = 'line.csMetsAtDxBrain'
else if (metsLiver != '8' && metsLiver != '9' && metsLiver != null)
    failingProp = 'line.csMetsAtDxLiver'
else if (metsLung != '8' && metsLung != '9' && metsLung != null)
    failingProp = 'line.csMetsAtDxLung'
else if (metsVasc != '8' && metsVasc != '9' && metsVasc != null)
    failingProp = 'line.lymphVascularInvasion'

if (failingProp != null) {
    // only fail the properties we care about.  properties must start with 'line.'
    (List)Context.IF354_properties.each() { prop -> 
        Functions.ignoreFailureOnProperty(binding, 'line.' + prop)
    }
    Functions.forceFailureOnProperty(binding, failingProp)
    return false
}

return true]]></expression>
            <message>CS Item is invalid for DCO case</message>
            <description><![CDATA[The purpose of this edit is to verify that the CS data, when populated, are correctly coded for Death Certificate Only cases (Type of Reporting Source = 7).

This edit is skipped if:
1. Year of Date of Diagnosis is less than 2004, greater than 2017, blank, or invalid
2. Type of Reporting Source is not = 7 (Death Certificate Only)
3. Behavior Code ICD-O-3 = 0 (benign) or 1 (borderline) and schema is not Brain, CNSOther, or IntracranialGland
4. Behavior Code ICD-O-3 is 2 (in situ)
5. Schema is invalid
6. If year of Date of Diagnosis is 2016-2017 and CS Extension is blank

The valid codes for each schema can be found in the table, CS Defaults version 020302, available under Support Files and Test Files on the CS web page (http://www.cancerstaging.org/cstage/software/index.html).

The following CS data items must be equal to one of the values specified below.  [Please note that although this edit sometimes allows more than one "correct" code for DCO cases, there are other edits that will only allow codes (for instance, 988 OR 999) based on a particular standard setter's requirements.]

  CS Tumor Size: 988 or 999 or blank
  CS Extension:
    - If Behavior Code ICD-O-3 = 0 (benign) or 1 (borderline)
      and schema is Brain, CNSOther, or IntracranialGland: 050, 999, or blank
    - If schema is HemeRetic, code 800, 999, or blank
    - If schema is MyelomaPlasmaCellDisorder, code 800, 810, 820, 999, or blank
    - If schema is LymphomaOcularAdnexa, code 989 or 999 or blank
    - For all other schemas: 988, 999, or blank
  CS Tumor Size/Ext Eval: 9 or blank
  CS Lymph Nodes:
    If schema is MyelomaPlasmaCellDisorder, code 987, 988, 999, or blank
    otherwise code 988, 999, or blank
  CS Lymph Nodes Eval: 9 or blank
  CS Mets at DX: 98, 99, or blank
  CS Mets Eval: 9 or blank
  CS Site-Specific Factor 1:
    - If schema is Retinoblastoma, code 960 or blank
    - If schema is Bladder, KidneyRenalPelvis or Urethra, code 987, 988, 999, or blank
    otherwise code 988, 999, or blank
  CS Site-Specific Factor 2:
    - If schema is MyelomaPlasmaCellDisorder or SkinEyelid, code 987, 988, 999, or blank
    otherwise code 988, 999, or blank
  CS Site-Specific Factor 3:
    - If schema is Breast, code 988, 099, or blank
    - If schema is Prostate, code 960 or blank
    - If schema is MyelomaPlasmaCellDisorder, code 987, 988, 999, or blank
    otherwise code 988, 999, or blank
  CS Site-Specific Factor 4:
    - If schema is Prostate, 550, 988, 999, or blank
    otherwise code 987, 988, 999, or blank
  CS Site-Specific Factor 5: 987, 988, 999, or blank
  CS Site-Specific Factor 6: 987, 988, 999, or blank
  CS Site-Specific Factor 7: 987, 988, 999, or blank
  CS Site-Specific Factor 8: 988, 999, or blank
  CS Site-Specific Factor 9: 988, 999, or blank
  CS Site-Specific Factor10: 988, 999, or blank
  CS Site-Specific Factor11: 988, 999, or blank
  CS Site-Specific Factor12: 988, 999, or blank
  CS Site-Specific Factor13: 988, 999, or blank
  CS Site-Specific Factor14: 988, 999, or blank
  CS Site-Specific Factor15: 988, 999, or blank
  CS Site-Specific Factor16: 988, 999, or blank
  CS Site-Specific Factor17: 988, 999, or blank
  CS Site-Specific Factor18: 988, 999, or blank
  CS Site-Specific Factor19: 988, 999, or blank
  CS Site-Specific Factor20: 988, 999, or blank
  CS Site-Specific Factor21: 988, 999, or blank
  CS Site-Specific Factor22: 988, 999, or blank
  CS Site-Specific Factor23: 988, 999, or blank
  CS Site-Specific Factor24: 988, 999, or blank

CS Mets at DX-Bone: 8, 9, or blank
CS Mets at DX-Brain: 8, 9, or blank
CS Mets at DX-Liver: 8, 9, or blank
CS Mets at DX-Lung: 8, 9,  or blank

Lymphovascular Invasion: 8, 9, or blank]]></description>
            <history>
                <event version="SE12-005-01" user="murphyr" date="2011-07-29" ref="66468">Edit created.</event>
                <event version="SE12-005-04" user="murphyr" date="2011-10-04" ref="66526">Changed codes for SSF2 and SSF7.</event>
                <event version="SE12-005-04" user="murphyr" date="2011-10-05" ref="66532">Changed codes for CS Lymph Nodes.</event>
                <event version="SE12-005-05" user="murphyr" date="2011-10-10" ref="66537">Fixed issue where this edit failed to report when CS Tumor Size fails.</event>
                <event version="SE12-007-02" user="murphyr" date="2012-04-09" ref="66700">Fixed issue where value for extension was not being checked for malignant brain.</event>
                <event version="SE12-008-01" user="murphyr" date="2012-08-09" ref="66708">Update for SSF1 &amp; SSF2.</event>
                <event version="SE13-009-01" user="murphyr" date="2013-01-25" ref="66826">Edit name changed.</event>
                <event version="SE13-010-01" user="murphyr" date="2013-05-13" ref="66883">Optimized.</event>
                <event version="SE13-010-01" user="murphyr" date="2013-07-03" ref="66899">Blank values for any of the fields no longer makes the edit fail.</event>
                <event version="SE14-011-01" user="murphyr" date="2013-10-25" ref="67019">Added extension case for LymphomaOcularAdnexa.  Fxied ignoring properties issue.</event>
                <event version="SE16-015-01" user="kirbyk" date="2016-04-12" ref="67328">Added skip condition for 2016 cases when CS Extension is empty.</event>
                <event version="SE16-015-01" user="kirbyk" date="2016-05-04" ref="67370">Changed edit to use schema IDs instead of schema names</event>
                <event version="SE16-016-01" user="kirbyk" date="2016-12-08" ref="67569">Edit now skips 2017 cases that do not collect CS.</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-018-02" user="kirbyk" date="2018-06-06" ref="67836">Changed edit to skip 2018+ cases; changed name.</event>
                <event version="SE18-018-06" user="kirbyk" date="2018-08-24" ref="68025">Changed &apos;Lymph-vascular Invasion&apos; to &apos;Lymphovascular Invasion&apos; in documentation.</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="kirbyk" date="2021-03-09" ref="68568">Edit tag changed.</event>
                <event version="SE24-024-06" user="kirbyk" date="2024-07-22" ref="69326">Removed some edit dependencies.</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy