edits.seer.internal.rules.SEER_IR02.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.
The newest version!
<rule id="SEER_IR02" name="Birth Date not Consistent for Patient (SEER IR02)" tag="S022" java-path="lines" category="inter-record"> <expression><![CDATA[if (lines.isEmpty()) return true for (line in lines) { if (line.dateOfBirthYear != null && !Functions.between(line.dateOfBirthYear, 1800, Functions.getCurrentYear() ) ) return true if (line.dateOfBirthMonth != null && !(Functions.matches(line.dateOfBirthMonth, /^(0?[1-9]|1[0-2])$/) ) ) return true if (line.dateOfBirthDay != null && !(line.dateOfBirthDay ==~ /^(0?[1-9]|[12][0-9]|3[01]|\s\s)$/) ) return true } String day = lines[0].dateOfBirthDay String month = lines[0].dateOfBirthMonth String year = lines[0].dateOfBirthYear for (line in lines) { if (day != line.dateOfBirthDay || month != line.dateOfBirthMonth || year != line.dateOfBirthYear) { Functions.forceFailureOnEntity(binding, lines[0]) Functions.forceFailureOnEntity(binding, line) return false } } return true]]></expression> <message>Birth Date Inter-Record Error</message> <description><![CDATA[Birth Date[240] must be equal on all records. This edit is skipped if any record for the person has the "Date of Birth is not valid." inter-field edit flag triggered.]]></description> <history> <event version="SE11-001-22" user="greend" date="2008-01-21">Edit now uses Day of Birth.</event> <event version="SE14-011-04" user="depryf" date="2014-04-21" ref="67077">Now reporting all the tumors when this edit fails.</event> <event version="SE16-016-07" user="kirbyk" date="2017-11-09" ref="67672">Now reporting only the two tumors that fail the edit.</event> <event version="SE16-016-08" user="depryf" date="2017-11-22" ref="67674">Edit syntax updated to allow pre-compilation optimization; no change in behavior.</event> <event version="SE18-020-01" user="depryf" date="2020-02-04" ref="68281">Changed property names to align with NAACCR XML IDs.</event> </history> </rule>