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

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

There is a newer version: 024-13
Show newest version
        <rule id="IF34" name="Date Initial RX SEER, Ca Dir RX Pre-98 (SEER IF34)" tag="N0894" java-path="lines.line" category="inter-field" depends="Primary_Site,Year_of_Diagnosis">
            <expression><![CDATA[Integer iDxYear = Functions.asInt(line.dateOfDiagnosisYear)

if (line.registryId == '0000001544' || line.registryId == '0000001541' || iDxYear == null ||  iDxYear >= 1998)
   return true

Boolean radToCnsNoUnk = line.rxSummRadToCns ==~/^[0789]$/
Boolean radToCnsYes = line.rxSummRadToCns == '1'
Boolean dateHasValue = (line.dateInitialRxSeerYear != null || line.dateInitialRxSeerMonth != null || line.dateInitialRxSeerDay != null)
Boolean rxSummBrmNoUnk = Functions.matches(line.rxSummBrm, /^(00|8[25-8]||99)$/)
Boolean rxSummBrmYes = line.rxSummBrm == '01'
Boolean rxSummRadNoUnk = Functions.matches(line.rxSummRadiation, /^[0789]$/)
Boolean rxSummRadYes = Functions.matches(line.rxSummRadiation, /^[1-6]$/)
Boolean rxSummSurgRadSeqNoUnk = line.rxSummSurgRadSeq == '0'
Boolean rxSummSurgRadSeqYes = Functions.matches(line.rxSummSurgRadSeq, /^[2-9]$/)
Boolean rxSummChemoNoUnk = Functions.matches(line.rxSummChemo, /^(00|8[25-8]|99)$/)
Boolean rxSummChemoYes = Functions.matches(line.rxSummChemo, /^0[123]$/)
Boolean rxSummHormoneNoUnk = Functions.matches(line.rxSummHormone, /^(00|8[25-8]|99)$/)
Boolean rxSummHormoneYes = line.rxSummHormone == '01'
Boolean rxSummOtherNoUnk = Functions.matches(line.rxSummOther, /^[0789]$/)
Boolean rxSummOtherYes = Functions.matches(line.rxSummOther, /^[1236]$/)
Boolean rxSummTransplntEndocrNoUnk = Functions.matches(line.rxSummTransplntEndocr, /^(00|8[25-8]|99)$/)
Boolean rxSummTransplntEndocrYes = Functions.matches(line.rxSummTransplntEndocr, /^1[012]|[234]0$/)
Boolean primSiteHistCheck = (Functions.matches(line.primarySite, /^C34\d$/) || Functions.between(line.histologicTypeIcdO3, '9800', '9941'))

if (iDxYear < 1988 && line.registryId != '0000001529') {
    if(dateHasValue &&
        (line.rxSummSurgeryType == '00' || (line.rxSummSurgeryType == '09' && line.reasonForNoSurgery ==~/^[68]$/) || (line.rxSummSurgeryType == '09' && line.reasonForNoSurgery == '9'))
        && rxSummRadNoUnk && rxSummSurgRadSeqNoUnk
        && rxSummChemoNoUnk && rxSummHormoneNoUnk
        && rxSummBrmNoUnk && rxSummOtherNoUnk
        && rxSummTransplntEndocrNoUnk) {
        return false
    }
    else if (dateHasValue &&
        (line.rxSummSurgeryType != null && Functions.matches(line.rxSummSurgeryType, /^([1-8]\d|9[0-8])$/))
        || line.reasonForNoSurgery == '0' || rxSummRadYes
        || rxSummSurgRadSeqYes || rxSummChemoYes
        || rxSummHormoneYes || rxSummBrmYes || rxSummOtherYes
        || rxSummTransplntEndocrYes) {
       return true
    }
}
else {
    if(dateHasValue &&
        ((line.rxSummSurgeryType != null && Functions.between(line.rxSummSurgeryType, '00', '09'))
        && Functions.matches(line.reasonForNoSurgery, /^[1-8]$/) || (line.rxSummSurgeryType == '09' && line.reasonForNoSurgery == '9'))
        && rxSummRadNoUnk && rxSummSurgRadSeqNoUnk
        && rxSummChemoNoUnk && rxSummHormoneNoUnk
        && rxSummBrmNoUnk && rxSummOtherNoUnk
        && rxSummTransplntEndocrNoUnk
        && ((!(primSiteHistCheck)) || radToCnsNoUnk)) {
        return false
    }
    else if (dateHasValue &&
        (line.rxSummSurgeryType != null && Functions.matches(line.rxSummSurgeryType, /^([1-8]\d|9[0-8])$/))
        || line.reasonForNoSurgery == '0' || rxSummRadYes
        || rxSummSurgRadSeqYes || rxSummChemoYes
        || rxSummHormoneYes || rxSummBrmYes || rxSummOtherYes
        || rxSummTransplntEndocrYes || (primSiteHistCheck && radToCnsYes)) {
        return true
    }
}

return true]]></expression>
            <message>Date of Init RX--SEER, Cancer-Directed Therapy pre-1998 conflict</message>
            <description><![CDATA[This edit is skipped if any of the following conditions are true:
   1)  Year of Diagnosed is blank or 1998+
   2)  Registry is New Jersey or Greater California.
   3)  Inter-Field edit flag "Date of Initial RX--SEER is not valid." has been triggered

