edits.seer.internal.rules.IFN5021.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="IFN5021" name="Surgery 03-2022, RX Date Surgery, Primary Site (NAACCR)" tag="N5021" java-path="lines.line" category="inter-field" depends="Year_of_Diagnosis"> <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2018' || line.dateOfDiagnosisYear > '2022' || line.schemaId == null) return true if (line.rxSummSurgPrimSite == null || line.rxSummScopeRegLnSur == null || line.rxSummSurgOthRegDis == null) return true boolean rxDateIsBlank = line.rxDateSurgeryYear == null && line.rxDateSurgeryMonth == null && line.rxDateSurgeryDay == null boolean siteCondition = Functions.matches(line.primarySite, /^C(42[0134]|589|7[0127]\d|75[1-3]|76[0-8]|809)$/) //condition 1 boolean rxSummSurgPrimSiteCondition = line.rxSummSurgPrimSite == '00' || line.rxSummSurgPrimSite == '98' boolean rxSummScopeRegLnSurCondition = (line.rxSummScopeRegLnSur == '9' && (siteCondition || line.schemaId == '99999')) || (line.rxSummScopeRegLnSur == '1' && line.dateOfDiagnosisYear >= '2021') || line.rxSummScopeRegLnSur == '0' boolean rxSummSurgOthRegDisCondition = line.rxSummSurgOthRegDis == '0' if (rxSummSurgPrimSiteCondition && rxSummScopeRegLnSurCondition && rxSummSurgOthRegDisCondition) return rxDateIsBlank //condition 2 rxSummSurgPrimSiteCondition = Functions.matches(line.rxSummSurgPrimSite, /^[1-8]\d|90$/) boolean rxSummScopeRegLnSurIs2Condition = line.rxSummScopeRegLnSur == '2' && (line.dateOfDiagnosisYear >= '2021' || (line.dateOfDiagnosisYear >= '2018' && Functions.matches(line.regionalNodesExamined, /^0[1-9]|[1-8]\d|9[0-8]$/))) rxSummScopeRegLnSurCondition = Functions.matches(line.rxSummScopeRegLnSur, /^[3-7]$/) || rxSummScopeRegLnSurIs2Condition || (line.rxSummScopeRegLnSur == '1' && line.dateOfDiagnosisYear < '2021') rxSummSurgOthRegDisCondition = Functions.matches(line.rxSummSurgOthRegDis, /^[1-5]$/) if (!rxDateIsBlank) return rxSummSurgPrimSiteCondition || rxSummScopeRegLnSurCondition || rxSummSurgOthRegDisCondition return true]]></expression> <message>Conflict between treatment and treatment date</message> <description><![CDATA[This edit verifies that surgery fields, by Schema ID and/or Primary Site, are coded consistently with surgery date fields. This edit is skipped if any of the following conditions is true: 1. Date of Diagnosis is blank and less than 2018 or greater than 2022. 2. Schema ID is blank 3. RX Summ--Surg Prim Site 03-2022 is blank 4. RX Summ--Scope Reg LN Sur is blank 5. RX Summ--Surg Oth Reg/Dis is blank. This edit compares the three surgery code fields (RX Summ--Surg Prim Site 03-2022, RX Summ-- Scope Reg LN Sur, RX Summ--Surg Oth Reg/Dis) against the date of first surgical procedure (RX Date Surgery). If all of the three fields show that no surgery was performed, then the date must be blank. If RX date is coded, then one of the surgery fields must indicate that surgery was performed. The edit works as follows: 1. If surgery was not performed, then RX Date Surgery must be blank. Surgery is considered "not performed" if all of the following three conditions are true: 1. RX Summ--Surg Prim Site 03-2022 = 00 (none) or 98 (not applicable) 2. RX Summ--Scope Reg LN Sur = not applicable for the following: Primary Site code = C420, C421, C423, C424, C589, C700-C709, C710-C729, C751-C753, C761-C768, C770-C779, C809 Schema ID 99999, C760 RX Summ--Scope Reg LN Sur = 1 (for diagnosis date 2021+) RX Summ--Scope Reg LN Sur = 0 (none) for all other cases 3. RX Summ--Surg Oth Reg/Dis = 0 (none) 2. If RX Date Surgery is not blank, a surgery field must indicate surgery performed. Surgery is considered "performed" if any of the following three conditions are true: 1. RX Summ--Surg Prim Site 03-2022 = 10-90 2. RX Summ--Scope Reg LN Sur = 2 (only if Regional Nodes Examined = 01-98 for diagnosis date 2018-2020) RX Summ--Scope Reg LN Sur = 2 (for diagnosis date 2021+) 3-7 3. RX Summ--Surg Oth Reg/Dis = 1-5 NOTE: RX Summ--Scope Reg LN Sur = surgery not performed for diagnosis date 2021+. For prior years, RX Summ--Scope Reg LN Sur = 1 accepted as surgery if only code indicating surgery performed.]]></description> <history> <event version="SE21-021-09" user="beverung" date="2021-09-13" ref="68749">Edit created.</event> <event version="SE22-022-03" user="beverung" date="2022-04-12" ref="68940">Changed edit name and updated logic for 2022.</event> <event version="SE23-023-01" user="secristc" date="2023-01-26" ref="69083">Changed edit name and updated logic.</event> <event version="SE23-023-01" user="cooki" date="2023-03-30" ref="69227">Added missing logic for Scope Reg LN Sur = 1.</event> </history> </rule>