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

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

There is a newer version: 024-13
Show newest version
        <rule id="IF442" name="CS LN, RNP, Nodes Eval, SSF 3, MelanomaSkin (CS)" tag="N1768" java-path="lines.line" category="inter-field" depends="Behavior_Code_ICD-O-3,CS_Lymph_Nodes,CS_Reg_Node_Eval,CS_Site-Specific_Factor_3,Regional_Nodes_Positive,Year_of_Diagnosis">
            <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2010' ||
    line.csLymphNodes == null || line.regionalNodesPositive == null ||
    line.csSiteSpecificFactor3 == null || line.csSiteSpecificFactor3 == '988' ||
    line.behaviorCodeIcdO3 == '0' || line.behaviorCodeIcdO3 == '1')
return true

if (line._csSchemaId == 'melanoma_skin') {
    if ((line.csLymphNodesEval == '0' || line.csLymphNodesEval == '1' ||
        line.csLymphNodesEval == '5' || line.csLymphNodesEval == '9') &&
        Functions.matches(line.csLymphNodes, /(^10\d|11[0-8]|125|155$)/))
        return line.csSiteSpecificFactor3 != '005'
    if (line.csLymphNodes == '010' && (line.csLymphNodesEval == '0' || line.csLymphNodesEval == '1' ||
        line.csLymphNodesEval == '5' || line.csLymphNodesEval == '9'))
        return false
    if (line.csLymphNodesEval == '2' || line.csLymphNodesEval == '3' ||
        line.csLymphNodesEval == '6' || line.csLymphNodesEval == '8') {
        if (line.csLymphNodes == '010' && (line.regionalNodesPositive == '00' ||
            line.regionalNodesPositive == '97' || line.regionalNodesPositive == '98'))
            return !(Functions.matches(line.csSiteSpecificFactor3, /(^005|0[1-9]\d|100$)/))
    }
    if (line.csLymphNodesEval == '2' || line.csLymphNodesEval == '3' ||
        line.csLymphNodesEval == '6' || line.csLymphNodesEval == '8') {
        if (line.csLymphNodes == '010' && (line.regionalNodesPositive == '00' ||
            line.regionalNodesPositive == '97' || line.regionalNodesPositive == '98'))
            return !(Functions.matches(line.csSiteSpecificFactor3, /(^005|0[1-9]\d|100$)/))
        if (line.csLymphNodes == '010' && Functions.matches(line.regionalNodesPositive, /(^0[1-9]|[1-8]\d|9[0-5,9]$)/))
            return line.csSiteSpecificFactor3 != '005' && line.csSiteSpecificFactor3 != '100'
        if (Functions.matches(line.csLymphNodes, /(^10\d|11[0-8]$)/) && line.regionalNodesPositive == '00')
            return line.csSiteSpecificFactor3 != '005' && line.csSiteSpecificFactor3 != '010' &&
                line.csSiteSpecificFactor3 != '050' && line.csSiteSpecificFactor3 != '100'
        if (Functions.matches(line.csLymphNodes, /(^10\d|11[0-8]|125|158$)/) && line.regionalNodesPositive == '98')
            return line.csSiteSpecificFactor3 != '005' && line.csSiteSpecificFactor3 != '010' &&
                line.csSiteSpecificFactor3 != '100'
        if ((line.csLymphNodes == '125' || line.csLymphNodes == '155') && line.regionalNodesPositive == '00')
            return line.csSiteSpecificFactor3 != '005' && line.csSiteSpecificFactor3 != '010' &&
                line.csSiteSpecificFactor3 != '100'
        if (Functions.matches(line.csLymphNodes, /(^10\d|11[0-8]|12[23]|125|15[2-8]$)/) &&
            Functions.matches(line.regionalNodesPositive, /(^0[1-9]|[1-8]\d|9[0-7,9]$)/))
            return line.csSiteSpecificFactor3 != '005' && line.csSiteSpecificFactor3 != '100'
        if (line.csLymphNodes == '124' &&
            Functions.matches(line.regionalNodesPositive, /(^01|9[579]$)/))
            return line.csSiteSpecificFactor3 != '005' && line.csSiteSpecificFactor3 != '100'
        if (line.csLymphNodes == '124' &&
            Functions.matches(line.regionalNodesPositive, /(^0[2-9]|[1-8]\d|90$)/))
            return line.csSiteSpecificFactor3 != '005' && line.csSiteSpecificFactor3 != '050' &&
                line.csSiteSpecificFactor3 != '100'
    }
    if (line.csLymphNodesEval == null) {
        if (line.csLymphNodes == '010' && (line.regionalNodesPositive == '00' ||
            line.regionalNodesPositive == '98'))
            return !(Functions.matches(line.csSiteSpecificFactor3, /(^005|100$)/))
        if (Functions.matches(line.csLymphNodes, /(^10\d|11[0-8]|12[1-8]|15[23]$)/) && (line.regionalNodesPositive == '00' ||
            line.regionalNodesPositive == '98'))
            return line.csSiteSpecificFactor3 != '005' && line.csSiteSpecificFactor3 != '010' &&
                line.csSiteSpecificFactor3 != '100'
        if (Functions.matches(line.csLymphNodes, /(^15[5-8]$)/) && (line.regionalNodesPositive == '00' ||
            line.regionalNodesPositive == '98'))
            return line.csSiteSpecificFactor3 != '005' && line.csSiteSpecificFactor3 != '010'
        if (Functions.matches(line.csLymphNodes, /(^010|10\d|11[0-8]|12[1-8]|15[2-3]|15[5-8]$)/) &&
            Functions.matches(line.regionalNodesPositive, /(^0[1-9]|[1-8]\d|9[0-7]$)/))
            return line.csSiteSpecificFactor3 != '005' && line.csSiteSpecificFactor3 != '100'
        if (Functions.matches(line.csLymphNodes, /(^010|10\d|11[0-8]|12[1-8]|15[2-3]$)/) &&
            line.regionalNodesPositive == '99')
            return line.csSiteSpecificFactor3 != '005' && line.csSiteSpecificFactor3 != '100'
        if (Functions.matches(line.csLymphNodes, /(^15[5-8]$)/) && line.regionalNodesPositive == '99')
            return line.csSiteSpecificFactor3 != '005'
    }
}

return true]]></expression>
            <message>MelanomaSkin schema combination failed to derive stage</message>
            <description><![CDATA[This edit applies to AJCC 7 stage only.

This edit generates an error for CS Lymph Nodes, Regional Nodes Positive, CS Lymph Nodes Eval and CS Site-Specific Factor 3 combinations for the MelanomaSkin schema that result in a failure to derive stage. It applies only to cases diagnosed 2010 and later.

This edit is skipped if any of the following conditions are true:
1. Year of Date of Diagnosis is blank, invalid or less than 2010
2. CS Lymph Nodes is empty
3. Regional Nodes Positive is empty
4. CS Site-Specific Factor 3 is empty or = 988
5. Behavior Code ICD-O-3 = 0 (benign) or 1 (borderline)
6. CS schema is invalid

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.

Definitions:
  CS Lymph Nodes code 010 = Individual tumor cells only
  CS Lymph Nodes codes 100-118 = named regional nodes
  CS Lymph Nodes codes 121, 128 = evaluated clinically
  CS Lymph Nodes codes 123, 124, 152-153, 158 = evaluated pathologically
  CS Lymph Nodes code 124 = Stated as N1 nodes
  CS Lymph Nodes codes 155-158 = Stated as N2 nodes

  CS Site-Specific Factor 3 code 005 = clinically and pathologically negative nodes
  CS Site-Specific Factor 3 code 010 = clinically occult nodes
  CS Site-Specific Factor 3 code 100 = clinically apparent intransit metastases only

If schema is MelanomaSkin:

1. If CS Lymph Nodes Eval = 0, 1, 5 or 9:
   AND CS Lymph Nodes = 100-118, 125 or 155
   THEN
       CS Site-Specific Factor 3 must not = 005

2. If CS Lymph Nodes = 010
   THEN
       CS Lymph Nodes Eval must not = 0, 1, 5 or 9

3. If CS Lymph Nodes Eval = 2, 3, 6 or 8:

    A. If CS Lymph Nodes = 010
       AND Regional Nodes Positive = 00, 97, 98
       THEN
           CS Site-Specific Factor 3 must not = 005 or 010-100

    B. If CS Lymph Nodes = 010
       AND Regional Nodes Positive = 01-95 or 99
       THEN
           CS Site-Specific Factor 3 must not = 005 or 100

    C. If CS Lymph Nodes = 100-118
       AND Regional Nodes Positive = 00
       THEN
           CS Site-Specific Factor 3 must not = 005, 010, 050 or 100

    D. If CS Lymph Nodes = 100-118, 125 or 158
       AND Regional Nodes Positive = 98
       THEN
           CS Site-Specific Factor 3 must not = 005, 010 or 100

    E. If CS Lymph Nodes = 125 or 155
       AND Regional Nodes Positive = 00
       THEN
           CS Site-Specific Factor 3 must not = 005, 010 or 100

    F. If CS Lymph Nodes = 100-118, 122-123, 125, 152-158
       AND Regional Nodes Positive = 01-97 or 99
       THEN
           CS Site-Specific Factor 3 must not = 005 or 100

    G. If CS Lymph Nodes = 124
       AND Regional Nodes Positive = 01, 95, 97 or 99
       THEN
           CS Site-Specific Factor 3 must not = 005 or 100

    H. If CS Lymph Nodes = 124
       AND Regional Nodes Positive = 02-90
       THEN
           CS Site-Specific Factor 3 must not = 005, 050 or 100

4. If CS Lymph Nodes Eval is blank

    A. If CS Lymph Nodes = 010
       AND Regional Nodes Positive = 00 or 98
       THEN
           CS Site-Specific Factor 3 must not = 005 or 100

    B. If CS Lymph Nodes = 100-118, 121-128 or 152-153
       AND Regional Nodes Positive = 00 or 98
       THEN
           CS Site-Specific Factor 3 must not = 005, 010 or 100

    C. If CS Lymph Nodes = 155-158
       AND Regional Nodes Positive = 00 or 98
       THEN
           CS Site-Specific Factor 3 must not = 005 or 010

    D. If CS Lymph Nodes = 010, 100-118, 121-128, 152-153 or 155-158
       AND Regional Nodes Positive = 01-97
       THEN
           CS Site-Specific Factor 3 must not = 005 or 100

    E. If CS Lymph Nodes = 010, 100-118, 121-128 or 152-153
       AND Regional Nodes Positive = 99
       THEN
           CS Site-Specific Factor 3 must not = 005 or 100

    F. If CS Lymph Nodes = 155-158
       AND Regional Nodes Positive = 99
       THEN
           CS Site-Specific Factor 3 must not = 005]]></description>
            <history>
                <event version="SE13-010-01" user="murphyr" date="2013-05-06" ref="66857">Edit created.</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-019-05" user="kirbyk" date="2019-10-09" ref="68253">Fixed regular expressions for checking conditions 1 and 3B.</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