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

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

There is a newer version: 024-13
Show newest version
        <rule id="IF13" name="Age, Birth Date, Date of Diagnosis (NAACCR IF13)" tag="N0025" java-path="lines.line" category="inter-field" depends="Age_at_Diagnosis,DateBirthEdit,DateDiagnosisEdit">
            <expression><![CDATA[Integer age = Functions.asInt(line.ageAtDiagnosis)
Integer monthBirth = Functions.asInt(line.dateOfBirthMonth)
Integer yearBirth = Functions.asInt(line.dateOfBirthYear)
Integer monthDx = Functions.asInt(line.dateOfDiagnosisMonth)
Integer yearDx = Functions.asInt(line.dateOfDiagnosisYear)

if (age == 999)
    return (line.dateOfDiagnosisYear == null || line.dateOfBirthYear == null)
if (age == 0 && (line.overRideAgeSiteMorph == '2' || line.overRideAgeSiteMorph == '3'))
   return true
if (line.dateOfDiagnosisYear == null || line.dateOfBirthYear == null)
    return age == 999
if (line.dateOfDiagnosisMonth == null || line.dateOfBirthMonth == null)
   return ((yearDx - yearBirth) == age || ((yearDx - yearBirth) - 1) == age)
if ((((((yearDx * 12) + monthDx) - ((yearBirth * 12) + monthBirth))) / 12).intValue() < 0)
   return false
if (monthDx == monthBirth &&
     (line.dateOfDiagnosisDay == null || line.dateOfBirthDay == null))
   return ((((((((yearDx * 12) + monthDx) - ((yearBirth * 12) + monthBirth))) / 12).intValue() - 1) == age) ||
      ((((((yearDx * 12) + monthDx) - ((yearBirth * 12) + monthBirth))) / 12).intValue() == age))
if (monthDx == monthBirth && line.dateOfDiagnosisDay < line.dateOfBirthDay)
   return ((((((yearDx * 12) + monthDx) - ((yearBirth * 12) + monthBirth))) / 12).intValue() - 1) == age

return (((((yearDx * 12) + monthDx) - ((yearBirth * 12) + monthBirth))) / 12).intValue() == age]]></expression>
            <message>Age, Birth Date and Date of Diagnosis conflict</message>
            <description><![CDATA[The purpose of this edit is to determine whether there is a conflict among Birth Date[240], Date of Diagnosis[390], and Age at diagnosis[230].

This edit is bypassed if the following inter-field edit flags have been triggered:
   1.  Year of Diagnosis[390] is not valid
   2.  Year of Birth[240] is not valid

If the Age at Diagnosis is 000 and the Over-ride Age/Site/Morph code is 2 or 3, no further checking is done.  Over-ride Age/Site/Morph may be set to 2 or 3 to indicate a case has been diagnosed in utero.  Over-ride Age/Site/Morph code '2' means "Reviewed:  Case was diagnosed in utero".  '3' means "Reviewed:  Conditions 1 and 2 both apply".

If the Age at Diagnosis[230] is coded as 999, then the Year of Birth[240] must be coded as blank and the Birth Date Flag must equal 12.

If either month of birth or month of diagnosis is blank, then a working age is computed as year of diagnosis - year of birth.  Otherwise the working age is computed as the actual age:
     ((year of diagnosis * 12 + month of diagnosis) - (year of birth * 12 + month of birth))/12

If the month of diagnosis or month of birth is blank, or if the months of diagnosis and birth are known and equal and the day of diagnosis or day of birth is blank, then Age at Diagnosis must equal the working age or the working age - 1.

If the month of diagnosis and birth are known and equal, and the day of diagnosis is earlier than the day of birth, then 1 is subtracted from the working age, and Age at Diagnosis must equal the new working age.

For all other cases, Age at Diagnosis must equal the working age.]]></description>
            <history>
                <event version="SE11-001-01" user="greend" date="1985-11-29">The dates of birth and diagnosis now include month and year (4 digit, includes century); age at diagnosis is now 3 digits and specifies actual age.</event>
                <event version="SE11-001-02" user="greend" date="1986-06-18">The field which computes age from date of birth and date of diagnosis was changed in order to retain its sign.</event>
                <event version="SE11-001-04" user="greend" date="1988-05-25">The computation of age was corrected when unknown months are present.  The testing of the computed age was modified so that computed age may never be greater than the input age.</event>
                <event version="SE11-001-22" user="greend" date="2008-01-10">Edit is skipped if Year of Birth [240] is blank.</event>
                <event version="SE11-001-22" user="greend" date="2008-01-21">This edit now uses Day of birth and Day of Diagnosis.</event>
                <event version="SE11-001-23" user="greend" date="2009-04-03">If the age at diagnosis is 000 and the Over-Ride Age/Site/Morph code is 2 or 3, no further checking is done.  Over-ride Age/Site/Morph may be set to 2 or 3 to indicate a case has been diagnosed in utero.</event>
                <event version="SE12-002-01" user="murphyr" date="2009-12-17">Added Birth Date Flag to edit.  If Age of Diagnosis is 999 then Birth Date Flag must equal 12.  9-filled dates no longer checked.</event>
                <event version="SE12-002-01" user="murphyr" date="2010-01-06">Edit no longer skipped if year of diagnosis or year of birth are blank.  If year of diagnosis or year of birth are blank then age must be 999.</event>
                <event version="SE12-003-03" user="murphyr" date="2011-02-10">Updated documentation.</event>
                <event version="SE14-011-01" user="murphyr" date="2013-11-25" ref="67053">Fixed edit to not fail if birth date is less than 12 months after diagnosis date.</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>
                <event version="SE24-024-04" user="kirbyk" date="2024-04-16" ref="69326">Removed several dependencies.</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy