edits.seer.internal.rules.IFN5025.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of validation-edits-seer Show documentation
Show all versions of validation-edits-seer Show documentation
Java implemenation of the SEER edits.
The newest version!
<rule id="IFN5025" name="RX Summ--Treatm Stat, Treatment 03-2022 (NAACCR)" tag="N5025" java-path="lines.line" category="inter-field"> <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2019' || line.dateOfDiagnosisYear > '2022' || line.rxSummTreatmentStatus == null) return true if (Functions.matches(line.rxSummSurgPrimSite, /^[1-8]\d|90$/) || Functions.matches(line.rxSummSurgOthRegDis, /^[1-5]$/) || line.rxSummBrm == '01' || Functions.matches(line.rxSummChemo, /^0[1-3]$/) || line.rxSummHormone == '01' || Functions.matches(line.rxSummTransplntEndocr, /^[1-3]\d|40$/) || Functions.matches(line.rxSummOther, /^[1236]$/) || line.reasonForNoRadiation == '0') { return line.rxSummTreatmentStatus == '1' } if (line.rxSummTreatmentStatus == '1') { // at least one field must be 'treatment given' return Functions.matches(line.rxSummSurgPrimSite, /^[1-8]\d|90$/) || (line.dateOfDiagnosisYear < '2021' ? Functions.matches(line.rxSummScopeRegLnSur, /^[1-7]$/) : Functions.matches(line.rxSummScopeRegLnSur, /^[2-7]$/)) || Functions.matches(line.rxSummSurgOthRegDis, /^[1-5]$/) || line.rxSummBrm == '01' || Functions.matches(line.rxSummChemo, /^0[1-3]$/) || line.rxSummHormone == '01' || Functions.matches(line.rxSummTransplntEndocr, /^[1-3]\d|40$/) || Functions.matches(line.rxSummOther, /^[1236]$/) || line.reasonForNoRadiation == '0' } else if (line.rxSummTreatmentStatus == '0' || line.rxSummTreatmentStatus == '2') { // all fields must be 'no treatment' return ((line.rxSummSurgPrimSite == '00' || line.rxSummSurgPrimSite == '98') && (line.dateOfDiagnosisYear < '2021' || 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') { // at least one field must be 'unknown' (9s) if (line.rxSummSurgPrimSite == '99' || line.rxSummSurgOthRegDis == '9' || line.rxSummBrm == '99' || line.rxSummChemo == '99' || line.rxSummHormone == '99' || line.rxSummTransplntEndocr == '99' || line.rxSummOther == '9' || line.phase1RadiationTreatmentModality == '99') { // all fields must be 'no treatment' or 'unknown' return ((line.rxSummSurgPrimSite == '00' || line.rxSummSurgPrimSite == '98' || line.rxSummSurgPrimSite == '99') && Functions.matches(line.rxSummScopeRegLnSur, /^0|[1-7]|9$/) && (line.rxSummSurgOthRegDis == '0' || line.rxSummSurgOthRegDis == '9') && 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]$/) || line.phase1RadiationTreatmentModality == '00' || line.phase1RadiationTreatmentModality == '99')) } else return false } return true]]></expression> <message>Conflict between RX Summ--Treatment Status and treatment codes.</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 2019 or after 2022, 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 03-2022 = 10-90 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 03-2022 = 10-90 RX Summ--Scope Reg LN Sur = 1-7 through 2020 only, 2-7 2021+ 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 03-2022 = 00, 98 RX Summ--Scope Reg LN Sur = 0, 1-7, 9 for 2021+ diagnosis 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 03-2022 = 00, 98, 99 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="SE18-019-01" user="kirbyk" date="2019-04-02" ref="68159">Edit created.</event> <event version="SE18-019-03" user="kirbyk" date="2019-07-30" ref="68213">Removed some checks for RX Summ--Scope Reg LN Sur, added logic for RX Summ--Treatment Status = 1.</event> <event version="SE21-021-03" user="secristm" date="2021-03-04" ref="68594">Added logic for RX Summ--Scope Reg LN Sur for 2021+ diagnoses.</event> <event version="SE23-023-01" user="secristc" date="2023-03-02" ref="69097">Added logic for Reason No Radiation, updated edit name.</event> </history> </rule>