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

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

The newest version!
<rule id="IFN6778" name="RX Summ--Treatm Stat, Treatment 2023 (NAACCR)" tag="N6778" java-path="lines.line" category="inter-field">
            <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2023' || line.rxSummTreatmentStatus == null)
    return true


boolean isSurgPrimSiteGiven = Functions.matches(line.rxSummSurgPrimSite2023, /^[AB]([1-8]\d\d|900)$/)
boolean isSurgOthRegDisGiven = Functions.matches(line.rxSummSurgOthRegDis, /^[1-5]$/)
boolean isChemoGiven = Functions.matches(line.rxSummChemo, /^0[1-3]$/)
boolean isTransplantGiven = Functions.matches(line.rxSummTransplntEndocr, /^[1-3]\d|40$/)
boolean isSummOtherGiven = Functions.matches(line.rxSummOther, /^[1236]$/)
boolean isTreatmentGivenNoScope = isSurgPrimSiteGiven || isSurgOthRegDisGiven || line.rxSummBrm == '01' || isChemoGiven || line.rxSummHormone == '01' || isTransplantGiven || isSummOtherGiven
    || line.reasonForNoRadiation == '0'

if (isTreatmentGivenNoScope)
    return line.rxSummTreatmentStatus == '1'

if (line.rxSummTreatmentStatus == '1') {
    return isTreatmentGivenNoScope || Functions.matches(line.rxSummScopeRegLnSur, /^[2-7]$/)
}
else if (line.rxSummTreatmentStatus == '0' || line.rxSummTreatmentStatus == '2') {
    return ['A000','A980','B000'].contains(line.rxSummSurgPrimSite2023) &&
            Functions.matches(line.rxSummScopeRegLnSur, /^0|[1-7]|9$/) &&
            line.rxSummSurgOthRegDis == '0' &&
            Functions.matches(line.rxSummBrm, /^00|8[0-8]$/) &&
            Functions.matches(line.rxSummChemo, /^00|8[0-8]$/) &&
            Functions.matches(line.rxSummHormone, /^00|8[0-8]$/) &&
            Functions.matches(line.rxSummTransplntEndocr, /^00|8[0-8]$/) &&
            Functions.matches(line.rxSummOther, /^[078]$/) &&
            (Functions.matches(line.reasonForNoRadiation, /^[125-9]$/) || line.phase1RadiationTreatmentModality == '00')
}
else if (line.rxSummTreatmentStatus == '9') {
    if (line.rxSummSurgPrimSite2023 == 'A990' || line.rxSummSurgPrimSite2023 == 'B990' ||
            line.rxSummSurgOthRegDis == '9' || line.rxSummBrm == '99' || line.rxSummChemo == '99' || line.rxSummHormone == '99' ||
            line.rxSummTransplntEndocr == '99' || line.rxSummOther == '9' || Functions.matches(line.reasonForNoRadiation, /^[89]$/) || line.phase1RadiationTreatmentModality == '99') {
        return Functions.matches(line.rxSummSurgPrimSite2023, /^[AB](000|990)|A980$/) &&
            Functions.matches(line.rxSummScopeRegLnSur, /^[0-7]|9$/) &&
            Functions.matches(line.rxSummSurgOthRegDis, /^[09]$/) &&
            Functions.matches(line.rxSummBrm, /^00|8[0-8]|99$/) &&
            Functions.matches(line.rxSummChemo, /^00|8[0-8]|99$/) &&
            Functions.matches(line.rxSummHormone, /^00|8[0-8]|99$/) &&
            Functions.matches(line.rxSummTransplntEndocr, /^00|8[0-8]|99$/) &&
            Functions.matches(line.rxSummOther, /^[0789]$/) &&
            (Functions.matches(line.reasonForNoRadiation, /^[89]$/) || Functions.matches(line.phase1RadiationTreatmentModality, /^00|99$/))
    }
    else
        return false
}

return true]]></expression>
            <message>Conflict between RX Summ--Treatment Status and treatment items</message>
            <description><![CDATA[The purpose of this edit is to verify that RX Summ--Treatment Status and
treatment fields are coded consistently.

This edit is skipped under the following conditions:
    a. RX Summ--Treatment Status is blank
    b. Date of Diagnosis is before 2023, blank (unknown), or invalid.

1.  If any of the treatment fields indicate treatment given, then RX Summ--
Treatment Status must equal 1 (treatment given). Treatment is considered "given"
if any of the following is true:
  RX Summ--Surg Prim Site 2023 = A100-A900, B100-B900
  RX Summ--Surg Oth Reg/Dis = 1-5
  RX Summ--BRM = 01
  RX Summ--Chemo = 01-03
  RX Summ--Hormone = 01
  RX Summ--Transplnt/Endocr = 10-40
  RX Summ--Other = 1, 2, 3, 6
  Reason for No Radiation = 0

2. If Treatment Status = 1 (treatment given), at least one of the following fields
must equal treatment given. Treatment is considered "given" if any of the following
is true:
  RX Summ--Surg Prim Site 2023= A100-A900, B100-B900
  RX Summ--Scope Reg LN Sur = 2-7
  RX Summ--Surg Oth Reg/Dis = 1-5
  RX Summ--BRM = 01
  RX Summ--Chemo = 01-03
  RX Summ--Hormone = 01
  RX Summ--Transplnt/Endocr = 10-40
  RX Summ--Other = 1, 2, 3, 6
  Reason for No Radiation = 0

3.  If RX Summ--Treatment Status = 0 (no treatment) or 2 (active surveillance),
then the treatment fields must all indicate "no treatment".
Treatment is considered "not given" if all of the following conditions are true:
  RX Summ--Surg Prim Site 2023 = A000, A980, B000
  RX Summ--Scope Reg LN Sur = 0, 1-7, 9
  RX Summ--Surg Oth Reg/Dis = 0
  RX Summ--BRM = 00, 80-88
  RX Summ--Chemo = 00, 80-88
  RX Summ--Hormone = 00, 80-88
  RX Summ--Transplnt/Endocr = 00, 80-88
  RX Summ--Other = 0, 7-8
  Reason for No Radiation = 1-2, 5-9 or
  Phase I Radiation Treatment Modality = 00

4.  If RX Summ--Treatment Status = 9 (unknown if any treatment), then at least
one of the following treatment fields must indicate "unknown if treatment" (codes 9 and
99 below) and the remaining should indicate either "unknown if treatment" or "no
treatment".  RX Summ--Scope Reg LN Sur may be coded any value 0, 1-7, or 9.
  RX Summ--Surg Prim Site 2023 = A000, A980, A990, B000, B990
  RX Summ--Surg Oth Reg/Dis = 0, 9
  RX Summ--BRM = 00, 80-88, 99
  RX Summ--Chemo = 00, 80-88, 99
  RX Summ--Hormone = 00, 80-88, 99
  RX Summ--Transplnt/Endocr = 00, 80-88, 99
  RX Summ--Other = 0, 7-8, 9
  Reason for No Radiation = 8 or 9 or
  Phase I Radiation Treatment Modality = 00, 99]]></description>
            <history>
                <event version="SE23-023-05" user="shearerw" date="2023-06-26" ref="69234">Edit created.</event>
                <event version="SE24-024-04" user="beverung" date="2024-05-01" ref="69459">Fix regex for RX Summ--Surg Prim Site 2023 in condition 4</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy