All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edits.seer.internal.rules.SEER_IR03B.xml Maven / Gradle / Ivy

There is a newer version: 024-13
Show newest version
        <rule id="SEER_IR03B" name="Age at Dx and Sequence Number 60 to 87 not Consistent for Patient (SEER IR03B)" tag="S024" java-path="lines" category="inter-record">
            <expression><![CDATA[List<Map> filteredLines = (List)((Closure)Context.SEER_IR03B_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 60 to 87) Inter-Record Error</message>
            <description><![CDATA[Records with sequence number 60-87 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-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 &apos;sort&apos; 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_IR03B_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>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy