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

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

There is a newer version: 024-13
Show newest version
        <rule id="IF123" name="CS Extension, Primary Site, Behavior ICDO3 (CS)" tag="N0685" java-path="lines.line" category="inter-field" depends="Behavior_Code_ICD-O-3,CS_Extension,CS_Site-Specific_Factor_25,Histologic_Type_ICD-O-3,Primary_Site,Type_of_Reporting_Source">
            <expression><![CDATA[if ((line.behaviorCodeIcdO3 == '0' || line.behaviorCodeIcdO3 == '1') && (line._csSchemaId != 'brain' && line._csSchemaId != 'cns_other' && line._csSchemaId != 'intracranial_gland'))
   return true
if (line.primarySite == null || line.histologicTypeIcdO3 == null || line.csExtension == null || line.typeOfReportingSource == '7')
    return true
if (line._csSchemaId == null)
    return true

if (line._csSchemaId != 'prostate' && line.csExtension == '000' && line.behaviorCodeIcdO3 != '2')
    return false
if (['stomach','small_intestine','gist_stomach','gist_small_intestine','net_stomach','net_small_intestine','esophagus_gejunction'].contains(line._csSchemaId) && line.csExtension == '050')
   return line.behaviorCodeIcdO3 == '2'
if (['colon','rectum','gist_colon','gist_rectum','net_colon','net_rectum'].contains(line._csSchemaId) && line.csExtension == '050')
    return line.behaviorCodeIcdO3 == '2'
if (['colon','rectum','gist_colon','gist_rectum','net_colon','net_rectum'].contains(line._csSchemaId) &&
    (['8210','8261','8263'].contains(line.histologicTypeIcdO3)) && line.behaviorCodeIcdO3 == '2')
    return line.csExtension == '050'
if (line._csSchemaId == 'breast' && line.behaviorCodeIcdO3 == '2')
    return line.csExtension == '000' || line.csExtension == '050' || line.csExtension == '070'
if (line._csSchemaId == 'cervix' && line.csExtension == '010')
    return line.behaviorCodeIcdO3 == '2'
if (line._csSchemaId == 'penis' && line.csExtension == '050' && ! (Functions.between(line.histologicTypeIcdO3,'8720','8790') || Functions.between(line.histologicTypeIcdO3,'9700','9701')))
    return line.behaviorCodeIcdO3 == '2'
if (['brain','cns_other','intracranial_gland'].contains(line._csSchemaId) && line.csExtension == '050')
    return line.behaviorCodeIcdO3 == '0' || line.behaviorCodeIcdO3 == '1'
if (['brain','cns_other','intracranial_gland'].contains(line._csSchemaId) && (line.behaviorCodeIcdO3 == '0' || line.behaviorCodeIcdO3 == '1'))
    return line.csExtension == '050'
if (line._csSchemaId == 'endocrine_other' && (line.primarySite == 'C754' || line.primarySite == 'C755') && line.csExtension == '000')
    return false
if ((line._csSchemaId == 'kidney_renal_pelvis' || line._csSchemaId == 'urinary_other') && line.behaviorCodeIcdO3 == '2')
    return line.csExtension == '050' || line.csExtension == '060'
if ((line._csSchemaId == 'kidney_renal_pelvis' || line._csSchemaId == 'urinary_other') && (line.csExtension == '050' || line.csExtension == '060'))
    return line.behaviorCodeIcdO3 == '2'
if (line._csSchemaId == 'urethra' && line.behaviorCodeIcdO3 == '2')
    return Functions.matches(line.csExtension, /^0[5678]0$/)
if (line._csSchemaId == 'urethra' && Functions.matches(line.csExtension, /^0[5678]0$/))
    return line.behaviorCodeIcdO3 == '2'
if (line._csSchemaId == 'bladder' && line.behaviorCodeIcdO3 == '2')
    return ['010','030','060','100'].contains(line.csExtension)
if (line._csSchemaId == 'bladder' && Functions.matches(line.csExtension, /^0[136]0$/))
    return line.behaviorCodeIcdO3 == '2'
if (line._csSchemaId == 'melanoma_conjunctiva' && line.csExtension == '005')
    return line.behaviorCodeIcdO3 == '3'
if (line._csSchemaId == 'melanoma_conjunctiva' && (line.csExtension == '100' || line.csExtension == '120'))
    return line.behaviorCodeIcdO3 == '2' || line.behaviorCodeIcdO3 == '3'
if (line.csExtension >= '100')
    return line.behaviorCodeIcdO3 == '3'

return true]]></expression>
            <message>Conflict among Site, Hist ICD-O-3, Behavior ICD-O-3 and CS Extension</message>
            <description><![CDATA[The purpose of this edit is to verify that the values coded in Behavior Code ICD-O-3 [523] and CS Extension [2810] are consistent.

This edit is skipped if any of the following conditions are true:
  1.  CS Extension [2810] is empty
  2.  Type of Reporting Source [500] = 7 (Death Certificate Only)
  3.  Behavior Code ICD-O-3 [523] = 0 (benign) or 1 (borderline) and schema
      is not Brain, CNSOther, or IntracranialGland.

This edit first determines the correct CS schema by doing a function call to the CS Dynamic Link Library (dll).  The function call passes Primary Site, Histologic Type ICD-O-3, and CS Site-Specific Factor25 (schema discriminator) to the dll and the CS schema name is returned.

for all CS schemas except Prostate:
   If CS extension [2810] = 000, then Behavior Code ICD-O-3 [523] must = 2 (in situ).

If schema is Stomach, SmallIntestine, GISTStomach, GISTSmallIntestine, NETStomach, NETSmallIntestine, or EsophagusGEJunction:
   If CS Extension [2810] = 05, then Behavior Code ICD-O-3 [523] must = 2.

If schema is Colon, Rectum, GISTColon, GISTRectum, NETColon, or NETRectum:
    If CS Extension[2810] = 05, then Behavior Code ICD-O-3[523] must = 2(in situ).
    If Histologic Type ICD-O-3[522] = 8210, 8261, 8263 ('carcinoma in a polyp' codes), then if Behavior ICD-O-3[523] = 2, CS Extension[2810] must = 05.

If schema is Breast:
    If Behavior Code ICD-O-3 [523] = 2, then CS Extension [2810] must = 000, 050, or 070.

If schema is Cervix:
   If CS Extension [2810] = 010, then Behavior Code ICD-O-3 [523] must = 2.

If schema is Penis:
   If CS Extension [2810] = 050, then Behavior Code ICD-O-3 [523] must = 2.

If schema is Brain schema, CNSOther, or IntracranialGland:
    If CS Extension = 050, then Behavior Code ICD-O-3 must = 0 (benign) or 1 (borderline).
    If Behavior Code ICD-O-3 = 0 or 1, then CS Extension must = 050.

If schema is EndocrineOther:
    If Primary Site = C754 (cartoid body), or C755 (aortic body and other paraganglia):
        CS Extension must not = 000

If schema is KidneyRenalPelvis or UrinaryOther:
    If Behavior Code ICD-O-3 [523] = 2, then CS Extension [2810] must = 050 or 060.
    If CS Extension [2810] = 050 or 060, then Behavior Code ICD-O-3 [523] must = 2 (in situ).

If schema is Urethra:
    If Behavior Code ICD-O-3[523] = 2, then CS Extension[2810] must = 050, 060, 070, or 080.
    If CS Extension[2810] = 050, 060, 070, or 080, then Behavior Code ICD-O-3[523] must = 2 (in situ).

If schema is Bladder:
    If Behavior Code ICD-O-3 [523] = 2, then CS Extension [2810] must = 010, 030, 060 or 100.
    If CS Extension [2810] = 010, 030, or 060, then Behavior Code ICD-O-3[523] must = 2 (in situ).

If schema = MelanomaConjunctiva:
    If CS Extension = 005, then Behavior Code ICD-O-3 must = 3.
    If CS Extension = 100 or 120, then Behavior Code ICD-O-3 may = 2 or 3.

If none of the above conditions are true:
     If CS Extension is greater than or equal to 100, then Behavior Code ICD-O-3 must = 3 (invasive).]]></description>
            <history>
                <event version="SE11-001-19" user="greend" date="2005-05-11">Additional logic was added for in situ colon and rectum schemas.  Additional logic was added for the urethra schema.  The in situ codes for the bladder schema were changed from 00-06 to 01,03,06.</event>
                <event version="SE11-001-20" user="greend" date="2006-03-23">Edit is now skipped for death certificate only cases.</event>
                <event version="SE11-001-20" user="greend" date="2006-09-25">Modified to require that, if after all exceptions have been checked, if CS Extension is greater than or equal to 10, then Behavior Code ICD-O-3 must = 3 (invasive).</event>
                <event version="SE11-001-21" user="greend" date="2007-02-02">Added code to check if Primary Site = C379, C740-741, C749, C750-C755 and C758-C759:
               1.  If CS Extension = 05, then Primary Site must = C751, C752, or C753 and Behavior Code ICD-O-3 must = 0 or 1.
               2.  If Behavior Code ICD-O-3 = 0 or 1, then CS Extension must = 05.

             Also added code to skip borderline ovarian cases (Primary Site = C569, Histologic Type ICD-O-3 = 8442, 8451, 8462, 8472, or 8473, and Behavior Code ICD-O-3 = 1).</event>
                <event version="SE11-001-22" user="greend" date="2007-12-15">Edit is skipped if Behavior Code ICD-O-3 [523] = 0 (benign) or 1 (borderline) and Primary Site [400] is not C700-729 (Brain and Other CNS) or C751-C753 (Intracranial Endocrine).</event>
                <event version="SE11-001-23" user="greend" date="2009-01-06">The following were added:
                1.  If Primary Site = C160-C69 (Stomach Schema) or C170-C179 (Small Intestine Schema):  if CS Extension = 05, then Behavior Code ICD-O-3 must = 2.
                2.  If Primary Site = C530-C539 (Cervix Uteri Schema):  If CS Extension = 01, then Behavior Code must = 2.
                3.  If Primary Site = C600-C609 (Penis Schema):  If CS Extension = 05, then Behavior ICD-O-3 must = 2.
                4.  If Primary Site = C740, C741, C749, C754, or C755, CS Extension must NOT = 00.</event>
                <event version="SE11-001-23" user="greend" date="2009-04-20">Removed the following logic from the edit.  This was already being caught from the Behavior (0 or 1) bypass:  This edit is also skipped for borderline ovarian cases (Primary site=C569, Histologic Type ICD-O-3 [522] = 8442,8451,8462,8472 or 8473 and Behavior Code ICD-O-3 [523] = 1).</event>
                <event version="SE12-002-01" user="murphyr" date="2010-02-02">Extension codes changed to 3 digits.  Edit now uses schema names instead of sites.</event>
                <event version="SE12-004-01" user="murphyr" date="2011-02-10">Added that if CS Schema is EsophagusGEJunction then if CS Extension [2810] = 05, then Behavior Code ICD-O-3 [523] must = 2.</event>
                <event version="SE12-004-01" user="murphyr" date="2011-02-14">Updated for CSv2 version 02.03.02.</event>
                <event version="SE12-005-08" user="murphyr" date="2011-12-14" ref="66559">Added logic for Melanoma Conjunctiva (If CS Extension = 100 or 120, then Behavior Code ICD-O-3 may = 2 or 3.)</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-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>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy