edits.seer.internal.rules.IFN7103.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="IFN7103" name="Gleason Patterns Pathological, Grade Pathological (SEER)" tag="N7103" java-path="lines.line" category="inter-field" depends="Year_of_Diagnosis"> <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2019' || line.schemaId != '00580' || line.typeOfReportingSource == '6') return true String gleason = line.gleasonPatternsPathological if (gleason == null || gleason == 'X8') return true if (line.gradePathological == null || Functions.matches(line.gradePathological, /^[ABCDE]$/)) return true Integer gradeClinInt = Functions.asInt(line.gradeClinical) Integer gradePathInt = Functions.asInt(line.gradePathological) if (gradeClinInt != null && gradePathInt != null && gradeClinInt >= gradePathInt && gradeClinInt != 9) return true Integer dolcYear = Functions.asInt(line.dateOfLastContactYear) Integer dolcMonth = Functions.asInt(line.dateOfLastContactMonth) Integer dolcDay = Functions.asInt(line.dateOfLastContactDay) Integer dxYear = Functions.asInt(line.dateOfDiagnosisYear) Integer dxMonth = Functions.asInt(line.dateOfDiagnosisMonth) Integer dxDay = Functions.asInt(line.dateOfDiagnosisDay) if (line.vitalStatus == '0' && (Boolean)((Closure)Context.compareDatesWithinMonths).call(dolcYear, dolcMonth, dolcDay, dxYear, dxMonth, dxDay, 5)) return true if (Functions.matches(gleason, /^[123][123]$/)) return line.gradePathological == '1' else if (gleason == '34') return line.gradePathological == '2' else if (gleason == '43') return line.gradePathological == '3' else if (gleason == '44' || gleason == '35' || gleason == '53') return line.gradePathological == '4' else if (gleason == '45' || gleason == '54' || gleason == '55') return line.gradePathological == '5' return true]]></expression> <message>Gleason Patterns Pathological and Grade Pathological conflict.</message> <description><![CDATA[This edit verifies that Grade Pathological is coded consistently with Gleason Patterns Pathological SSDI. 1. The edit is skipped for the following conditions: a. Date of Diagnosis before 2019, blank (unknown), or invalid. b. Schema ID is not 00580 c. Gleason Patterns Pathological is blank or not applicable. d. Grade Pathological is blank or = A, B, C, D, or E. e. Grade Clinical is numeric and >= Grade Pathological and Grade Clinical Not = 9. f. Type of Reporting Source = 6 g. Vital Status = 0 and Date of Last Contact within 5 months of Date of Diagnosis 2. If Gleason Patterns Pathological = 11, 12, 13, 21, 22, 23, 31, 32, or 33 Then Grade Pathological must = 1 3. If Gleason Patterns Pathological = 34 Then Grade Pathological must = 2 4. If Gleason Patterns Pathological = 43 Then Grade Pathological must = 3 5. If Gleason Patterns Pathological = 44, 35, or 53 Then Grade Pathological must = 4 6. If Gleason Patterns Pathological = 45, 54, or 55 Then Grade Pathological must = 5]]></description> <history> <event version="SE18-019-01" user="kirbyk" date="2019-04-05" ref="68155">Edit created.</event> <event version="SE18-019-03" user="beverung" date="2019-07-18" ref="68216">Edit modified to skip when grade clinical >= grade pathological and grade clinical != 9</event> <event version="SE24-024-06" user="beverung" date="2024-07-23" ref="69455">Updated edit name/id/tag and updated skip conditions.</event> </history> </rule>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy