edits.seer.internal.rules.SEER_IR07A.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_IR07A" name="Sequence Number 00 to 59 not Consistent for Patient (SEER IR07)" tag="S029" java-path="lines" category="inter-record"> <expression><![CDATA[List<Map> filteredLines = (List<Map>)((Closure)Context.SEER_IR07A_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 outerIndex = 0 while (outerIndex < filteredLines.size()) { int innerIndex = outerIndex + 1 if (filteredLines.get(outerIndex).sequenceNumberCentral == '00' || filteredLines.get(outerIndex).sequenceNumberCentral == '99') { Functions.forceFailureOnEntity(binding, filteredLines.get(outerIndex), 'line.sequenceNumberCentral') Functions.forceFailureOnEntity(binding, filteredLines.get(outerIndex == 0 ? 1 : 0), 'line.sequenceNumberCentral') return false } while (innerIndex < filteredLines.size()) { if (filteredLines.get(innerIndex).sequenceNumberCentral == filteredLines.get(outerIndex).sequenceNumberCentral) { Functions.forceFailureOnEntity(binding, filteredLines.get(innerIndex), 'line.sequenceNumberCentral') Functions.forceFailureOnEntity(binding, filteredLines.get(outerIndex), 'line.sequenceNumberCentral') return false } innerIndex += 1 } outerIndex += 1 } return true]]></expression> <message>Sequence Number 00 to 59 Inter-Record Error</message> <description><![CDATA[IR07A compares the records for a patient with sequence numbers 00-59 and 99. All Cervix in situ cases diagnosed between 1995 and 2003 were sequenced as code 98. These records are not reviewed by this edit. When there is more than one record for a patient within the range 00-59 or 99, no record may contain a 00 or 99 as the Sequence number--central [380]; and the sequence numbers must also be unique for each record of a patient.]]></description> <history> <event version="SE11-001-01" user="greend" date="1985-11-29">This subroutine has been changed because the sequence number is now a two digit number and can reflect the actual sequence of the records for the patient. It also checks that no sequence number is repeated for a person. There is no longer a need to check multiple uses of the value "8" for sequence number.</event> <event version="SE11-001-02" user="greend" date="1986-12-10">The array which checks to see that a sequence number is not repeated has been increased from 20 to 100.</event> <event version="SE11-001-19" user="greend" date="2005-05-26">Edit modified to ignore cases with sequence numbers 60-88.</event> <event version="SE11-001-20" user="greend" date="2006-07-19">Changed name from IR007 to IR007A.</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 tumors with sequence number 00-59 when this edit fails.</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-09" ref="67672">Now reporting only the two tumors that fail the edit; Moved filtering logic to context SEER_IR07A_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="SE16-016-09" user="kirbyk" date="2017-12-19" ref="67675">Now reporting 2 tumors when edit fails for 00/99 sequence number.</event> </history> </rule>