edits.seer.internal.rules.IFN6785.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.
<rule id="IFN6785" name="Systemic RX, Surgery 2023, Systemic/Sur Seq (COC)" tag="N6785" java-path="lines.line" category="inter-field" depends="Year_of_Diagnosis"> <expression><![CDATA[if (line.rxSummSurgPrimSite2023 == null || line.rxSummScopeRegLnSur == null || line.rxSummSurgOthRegDis == null || line.rxSummBrm == null || line.rxSummChemo == null || line.rxSummHormone == null || line.rxSummTransplntEndocr == null || line.rxSummSystemicSurSeq == null || line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2023') return true boolean surgeryPerformed = Functions.matches(line.rxSummSurgPrimSite2023, /^[AB]([1-8]\d\d|900)$/) || Functions.matches(line.rxSummScopeRegLnSur, /^[2-7]$/) || Functions.matches(line.rxSummSurgOthRegDis, /^[1-5]$/) boolean therapyPerformed = line.rxSummBrm == '01' || Functions.matches(line.rxSummChemo, /^0[1-3]$/) || line.rxSummHormone == '01' || Functions.matches(line.rxSummTransplntEndocr, /(^[1-3]\d|40$)/) if (surgeryPerformed && therapyPerformed) return Functions.matches(line.rxSummSystemicSurSeq, /^[2-7]|9$/) boolean primarySiteCondition = Functions.matches(line.primarySite, /(^C(42[0134]|589|7[0127]\d|75[123]|76[1-8]|809)$)/) boolean scopeCondition = line.rxSummScopeRegLnSur == '0' || line.rxSummScopeRegLnSur == '1' || (line.rxSummScopeRegLnSur == '9' && primarySiteCondition) boolean surgeryNotPerformed = Functions.matches(line.rxSummSurgPrimSite2023, /(^[AB](000|990)$)/) && scopeCondition && line.rxSummSurgOthRegDis == '0' boolean surgeryAlsoNotPerformed = line.rxSummSurgPrimSite2023 == 'A980' && line.rxSummScopeRegLnSur == '9' && line.rxSummSurgOthRegDis == '0' boolean noTherapy = Functions.matches(line.rxSummBrm, /(^00|8[2-8]|99$)/) && Functions.matches(line.rxSummChemo, /(^00|8[2-8]|99$)/) && Functions.matches(line.rxSummHormone, /(^00|8[2-8]|99$)/) && Functions.matches(line.rxSummTransplntEndocr, /(^00|8[2-8]|99$)/) if (surgeryNotPerformed || surgeryAlsoNotPerformed || noTherapy) return line.rxSummSystemicSurSeq == '0' return true]]></expression> <message>Conflict among Systemic RX, Surgery, and Systemic Sur Seq</message> <description><![CDATA[This edit is skipped if any of the fields are blank. This edit is skipped for diagnosis date blank (unknown), invalid, or before 2023. 1. If surgery was performed AND if systemic therapy was given, then RX Summ--Systemic/Sur Seq must specify a sequence (codes 2-7, 9). A. Surgery is considered performed if ANY of the following three conditions are true: 1. RX Summ--Surg Prim Site 2023 = A100-A900, B100-B900 2. RX Summ--Scope Reg LN Sur = 2-7 3. RX Summ--Surg Oth Reg/Dis = 1-5 B. Systemic therapy is considered performed if ANY of the following four conditions are true: 1. RX Summ--BRM = 01 2. RX Summ--Chemo = 01-03 3. RX Summ--Hormone = 01 4. RX Summ--Transplnt/Endocr = 10-40 2. If surgery was not performed OR there was no systemic therapy, then RX Summ--Systemic/Sur Seq must = 0 (no systemic therapy and/or surgical procedures). A. Surgery is considered not performed if ALL of the following conditions are true: 1. RX Summ--Surg Prim Site 2023= A000, A990, B000, B990 2. RX Summ--Scope Reg LN Sur = 0, 1 RX Summ--Scope Reg LN Sur = 9 and the following is true: Primary Site = C420, C421, C423, C424, C589, C700-C709,C710-C729, C751-C753, C761-C768, C770-C779, C809 3. RX Summ--Surg Oth Reg = 0 B. Surgery is also considered not performed if ALL of the following conditions are true: 1. RX Summ--Surg Prim Site 2023 = A980 (coded for hematopoietic, ill-defined and unknown sites) 2. RX Summ--Scope Reg LN Sur: 9 3. RX Summ--Surg Oth Reg = 0 C. Systemic therapy is considered not performed if ALL of the following four conditions are true: 1. RX Summ--BRM = 00, 82-88, 99 2. RX Summ--Chemo = 00, 82-88, 99 3. RX Summ--Hormone = 00, 82-88, 99 4. RX Summ--Transplnt/Endocr = 00, 82-88, 99]]></description> <history> <event version="SE23-023-05" user="shearerw" date="2023-06-26" ref="69234">Edit created.</event> <event version="SE24-024-01" user="kirbyk" date="2024-02-14" ref="69350">Removed check for Primary Site C760 with Schema ID 99999.</event> </history> </rule>