edits.seer.internal.rules.SEER_IR12.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_IR12" name="Record Number not Consistent for Patient (SEER IR12)" tag="S036" java-path="lines" category="inter-record"> <expression><![CDATA[ if (lines.isEmpty() || lines.size() < 2) return true // Check to see if any records have the same Record Number Recode. Fail all records that have duplicates. Map<String, List> linesByRecordNumberRecode = [:].withDefault{[]} lines.each { line -> linesByRecordNumberRecode.get(line.recordNumberRecode) << line } Boolean containsDuplicates = false linesByRecordNumberRecode.each { recordNumberRecode, duplicates -> if (duplicates.size() > 1) { duplicates.each { line -> Functions.forceFailureOnEntity(binding, line) } containsDuplicates = true } } return !containsDuplicates ]]></expression> <message>Record Number Inter-Record Error.</message> <description><![CDATA[Record Number Recode [1775] must be unique.]]></description> <history> <event version="SE12-002-01" user="murphyr" date="2010-01-07">Edit created.</event> <event version="SE12-003-01" user="murphyr" date="2010-11-10">Changes the edit so it always returns true. There are issues with the records sort order and the blank months of Dx; the edits will be ignored until those issues are resolved.</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.</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="SE22-022-09" user="beverung" date="2022-06-24" ref="69012">Updated edit to use Record Number Recode instead of SEER Record Number.</event> <event version="SE22-022-10" user="beverung" date="2022-08-25" ref="69025">Updated edit to only check that Record Number Recode is unique. Removed logic to check for ascending order.</event> <event version="SE22-022-11" user="beverung" date="2022-09-09" ref="69028">Updated description to remove reference to increasing order.</event> </history> </rule>