The purpose of this edit is to ensure that when a known Date Therapy Initiated is reported. When it is unknown if any cancer-directed therapy was performed, the Date Therapy Initiated is unknown (blank).

The following table specifies the values for each treatment field for known to have not been performed (NO), for known to have been performed (YES), and unknown if performed (UNK).

If all treatment fields specify NO or UNKNOWN Date Initial RX SEER must specify no therapy performed (Date Initial RX SEER is blank).
If Date Initial RX SEER is a known date (not blank), then at least ONE treatment field must indicate YES.

==========================================================================
RX Summ--Surgery Type

surgery not performed(NO)
    For cases < 1988
      Surgery Type = 00 OR
      Surgery Type = 09 and Reason No Surgery = 6,8
    For cases 1988+
      Surgery Type = 00-09 and Reason No Surgery = 1-8

surgery performed(YES)
    For all years
      Surgery Type = 10-98 or Reason No Surgery = 0

surgery unknown(UNK)
    For all years
      Surgery Type = 09 and Reason No Surgery = 9
==========================================================================
RX Summ--Radiation

  NO:      0,7,8
  YES:     1-6
  UNKNOWN: 9
==========================================================================
RX Summ--Rad to CNS

For cases diagnosed < 1988 or cases diagnosed 1988-1997 and
Primary site is not C340-C349 and histology is not 9800-9941 this
field should be coded 9.

     For cases diagnosed 1988-1997 and primary site = C340-C349 or
     histology 9800-9941
       NO:   0,7,8
       YES:  1
       UNK:  9

==========================================================================
RX Summ--Surg/Rad Seq

  NO:        0
  YES:       2-9
  UNK:       0
==========================================================================
RX Summ--Chemo

  NO:      0,82,85,86,87,88
  YES:     1-3
  UNKNOWN: 99
==========================================================================
RX Summ--Hormone

  NO:      0,82,85,86,87,88
  YES:     1
  UNKNOWN: 99
==========================================================================
RX Summ--BRM

  NO:      0,82,85,86,87,88
  YES:     1
  UNKNOWN: 99
==========================================================================
RX Summ--Other

  NO:      0,7,8
  YES:     1,2,3,6
  UNK:     9
==========================================================================
RX Summ--Transplant/Endocr

  NO:      0,82,85,86,87,88
  YES:     10-12,20,30,40
  UNK:     99]]></description>
            <history>
                <event version="SE11-001-04" user="greend" date="1988-05-25">Additional codes made valid due to 1988 SEER record changes.  Date of diagnosis, primary site, and morphology codes now used.</event>
                <event version="SE11-001-05" user="greend" date="1989-11-15">Histology codes 9867 and 9868 were included in the leukemia category.</event>
                <event version="SE11-001-07" user="greend" date="1991-09-15">Conversion of morphology and topography codes from ICD-O-1 to ICD-O-2.</event>
                <event version="SE11-001-08" user="greend" date="1992-07-15">The date of therapy is now allowed to be 9 filled when therapy is given.  The combination of site-specific surgery = 09 and reason no cancer-directed therapy not equal to 9 is now considered Therapy know not to have been performed.</event>
                <event version="SE11-001-12" user="greend" date="1996-08-05">Program modified to correctly edit breast in situ cases.</event>
                <event version="SE11-001-13" user="greend" date="1997-07-15">Codes 2-5 in the RX Summ-BRM field indicates Cancer-Directed Therapy performed.</event>
                <event version="SE11-001-17" user="greend" date="2003-09-22">Edit modified to skip cases from New Jersey diagnosed before 2000.</event>
                <event version="SE11-001-20" user="greend" date="2006-07-21">Edit restricted to cases diagnosed prior to 1998.  Edit updated to include transplant/endocrine variable.</event>
                <event version="SE11-001-20" user="greend" date="2006-08-23">Edit modified to skip cases from Greater California.</event>
                <event version="SE11-001-22" user="greend" date="2008-01-09">Edit is skipped if year of diagnosis is blank.  AK records diagnosed prior to 1988 are not being edited.</event>
                <event version="SE11-001-22" user="greend" date="2008-01-22">Edit now uses the entire Date of Therapy [1260] (day, month, and year).</event>
                <event version="SE12-002-01" user="murphyr" date="2009-12-17">Date of Initial RX SEER Flag added.  0 and 9 filled dates removed and replaced with blanks and flags.</event>
                <event version="SE12-002-01" user="murphyr" date="2010-01-06">Edit no longer checks for blank date of therapy for first two conditions.</event>
                <event version="SE13-009-01" user="murphyr" date="2012-12-20" ref="66776">Updated edit name.</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>
                <event version="SE23-023-01" user="cooki" date="2023-02-02" ref="69076">Changed logic to pass on blank dates, aligning with 2023 changes.</event>
                <event version="SE24-024-06" user="cooki" date="2024-07-18" ref="69509">Deleted deprecated dependency.</event>
                <event version="SE24-024-06" user="kirbyk" date="2024-07-22" ref="69326">Removed some edit dependencies.</event>
                <event version="SE24-024-06" user="shearerw" date="2024-07-25" ref="69510">Switch from ICD-O-2 to ICD-O-3.</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy