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

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

There is a newer version: 024-13
Show newest version
        <rule id="IF535" name="CS SSF 8, SSF 10, Grade, Prostate (SEER)" tag="N2028" java-path="lines.line" category="inter-field" depends="Behavior_Code_ICD-O-3,CS_Site-Specific_Factor_10,CS_Site-Specific_Factor_8,Grade,Histologic_Type_ICD-O-3,Primary_Site,Type_of_Reporting_Source,Year_of_Diagnosis">
            <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2014' || line.dateOfDiagnosisYear > '2017' || line.typeOfReportingSource == '7')
    return true

if (line.csSiteSpecificFactor8 == null || line.csSiteSpecificFactor8 == '988' || line.csSiteSpecificFactor10 == null || line.csSiteSpecificFactor10 == '988')
    return true

if(line.behaviorCodeIcdO3 == '0' || line.behaviorCodeIcdO3 == '1')
    return true

Integer hist = Functions.asInt(line.histologicTypeIcdO3)
if (line.primarySite != 'C619' || !((8000 <= hist && hist <= 9136) || (9141 <= hist && hist <= 9582) || hist == 9700 || hist == 9701))
    return true

String ssf10 = line.csSiteSpecificFactor10
if (Functions.matches(line.csSiteSpecificFactor8, /^00[2-6]$/)) {
    if ((ssf10 ==~ /^00[2-6]$/ || ssf10 == '998' || ssf10 == '999') && line.grade != '1')
        return false
    else if (ssf10 == '007' && line.grade != '2')
        return false
    else if (['008','009','010'].contains(ssf10) && line.grade != '3')
        return false
}
else if (line.csSiteSpecificFactor8 == '007') {
    if ((ssf10 ==~ /^00[2-7]$/ || ssf10 == '998' || ssf10 == '999') && line.grade != '2')
        return false
    else if (['008','009','010'].contains(ssf10) && line.grade != '3')
        return false
}
else if (['008','009','010'].contains(line.csSiteSpecificFactor8)) {
    if ((ssf10 ==~ /^00[2-9]$/ || ssf10 == '010' || ssf10 == '998' || ssf10 == '999') && line.grade != '3')
        return false
}
else if (line.csSiteSpecificFactor8 == '998' || line.csSiteSpecificFactor8 == '999') {
    if (ssf10 ==~ /^00[2-6]$/ && line.grade != '1')
        return false
    else if (ssf10 == '007' && line.grade != '2')
        return false
    else if (['008','009','010'].contains(ssf10) && line.grade != '3')
        return false
}

return true]]></expression>
            <message>Prostate schema, CS Site-Specific Factor 8, CS Site-Specific Factor 10, and Grade conflict</message>
            <description><![CDATA[Purpose: This edit verifies that Grade is coded correctly for prostate cases diagnosed 2014 and later.  A computer algorithm can be used to derive grade for prostate based on CS Site-Specific Factor 8 (Gleason's score on TURP and CS Site-Specific Factor10 (Gleason's score on prostatectomy/autopsy): if CS Site-Specific Factor 8 or CS Site-Specific Factor10 has known values for Gleason's, the information could be used to automatically derive the grade field.

Source: Instructions for Coding Grade for 2014+
        http://www.seer.cancer.gov/tools/grade/

This edit is skipped if any of the following conditions are true:
1. Year of Date of Diagnosis is blank, invalid, less than 2014 or greater than 2017
2. CS Site-Specific Factor 8 is blank or 988
3. CS Site-Specific Factor10 is blank or 988
4. Case is death certificate only (Type of Reporting Source = 7).
5. Behavior Code ICD-O-3 = 0 (benign) or 1 (borderline)

If Primary Site = C619 (Prostate) and Histologic Type ICD-O-3 = 8000-9136, 9141-9582, 9700-9701:

Using the table below, if Grade does not equal the CS Site-Specific Factor 8 and CS Site-Specific Factor10 combination, then an error message is generated.  Grade specified as "*" can't be automatically calculated and will not be checked by this edit.  The detailed edit logic is provided below the table.
-----------------------------------------------------------------
                    GRADE
SSF8    SSF 10 Codes
Codes  002   003  004  005  006  007  008  009  010  988  998 999
002     1     1    1    1    1    2    3    3    3    *    1   1
003     1     1    1    1    1    2    3    3    3    *    1   1
004     1     1    1    1    1    2    3    3    3    *    1   1
005     1     1    1    1    1    2    3    3    3    *    1   1
006     1     1    1    1    1    2    3    3    3    *    1   1
007     2     2    2    2    2    2    3    3    3    *    2   2
008     3     3    3    3    3    3    3    3    3    *    3   3
009     3     3    3    3    3    3    3    3    3    *    3   3
010     3     3    3    3    3    3    3    3    3    *    3   3
988     *     *    *    *    *    *    *    *    *    *    *   *
998     1     1    1    1    1    2    3    3    3    *    *   *
999     1     1    1    1    1    2    3    3    3    *    *   *
-----------------------------------------------------------------

1. If CS Site-Specific Factor 8 = 002-006
   a. If CS Site-Specific Factor10 = 002-006, 998, 999
          Grade must = 1
   b. If CS Site-Specific Factor10 = 007
          Grade must = 2
   c. If CS Site-Specific Factor10 = 008-010
          Grade must = 3

2. If CS Site-Specific Factor 8 = 007
   a. If CS Site-Specific Factor10 = 002-007, 998, 999
          Grade must = 2
   b. If CS Site-Specific Factor10 = 008-010
          Grade must = 3

3. If CS Site-Specific Factor 8 = 008-010
   a. If CS Site-Specific Factor10 = 002-010, 998, 999
          Grade must = 3

4. If CS Site-Specific Factor 8 = 998, 999
   a. If CS Site-Specific Factor10 = 002-006
          Grade must = 1
   b. If CS Site-Specific Factor10 = 007
          Grade must = 2
   c. If CS Site-Specific Factor10 = 008-010
          Grade must = 3]]></description>
            <history>
                <event version="SE15-013-02" user="kirbyk" date="2015-03-03" ref="67194">Edit created.</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="schadega" date="2018-05-17" ref="67803">Restrict to 2014-2017 cases.</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