edits.seer.internal.rules.IFN6775.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="IFN6775" name="RX Summ--Surg Prim Site 2023, Primary Site (SEER)" tag="N6775" java-path="lines.line" category="inter-field" depends="Primary_Site,Year_of_Diagnosis"> <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2023' || line.primarySite == null || line.rxSummSurgPrimSite2023 == null) return true if (line.typeOfReportingSource == '7') { if (line.rxSummSurgPrimSite2023 == 'B990' && Functions.matches(line.primarySite, /^C44\d$/)) return true if (line.rxSummSurgPrimSite2023 == 'A990' && !Functions.matches(line.primarySite, /^C44\d$/)) return true } if (Functions.matches(line.primarySite, /^C(42[0134]|76[0-8]|809)$/)) return line.rxSummSurgPrimSite2023 == 'A980' Integer siteInt = Functions.asInt(line.primarySite.substring(1, 4)) Map<Integer, Integer> schemaIdMap = (Map<Integer, Integer>)Context.IFN6775_Primary_Site_GroupCode_Table Integer groupCode = schemaIdMap.get(siteInt) if (groupCode != null) { if (groupCode == 30 && line.rxSummSurgPrimSite2023 == 'A410') return line.primarySite.startsWith('C69') if (groupCode == 6 && line.rxSummSurgPrimSite2023 == 'B330' && line.dateOfDiagnosisYear >= '2024') return line.primarySite == 'C181' if (line.rxSummSurgPrimSite2023.charAt(0) == 'A' && groupCode != 17) { if (!([6, 11, 13, 18, 27].contains(groupCode) && line.dateOfDiagnosisYear >= '2024')) { Map<Integer, List<String>> groupCodeMap = (Map<Integer, List<String>>)Context.IFN6775_GroupCode_Table_23A if (groupCodeMap.containsKey(groupCode)) return groupCodeMap.get(groupCode).contains(line.rxSummSurgPrimSite2023) } } else if (line.rxSummSurgPrimSite2023.charAt(0) == 'B' && (groupCode == 17 || line.dateOfDiagnosisYear >= '2024')) { Map<Integer, List<String>> groupCodeMap = (Map<Integer, List<String>>)Context.IFN6775_GroupCode_Table_23B if (groupCodeMap.containsKey(groupCode)) return groupCodeMap.get(groupCode).contains(line.rxSummSurgPrimSite2023) } } return false]]></expression> <message>RX Summ--Surg Prim Site 2023 not valid for Primary Site for DX year</message> <description><![CDATA[This edit verifies that RX Summ--Surg Prim Site 2023 is coded appropriately by Primary Site. 1. This edit is skipped for any of the following: a. Diagnosis date before 2023, blank (unknown), or invalid. b. Primary Site is blank c. RX Summ--Surg Prim Site 2023 is blank 1. This edit checks valid surgery codes by Primary Site code. The valid RX Summ--Surg Prim Site 2023 codes are specified in the SEER Program Coding Manual. The surgery codes are identified by sitegroup codes 01-30 in the EW table SURG23. Primary Site codes are mapped to the sitegroup codes in the EW table SCHEMASURG19 through 2022. Primary Site codes are mapped to the sitegroup codes in the EW table SURGSITEGROUP23 for 2023+diagnoses. This table distinguishes between A and B surgery codes for primary site by year, including first and last year that A codes are used and the first year that B codes are used. 2. If Type of Reporting Source = 7 (Death Certificate Only), RX Summ--Surg Prim Site 2023 may = B990 for any skin site (C440-C449) or A990 for any other 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 2023 = A410 (enucleation for eye surgery only), then Primary Site must = C690-C699 (multiple possible Schema IDs). 4. If Primary Site group is Colon (group 06 in the table used for this edit), RX Summ--Surg Prim Site 2023 = B330(Appendectomy for appendiceal primaries only, includes incidental findings), and year of diagnosis is 2024+, then Primary Site must = C181 (Appendix) 5. Surgery codes for Primary Site C420, C421, C423, C424, C760-C768, C809, must = A980. 6. Surgery codes for all other Primary Site codes must = codes as specified in the SEER Program Coding Manual.]]></description> <history> <event version="SE23-023-05" user="shearerw" date="2023-06-21" ref="69236">Edit created.</event> <event version="SE24-024-01" user="shearerw" date="2024-03-08" ref="69414">Add logic for colon primary site group.</event> <event version="SE24-024-06" user="shearerw" date="2024-06-24" ref="69473">Add surgery codes to breast primary site group.</event> </history> </rule>