edits.seer.internal.rules.IFN5016.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="IFN5016" name="RX Summ--Surg Prim Site 03-2022, Primary Site, 2018 (SEER)" tag="N5016" java-path="lines.line" category="inter-field" depends="Primary_Site,Year_of_Diagnosis"> <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2018' || line.dateOfDiagnosisYear > '2022' || line.primarySite == null || line.rxSummSurgPrimSite == null) return true boolean primarySiteCondition = Functions.matches(line.primarySite, /^C42[0134]|C76[0-8]|C809$/) boolean histologyCondition = Functions.matches(line.histologicTypeIcdO3, /^9(7(27|32|4[129]|6[1-9]|[789]\d)|8(0\d|2[06]|3[1-4]|[4-9]\d)|9([0-8]\d|9[0-3]))$/) if (!primarySiteCondition && histologyCondition && line.dateOfDiagnosisYear <= '2021') return true if (line.typeOfReportingSource == '7' && line.rxSummSurgPrimSite == '99') return true if (primarySiteCondition) return line.rxSummSurgPrimSite == '98' Integer siteInt = Functions.asInt(line.primarySite.substring(1, 4)) Map<Integer, Integer> schemaIdMap = (Map<Integer, Integer>)Context.IFN5016_Primary_Site_GroupCode_Table Integer groupCode = schemaIdMap.get(siteInt) if (groupCode != null) { if (groupCode == 30 && line.rxSummSurgPrimSite == '41' && !line.primarySite.startsWith('C69')) return false Map<Integer, List<String>> groupCodeMap = line.dateOfDiagnosisYear > '2021' ? (Map<Integer, List<String>>)Context.IFN5016_GroupCode_Table_22 : (Map<Integer, List<String>>)Context.IFN5016_GroupCode_Table_18 if (groupCodeMap.containsKey(groupCode)) return groupCodeMap.get(groupCode).contains(line.rxSummSurgPrimSite) } return false]]></expression> <message>Conflict among RX Summ--Surg Prim Site 03-2022, Primary Site, and Schema ID.</message> <description><![CDATA[This edit verifies that RX Summ--Surg Prim Site 03-2022 is coded appropriately by Primary Site. 1. This edit is skipped for any of the following: a. Diagnosis date before 2018 or after 2022, blank (unknown), or invalid. b. Primary Site is blank c. RX Summ--Surg Prim Site 03-2022 is blank d. Histology = 9727, 9732, 9741-9742, 9749, 9761-9809, 9820, 9826, 9831-9834, 9840-9993, diagnosis date = 2018-2021, and primary site not = C420, C421, C423, C424, C760-C768, C809. 1. This edit checks valid surgery codes by Primary Site code. The valid RX Summ--Surg Prim Site 03-2022 codes are specified in the SEER Program Coding Manual for 2021. 2. If Type of Reporting Source = 7 (Death Certificate Only), RX Summ--Surg Prim Site 03-2022 may = 99 for any site. 3. If Primary Site group is All Other Sites (group 30 in the table used for this edit) and RX Summ--Surg Prim Site 03-2022 = 41 (enucleation for eye surgery only), then Primary Site must = C690-C699 (multiple possible Schema IDs). 4. Surgery codes for Primary Site C420, C421, C423, C424, C760-C768, C809, must = 98. 5. Surgery codes for all other Primary Site codes must = codes as specified in the SEER Program Coding Manual.]]></description> <history> <event version="SE18-019-02" user="kirbyk" date="2019-05-02" ref="68154">Edit created.</event> <event version="SE18-019-03" user="kirbyk" date="2019-08-05" ref="68212">Updated valid codes for schema IDs 00821, 00822, 00830.</event> <event version="SE18-019-07" user="beverung" date="2019-10-25" ref="68265">Updated valid codes for schema IDs 00760 and 00770.</event> <event version="SE18-020-02" user="beverung" date="2020-03-27" ref="68313">Added C637-C639 to table for schema 00421 code 30.</event> <event version="SE18-020-05" user="kirbyk" date="2020-08-05" ref="68453">Updated DX year condition; added histology conditions.</event> <event version="SE21-021-03" user="smithm" date="2021-03-05" ref="68584">Add logic for 2021+ cases.</event> <event version="SE21-021-04" user="kirbyk" date="2021-04-16" ref="68646">Updated edit tables for 2021+ cases.</event> <event version="SE21-021-04" user="kirbyk" date="2021-05-12" ref="68656">Updated valid values for 2019-2020 cases.</event> <event version="SE22-022-01" user="beverung" date="2022-01-20" ref="68897">Update edit name to match new NAACCR translated edit.</event> <event version="SE22-022-01" user="beverung" date="2022-03-10" ref="68917">Update logic for 2022.</event> <event version="SE22-022-02" user="kirbyk" date="2022-03-18" ref="68918">Added Primary Sites C740-C749 to the edit table for code 30.</event> <event version="SE22-022-05" user="beverung" date="2022-05-19" ref="68994">Added skip condition for Primary Site, Histology, and DX Year.</event> <event version="SE23-023-01" user="secristc" date="2023-01-24" ref="69093">Add new skip condition for DX year > 2022.</event> <event version="SE23-023-02" user="cooki" date="2023-05-03" ref="69267">Updated description for step 1.</event> </history> </rule>