edits.seer.internal.rules.IFN3037.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="IFN3037" name="Gleason Patterns/Score, Clin/Path (NAACCR)" tag="N3037" java-path="lines.line" category="inter-field" depends="Year_of_Diagnosis"> <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2019' || line.schemaId != '00580') return true String scorePath = line.gleasonScorePathological String scoreClin = line.gleasonScoreClinical String patternsPath = line.gleasonPatternsPathological String patternsClin = line.gleasonPatternsClinical if ((scoreClin == null || scoreClin == 'X8') && (scorePath == null || scorePath == 'X8') && (patternsClin == null || patternsClin == 'X8') && (patternsPath == null || patternsPath == 'X8')) return true if (scoreClin != null && scoreClin != 'X8') { if (patternsClin == '11' && scoreClin != '02') return false else if ((patternsClin == '12' || patternsClin == '21') && scoreClin != '03') return false else if (['13', '22', '31'].contains(patternsClin) && scoreClin != '04') return false else if (['14', '23', '32', '41'].contains(patternsClin) && scoreClin != '05') return false else if (['15', '24', '33', '42', '51'].contains(patternsClin) && scoreClin != '06') return false else if (['25', '34', '43', '52'].contains(patternsClin) && scoreClin != '07') return false else if (['35', '44', '53'].contains(patternsClin) && scoreClin != '08') return false else if ((patternsClin == '45' || patternsClin == '54') && scoreClin != '09') return false else if (patternsClin == '55' && scoreClin != '10') return false else if (patternsClin == 'X7' && scoreClin != 'X7') return false } if (scorePath != null && scorePath != 'X8') { if (patternsPath == '11' && scorePath != '02') return false else if ((patternsPath == '12' || patternsPath == '21') && scorePath != '03') return false else if (['13', '22', '31'].contains(patternsPath) && scorePath != '04') return false else if (['14', '23', '32', '41'].contains(patternsPath) && scorePath != '05') return false else if (['15', '24', '33', '42', '51'].contains(patternsPath) && scorePath != '06') return false else if (['25', '34', '43', '52'].contains(patternsPath) && scorePath != '07') return false else if (['35', '44', '53'].contains(patternsPath) && scorePath != '08') return false else if ((patternsPath == '45' || patternsPath == '54') && scorePath != '09') return false else if (patternsPath == '55' && scorePath != '10') return false else if (patternsPath == 'X7' && scorePath != 'X7') return false } return true]]></expression> <message>Gleason Patterns and Gleason Score conflict.</message> <description><![CDATA[This edit verifies that the Gleason Patterns Clinical and Pathological and Gleason Score Clinical and Pathological SSDIs are coded consistently. 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 Clinical, Gleason Score Clinical, Gleason Patterns Pathological, and Gleason Score Pathological are all blank or not applicable 2. If Gleason Score Clinical is not blank and not X8: If Gleason Patterns Clinical = 11, Gleason Score Clinical must = 02 If Gleason Patterns Clinical = 12 or 21, Gleason Score Clinical must = 03 If Gleason Patterns Clinical = 13, 22, 31, Gleason Score Clinical must = 04 If Gleason Patterns Clinical = 14, 23, 32, 41, Gleason Score Clinical must = 05 If Gleason Patterns Clinical = 15, 24, 33, 42, 51, Gleason Score Clinical must = 06 If Gleason Patterns Clinical = 25, 34, 43, 52, Gleason Score Clinical must = 07 If Gleason Patterns Clinical = 35, 44, 53, Gleason Score Clinical must = 08 If Gleason Patterns Clinical = 45, 54, Gleason Score Clinical must = 09 If Gleason Patterns Clinical = 55, Gleason Score Clinical must = 10 If Gleason Patterns Clinical = X7, Gleason Score Clinical must = X7 3. If Gleason Score Pathological is not blank and not X8: If Gleason Patterns Pathological = 11, Gleason Score Pathological must = 02 If Gleason Patterns Pathological = 12 or 21, Gleason Score Pathological must = 03 If Gleason Patterns Pathological = 13, 22, 31, Gleason Score Pathological must = 04 If Gleason Patterns Pathological = 14, 23, 32, 41, Gleason Score Pathological must = 05 If Gleason Patterns Pathological = 15, 24, 33, 42, 51, Gleason Score Pathological must = 06 If Gleason Patterns Pathological = 25, 34, 43, 52, Gleason Score Pathological must = 07 If Gleason Patterns Pathological = 35, 44, 53, Gleason Score Pathological must = 08 If Gleason Patterns Pathological = 45, 54, Gleason Score Pathological must = 09 If Gleason Patterns Pathological = 55, Gleason Score Pathological must = 10 If Gleason Patterns Pathological = X7, Gleason Score Pathological must = X7]]></description> <history> <event version="SE22-022-05" user="secristc" date="2022-05-04" ref="68938">Edit created.</event> <event version="SE22-022-06" user="secristc" date="2022-05-25" ref="69002">Updated error message.</event> </history> </rule>