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

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

There is a newer version: 024-13
Show newest version
        <rule id="IF288" name="CS Items - SEER Required - SSF 1 (CS)" tag="N2355" java-path="lines.line" category="inter-field" depends="CS_Version_Input_Current,CS_Version_Input_Original,Year_of_Diagnosis">
            <expression><![CDATA[if (line.dateOfDiagnosisYear == null || (line.csVersionInputCurrent == null && line.dateOfDiagnosisYear < '2016') ||
     (line.csVersionInputOriginal == null && line.dateOfDiagnosisYear < '2016') || line._csSchemaId == null)
    return true
if (Functions.matches(line.registryId, /^000000156[2356]$/))
    return true
if ((line.behaviorCodeIcdO3 == '0' || line.behaviorCodeIcdO3 == '1') && !['brain','intracranial_gland','cns_other'].contains(line._csSchemaId))
    return true

// condition 1
if (line.dateOfDiagnosisYear >= '2004' && line.dateOfDiagnosisYear <= '2017' && line.csSiteSpecificFactor1 == null)
    return false

Integer csInputOrig = Functions.asInt(line.csVersionInputOriginal)
Integer csInputCurr = Functions.asInt(line.csVersionInputCurrent)
Integer yearDx = Functions.asInt(line.dateOfDiagnosisYear)
String schemaMatch = ((List)((Map)Context.CS_SSF).get(line._csSchemaId))?.get(0)//ssf1

// R = Required, N = Not required after CSv0204
if (!['N','R'].contains(schemaMatch))
    return true

// condition 2
if (yearDx > 2015 && line.csExtension == null) {
    if (schemaMatch == 'R')
        if (!['retinoblastoma', 'esophagus', 'esophagus_gejunction', 'net_stomach', 'stomach'].contains(line._csSchemaId))
            return line.csSiteSpecificFactor1 != '988'

    return true
}

// condition 3
if ((yearDx >= 2014 && yearDx <= 2015) || ((yearDx == 2016 || yearDx == 2017) && line.csExtension != null) || (yearDx >= 2004 && yearDx <= 2015 && csInputOrig >= 20550)) {
    if (schemaMatch == 'R' && line.csSiteSpecificFactor1 == '988')
        return false

    return true
}

// condition 4
if ((yearDx >= 2010 && yearDx <= 2013) || csInputOrig >= 20001) {
    if (line.csSiteSpecificFactor1 == '988')
        return false

     return true
}

//  condition 5
if (yearDx > 2003 && yearDx < 2010 && csInputOrig < 20000) {
    if (csInputCurr == 20510) {
        if (((List)Context.IF288_Schemas_1).contains(line._csSchemaId)) {
            if (line.csSiteSpecificFactor1 != '988')
                return false
            return true
        }
        else {
            if (['stomach','esophagus_gejunction','net_stomach'].contains(line._csSchemaId))
                return true
        }
        if (line.csSiteSpecificFactor1 == '988')
            return false
    }
    else if (csInputCurr > 20510) {
        if (((List)Context.IF288_Schemas_1).contains(line._csSchemaId) || ['stomach','esophagus_gejunction','net_stomach'].contains(line._csSchemaId))
            return true
        if (line.csSiteSpecificFactor1 == '988')
            return false
    }
}

return true]]></expression>
            <message>CS Site-Specific Factor 1 requirements conflict for this schema</message>
            <description><![CDATA[The purpose of this edit is to verify that CS Site-Specific Factor 1 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. CS Version Input Current is blank and year of diagnosis < 2016
2. CS Version Input Original is blank and year of diagnosis < 2016
3. Behavior Code ICD-O-3 = 0 (benign) or 1 (borderline) and
   schema is not Brain, CNSOther, or IntracranialGland
4. CS schema is invalid
5. Date of Diagnosis is blank or invalid
6. Registry ID = 0000001562 (New York), 0000001563 (Massachusetts), 0000001565 (Illinois), or 0000001566 (Texas)

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

2.  If year of Diagnosis > 2015 and CS Extension is blank (CS items NOT collected ):
   A. CS Site-Specific Factor 1 must not be 988 (not applicable) for the schemas in List 1, "Schemas for which CS Site-Specific Factor 1 is Required for CSv0205 by SEER"
      EXCEPT for the following schemas: Retinoblastoma, Esophagus, EsophagusGEJunction, NETStomach and Stomach which can be 988.

3. For cases diagnosed in 2014-2015 OR (year of Diagnosis=2016-2017 and CS Extension is not blank(CS items collected)) OR (year of diagnosis in 2004-2015 and originally coded in CSv0205):
If year of Diagnosis is 2014-2015 OR (year of Diagnosis=2016-2017 and CS Extension is not blank(CS items collected)) OR (year of diagnosis=2004-2015 and CS Version Input Original is 020550 (originally entered in CSv0205) or higher), then CS Site-Specific Factor 1 must not be 988 (not applicable) for the schemas in List 1, "Schemas for which CS Site-Specific Factor 1 is Required for CSv0205 by SEER".

Note: List 2 includes the schemas for which CS Site-Specific Factor 1 was required for earlier versions of CSv02, but no longer required for CSv0205.  The code 988 is allowed for these particular schemas.

4. For cases diagnosed 2010-2013 OR originally coded in CSv0200-CSv0204:
If year of Diagnosis is 2010-2013 OR CS Version Input Original is greater than 020000 and less than 020550 (indicating case originally entered in CSv0200-CSv0204), then CS Site-Specific Factor 1 must not be 988 for the schemas in List 3, "Schemas for which CS Site-Specific Factor 1 is required for CSv0200-CSv0204 by SEER".

5. For cases diagnosed 2004-2009 AND originally coded in CSv01:
If year of Diagnosis is 2004-2009, then CS Site-Specific Factor 1 must not be 988 (not applicable) for the schemas for which CS Site-Specific Factor 1 is required (see List 3 below), with the following exceptions:

  A. If CS Version Input Current = 020510 (not changed since conversion
     from CSv01 to CSv02):

       1. If CS Site-Specific Factor 1 was not defined in CSv01xxxx
          (List 4 below), then CS Site-Specific Factor 1 must be coded 988.

       2. If schema is Stomach, EsophagusGEJunction or NETStomach (both based
          on Stomach) - schemas that were added after the initial implementation
          of CSv01, CS Site-Specific Factor 1 can be any valid code including
          988.

  B. If CS Version Input Current > 020510 (indicating record was at least
     partially updated in CSv02xxxx:

       1. If CS Site-Specific Factor 1 was not defined in CSv01 (see
          List 4 below),or schema is Stomach, EsophagusGEJunction, or
          NETStomach - schemas that were added after the initial implementation
          of CSv01, CS Site-Specific Factor 1 can be any valid code including
          988.


List 1: Schemas for which CS Site-Specific Factor 1 is Required for CSv0205 by SEER
 - "Required" means CS Site-Specific Factor 1 cannot = 988
--------------------------------------------------------------------------------------------------------
Appendix
BileDuctsIntraHepat
Bladder
Brain
Breast
BuccalMucosa
CNSOther
Colon
Conjunctiva
EpiglottisAnterior
Esophagus
EsophagusGEJunction
FloorMouth
GumLower
GumOther
GumUpper
HeartMediastinum
HemeRetic
Hypopharynx
IntracranialGland
KaposiSarcoma
KidneyParenchyma
KidneyRenalPelvis
LarynxGlottic
LarynxOther
LarynxSubglottic
LarynxSupraglottic
LipLower
LipOther
LipUpper
Liver
Lung
Lymphoma
LymphomaOcularAdnexa
MelanomaBuccalMucosa
MelanomaConjunctiva
MelanomaEpiglottisAnterior
MelanomaFloorMouth
MelanomaGumLower
MelanomaGumOther
MelanomaGumUpper
MelanomaHypopharynx
MelanomaLarynxGlottic
MelanomaLarynxOther
MelanomaLarynxSubglottic
MelanomaLarynxSupraglottic
MelanomaLipLower
MelanomaLipOther
MelanomaLipUpper
MelanomaMouthOther
MelanomaNasalCavity
MelanomaNasopharynx
MelanomaOropharynx
MelanomaPalateHard
MelanomaPalateSoft
MelanomaPharynxOther
MelanomaSinusEthmoid
MelanomaSinusMaxillary
MelanomaSinusOther
MelanomaSkin
MelanomaTongueAnterior
MelanomaTongueBase
MiddleEar
MouthOther
MycosisFungoides
NasalCavity
Nasopharynx
NETStomach
Oropharynx
Ovary
PalateHard
PalateSoft
ParotidGland
Peritoneum
PeritoneumFemaleGen
PharyngealTonsil
PharynxOther
Placenta
Pleura
Prostate
Rectum
Retinoblastoma
Retroperitoneum
SalivaryGlandOther
SinusEthmoid
SinusMaxillary
SinusOther
SmallIntestine
SoftTissue
Stomach
SubmandibularGland
Thyroid
TongueAnterior
TongueBase
Urethra

List 2: Schemas for which CS Site-Specific Factor 1, although required for CSv0200-CSv0204, is no longer required as of CSv0205 and 988 is allowed
------------------------------------------------------------------------
Cervix
CorpusAdenosarcoma
CorpusCarcinoma
CorpusSarcoma
FallopianTube
MerkelCellPenis
MerkelCellScrotum
MerkelCellSkin
MerkelCellVulva
Scrotum
Skin
Vagina

List 3: Schemas for which CS Site-Specific Factor 1 is required for CSv0200-CSv0204 by SEER
 - "Required" means CS Site-Specific Factor 1 cannot = 988
--------------------------------------------------------------------------------------------------------
Appendix
BileDuctsIntraHepat
Bladder
Brain
Breast
BuccalMucosa
Cervix
CNSOther
Colon
Conjunctiva
CorpusAdenosarcoma
CorpusCarcinoma
CorpusSarcoma
EpiglottisAnterior
Esophagus
EsophagusGEJunction
FallopianTube
FloorMouth
GumLower
GumOther
GumUpper
HeartMediastinum
HemeRetic
Hypopharynx
IntracranialGland
KaposiSarcoma
KidneyParenchyma
KidneyRenalPelvis
LarynxGlottic
LarynxOther
LarynxSubglottic
LarynxSupraglottic
LipLower
LipOther
LipUpper
Liver
Lung
Lymphoma
LymphomaOcularAdnexa
MelanomaBuccalMucosa
MelanomaConjunctiva
MelanomaEpiglottisAnterior
MelanomaFloorMouth
MelanomaGumLower
MelanomaGumOther
MelanomaGumUpper
MelanomaHypopharynx
MelanomaLarynxGlottic
MelanomaLarynxOther
MelanomaLarynxSubglottic
MelanomaLarynxSupraglottic
MelanomaLipLower
MelanomaLipOther
MelanomaLipUpper
MelanomaMouthOther
MelanomaNasalCavity
MelanomaNasopharynx
MelanomaOropharynx
MelanomaPalateHard
MelanomaPalateSoft
MelanomaPharynxOther
MelanomaSinusEthmoid
MelanomaSinusMaxillary
MelanomaSinusOther
MelanomaSkin
MelanomaTongueAnterior
MelanomaTongueBase
MerkelCellPenis
MerkelCellScrotum
MerkelCellSkin
MerkelCellVulva
MiddleEar
MouthOther
MycosisFungoides
NasalCavity
Nasopharynx
NETStomach
Oropharynx
Ovary
PalateHard
PalateSoft
ParotidGland
Peritoneum
PeritoneumFemaleGen
PharyngealTonsil
PharynxOther
Placenta
Pleura
Prostate
Rectum
Retinoblastoma
Retroperitoneum
SalivaryGlandOther
Scrotum
SinusEthmoid
SinusMaxillary
SinusOther
Skin
SmallIntestine
SoftTissue
Stomach
SubmandibularGland
Thyroid
TongueAnterior
TongueBase
Urethra
Vagina


List 4: Schemas for which CS Site-Specific Factor 1, although required for CSv02, was not defined in CSv01
----------------------------------------------------------------------------------------------------------
Bladder
Cervix
Conjunctiva
CorpusAdenosarcoma
CorpusCarcinoma
CorpusSarcoma
Esophagus
FallopianTube
HeartMediastinum
HemeRetic
KidneyParenchyma
KidneyRenalPelvis
Lung
MerkelCellPenis
MerkelCellScrotum
MerkelCellSkin
MerkelCellVulva
Peritoneum
PeritoneumFemaleGen
Retroperitoneum
Scrotum
Skin
SmallIntestine
SoftTissue
Urethra
Vagina]]></description>
            <history>
                <event version="SE12-002-01" user="murphyr" date="2010-03-02">Edit created.</event>
                <event version="SE12-002-01" user="murphyr" date="2010-03-23">Changed logic. Added year of diagnosis into edit.</event>
                <event version="SE12-004-01" user="murphyr" date="2011-02-15">Edit updated for CSv2 version 02.03.02.</event>
                <event version="SE12-005-08" user="murphyr" date="2011-12-15" ref="66576">Added Appendix and BileDuctsIntrahepat to List 1</event>
                <event version="SE12-006-01" user="murphyr" date="2011-12-20" ref="66577">Update for version CSv0204.</event>
                <event version="SE12-006-03" user="murphyr" date="2012-01-23" ref="66667">Fixed schema lists and comments in code.</event>
                <event version="SE14-011-01" user="murphyr" date="2013-10-30" ref="66995">Updated for Csv0205.</event>
                <event version="SE16-015-01" user="kirbyk" date="2016-04-25" ref="67241">Updated logic for 2016 cases.</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-015-01" user="kirbyk" date="2016-05-24" ref="67421">Changed edit to not force 988 when DX year is 2016+ and and schema is not defined.</event>
                <event version="SE16-016-01" user="kirbyk" date="2016-12-08" ref="67565">Updated logic to include 2017 cases where CS is 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 1 for 2018+ cases.</event>
                <event version="SE18-019-03" user="beverung" date="2019-07-18" ref="68203">Added skip condition for New York.</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="SE18-020-02" user="beverung" date="2020-03-25" ref="68292">Added skip condition for Massachusetts</event>
                <event version="SE21-021-08" user="beverung" date="2021-08-18" ref="68715">Added skip condition for Illinois and Texas.</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