edits.seer.internal.rules.IFN6784.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="IFN6784" name="Surgery 2023, RX Date Surgery, Primary Site (NAACCR)" tag="N6784" java-path="lines.line" category="inter-field" depends="Year_of_Diagnosis"> <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2023' || line.schemaId == null) return true if (line.rxSummSurgPrimSite2023 == 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[1-8]|809)$/) //condition 1 boolean rxSummSurgPrimSiteCondition = line.rxSummSurgPrimSite2023 == 'A000' || line.rxSummSurgPrimSite2023 == 'A980' || line.rxSummSurgPrimSite2023 == 'B000' boolean rxSummScopeRegLnSurCondition = (line.rxSummScopeRegLnSur == '9' && siteCondition) || line.rxSummScopeRegLnSur == '1' || line.rxSummScopeRegLnSur == '0' if (rxSummSurgPrimSiteCondition && rxSummScopeRegLnSurCondition && line.rxSummSurgOthRegDis == '0') return rxDateIsBlank //condition 2 if (!rxDateIsBlank) return Functions.matches(line.rxSummSurgPrimSite2023, /^[AB]([1-8]\d\d|900)$/) || Functions.matches(line.rxSummScopeRegLnSur, /^[2-7]$/) || Functions.matches(line.rxSummSurgOthRegDis, /^[1-5]$/) 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 or less than 2023 2. Schema ID is blank 3. RX Summ--Surg Prim Site 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, 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 2023 = A000, B000 (none) or A980 (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 RX Summ--Scope Reg LN Sur = 0 or 1 3. RX Summ--Surg Oth Reg/Dis = 0 (none) 2. If RX Date Surgery is not blank, at least one of the following three conditions must be 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]]></description> <history> <event version="SE23-023-05" user="shearerw" date="2023-06-26" ref="69234">Edit created.</event> <event version="SE24-024-06" user="cooki" date="2024-06-28" ref="69489">Removed Schema 99999, C760 from logic and description.</event> </history> </rule>