edits.seer.internal.rules.SEER_IR03A.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="SEER_IR03A" name="Age at DX and Sequence Number 00 to 59 not Consistent for Patient (SEER IR03A)" tag="S023" java-path="lines" category="inter-record"> <expression><![CDATA[List<Map> filteredLines = (List)((Closure)Context.SEER_IR03A_Filter).call(lines) if (filteredLines.size() < 2) return true // sort tumors by sequence number (null seq go to the end of the list) filteredLines.sort(true, (Comparator)Context.seqComparator) int index = 1 Map currLine = filteredLines.get(0) Integer currAge = Functions.asInt(currLine.ageAtDiagnosis) while (index < filteredLines.size()) { Map line = filteredLines.get(index) Integer nextAge = Functions.asInt(line.ageAtDiagnosis) if (currAge > nextAge) { Functions.forceFailureOnEntity(binding, currLine, 'line.sequenceNumberCentral', 'line.ageAtDiagnosis') Functions.forceFailureOnEntity(binding, line, 'line.sequenceNumberCentral', 'line.ageAtDiagnosis') return false } currLine = line currAge = nextAge index += 1 } return true]]></expression> <message>Age at Diagnosis (Seq Number 00 to 59) Inter-Record Error</message> <description><![CDATA[Records with sequence number 00-59 for a patient are sorted into ascending sequence using Sequence number--central[380] as the key. The Age at diagnosis[230] on each succeeding record must be greater than or equal to the Age at diagnosis[230] on the previous record. Records with Age at diagnosis[230] equal to 999 are skipped.]]></description> <history> <event version="SE11-001-19" user="greend" date="2005-05-26">Edit modified to ignore cases with sequence numbers greater than 59.</event> <event version="SE11-001-20" user="greend" date="2006-07-19">Changed edit name from IR003 to IR003A.</event> <event version="SE11-001-22" user="greend" date="2007-12-30">Records with age at diagnosis = 999 are skipped.</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="SE15-013-01" user="kirbyk" date="2015-01-26" ref="67112">Reports only the two tumors that fail the edit.</event> <event version="SE15-014-01" user="depryf" date="2015-06-25" ref="67203">Fixed syntax of the Groovy 'sort' method, they added a boolean parameter to it.</event> <event version="SE16-016-07" user="kirbyk" date="2017-11-16" ref="67672">Moved filtering logic to context SEER_IR03A_Filter.</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>