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

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

There is a newer version: 024-13
Show newest version
        <rule id="IF93" name="Race 1, Race 2, Race 3, Race 4, Race 5 (SEER IF93)" tag="N0628" java-path="lines.line" category="inter-field">
            <expression><![CDATA[if (line.race2 == null && line.race3 == null && line.race4 == null && line.race5 == null)
    return true
/* if any race code (2 to 5) is blank, then the remaining must be blank */
if (line.race2 == null && (line.race3 != null || line.race4 != null || line.race5 != null))
    return false
if (line.race3 == null && (line.race4 != null || line.race5 != null))
    return false
if (line.race4 == null && line.race5 != null)
    return false

/* if a race variable equals 99, then all must equal 99 */
if (line.race1 == '99' || line.race2 == '99' || line.race3 == '99' || line.race4 == '99' || line.race5 == '99')
    return (line.race1 == '99' && line.race2 == '99' && line.race3 == '99' && line.race4 == '99' && line.race5 == '99')

/* for patient.race codes 2 thru 5, if one equals 88 then all remaining must equal 88 */
if (line.race2 == '88' && (line.race3 != '88' || line.race4 != '88' || line.race5 != '88'))
    return false
if (line.race3 == '88' && (line.race4 != '88' || line.race5 != '88'))
   return false
if (line.race4 == '88' && line.race5 != '88')
   return false

/* for patient.race codes 1 thru 5, patient.race codes other than space, 88 or 99 must not be duplicated
   No '99's can get here, so we do NOT need to handle that in the code */
if (line.race1 != null && line.race1 != '88' && (line.race1 == line.race2 || line.race1 == line.race3 || line.race1 == line.race4 || line.race1 == line.race5))
   return false

if (line.race2 != null && line.race2 != '88' && (line.race2 == line.race1 || line.race2 == line.race3 || line.race2 == line.race4 || line.race2 == line.race5))
   return false

if (line.race3 != null && line.race3 != '88' && (line.race3 == line.race1 || line.race3 == line.race2 || line.race3 == line.race4 || line.race3 == line.race5))
   return false

if (line.race4 != null && line.race4 != '88' && (line.race4 == line.race1 || line.race4 == line.race2 || line.race4 == line.race3 || line.race4 == line.race5))
   return false

if (line.race5 != null && line.race5 != '88' && (line.race5 == line.race1 || line.race5 == line.race2 || line.race5 == line.race3 || line.race5 == line.race4))
   return false

/* if any patient.race code is 01, then the next one must be 88 or blank */
/* Since duplicate patient.races codes can NOT be used, you do not have to check for the occurrence of 01, 01, 99, etc. */
if (line.race1 == '01' && line.race2 != null && line.race2 != '88')
   return false

if (line.race2 == '01' && line.race3 != null && line.race3 != '88')
   return false

if (line.race3 == '01' && line.race4 != null && line.race4 != '88')
   return false

if (line.race4 == '01' && line.race5 != null && line.race5 != '88')
   return false

return true]]></expression>
            <message>Conflict among Race 1 through Race 5</message>
            <description><![CDATA[This edit is skipped if Race 2[161], Race 3[162], Race 4[163], and Race 5[164] are blank.


Race 1[160], Race 2[161], Race 3[162], Race 4[163], and Race 5[164] are compared as follows:

If any race codes (for Race 2[161], 3[162], 4[163], and 5[164]) = spaces, all subsequent race codes must = spaces.

If more than the Race 1[160] code is entered, if any race = 99 (unknown), all race codes (Race 1[160], 2[161], 3[162], 4[163], and 5[164]) must = 99.

If more than the Race 1[160] code is entered, if any race codes (for Race 2[161], 3[162], 4[163], and 5[164]) = 88 (no further race documented), then all subsequent race codes must also = 88.

A particular race code (other than spaces, 88, or 99) must not occurr more than once.

If a patient has a race code of 01 (white), it must be the last recorded race for that patient.  That is, the subsequent race codes must be 88 or blank.]]></description>
            <history>
                <event version="SE11-001-19" user="greend" date="2005-03-03">Changed edit name to match NAACCR version.  Combined this edit with previous edits IF94 &amp; IF95.</event>
                <event version="SE11-001-21" user="greend" date="2007-02-01">The follwing logic was added to the edit: If a patient has a race code of 01 (white), it must be the last recorded race for that patient.</event>
                <event version="SE24-024-06" user="kirbyk" date="2024-07-22" ref="69326">Removed edit dependencies.</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy