edits.seer.internal.rules.SEER_IR07B.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_IR07B" name="Sequence Number 60 to 88 not Consistent for Patient (SEER IR07)" tag="S030" java-path="lines" category="inter-record"> <expression><![CDATA[List<Map> filteredLines = (List<Map>)((Closure)Context.SEER_IR07B_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 == '60' || filteredLines.get(outerIndex).sequenceNumberCentral == '88') { 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 60 to 88 Inter-Record Error</message> <description><![CDATA[IR07B compares the records for a patient with sequence numbers 60-88. When there is more than one record for a patient within the range 60-88, no record may contain a 60 or 88 as the Sequence number--central [380]; and the sequence numbers must also be unique for each record of a patient.]]></description> <history> <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 60-88 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_IR07B_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 60/88 sequence number.</event> </history> </rule>