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

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

There is a newer version: 024-13
Show newest version
        <rule id="IF536" name="CS Items - SEER Required - SSF 25 (CS)" tag="N2294" java-path="lines.line" category="inter-field" depends="Behavior_Code_ICD-O-3,CS_Extension,CS_Site-Specific_Factor_25,Year_of_Diagnosis">
            <expression><![CDATA[if (line.primarySite == null || line.histologicTypeIcdO3 == null || ((line.behaviorCodeIcdO3 == '0' || line.behaviorCodeIcdO3 == '1') && !['brain','cns_other','intracranial_gland'].contains(line._csSchemaId)) || line.dateOfDiagnosisYear == null)
    return true

if (line.dateOfDiagnosisYear >= '2004' && line.dateOfDiagnosisYear <= '2017' && line.csSiteSpecificFactor25 == null)
    return false

Integer yearDx = Functions.asInt(line.dateOfDiagnosisYear)
String schemaMatch = ((List)((Map)Context.CS_SSF).get(line._csSchemaId))?.get(24)//sf25
// R = Required
if (line._csSchemaId != null && schemaMatch != 'R')
    return true

if ((yearDx > 2015 && line.csExtension != null) || (yearDx > 2003 && yearDx < 2016))
    return line.csSiteSpecificFactor25 != '988'
else if (yearDx > 2015 && line.csExtension == null) {
    boolean peritoneumSite = Functions.matches(line.primarySite, /^C48[128]$/)
    String hist = line.histologicTypeIcdO3
    boolean peritoneumHist = ('8000' <= hist && hist <= '8934') || ('8940' <= hist && hist <= '9136') || ('9141' <= hist && hist <= '9582') || ('9700' <= hist && hist <= '9701')
    if (line._csSchemaId != 'peritoneum' && line._csSchemaId != 'peritoneum_female_gen' && !(peritoneumSite && peritoneumHist))
        return line.csSiteSpecificFactor25 != '988'
}

return true]]></expression>
            <message>CS Site-Specific Factor 25 requirements conflict for this schema</message>
            <description><![CDATA[The purpose of this edit is to verify that CS Site-Specific Factor 25 is entered for the schemas for which it is required by SEER.

This edit is skipped if any of the following conditions are true:
1. Behavior Code ICD-O-3 = 0 (benign) or 1 (borderline) and
   schema is not Brain, CNSOther, or IntracranialGland
2. CS schema is invalid
3. Date of Diagnosis is blank or invalid

The logic is as follows:
1. For all schemas, if year of Diagnosis is 2004-2017, CS Site-Specific Factor 25 cannot be blank.

2. For all Schemas, if year of Diagnosis is 2016 or later and CS Extension is NOT empty (CS Items collected), CS Site-Specific Factor 25 must not be 988 (not applicable) for the schemas in List 1, "Schemas for which CS Site-Specific Factor 25 is required"

3. For all Schemas, if year of Diagnosis is 2016 or later and CS Extension is empty (CS Items not collected), CS Site-Specific Factor 25 must not be 988 (not applicable) for the schemas in List 1, EXCEPT for the schemas  Peritoneum and PeritoneumFemaleGen which can be 988.

4. For all schemas, if year of Diagnosis is 2004-2015, CS Site-Specific Factor 25 must not be 988 (not applicable) for the schemas in List 1, "Schemas for which CS Site-Specific Factor 25 is required"


List 1: Schemas for which CS Site-Specific Factor 25 is Required by SEER
 - "Required" means CS Site-Specific Factor 25 cannot = 988
--------------------------------------------------------------------------------------------------------
BileDuctsDistal
BileDuctsPerihilar
CysticDuct
EsophagusGEJunction
LacrimalGland
LacrimalSac
MelanomaCiliaryBody
MelanomaIris
Nasopharynx
Peritoneum
PeritoneumFemaleGen
PharyngealTonsil
Stomach]]></description>
            <history>
                <event version="SE16-015-01" user="kirbyk" date="2016-04-21" ref="67237">Edit created.</event>
                <event version="SE16-015-04" user="kirbyk" date="2016-07-08" ref="67488">Changed edit to not force 988 when DX year is 2016+ and CS is not collected.</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-017-01" user="kirbyk" date="2018-04-02" ref="67723">Updated logic to allow blank SSF 25 for 2018+ 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>
                <event version="SE21-021-03" user="kirbyk" date="2021-03-09" ref="68568">Edit name changed.</event>
                <event version="SE24-024-03" user="kirbyk" date="2024-04-05" ref="69447">Changed how edit handles missing CS Schema ID.</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy