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

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

The newest version!
        <rule id="DateTherapyEdit" name="Date Initial RX SEER (NAACCR)" tag="N0075" java-path="lines.line" category="inter-field" depends="Day_of_Initial_RX--SEER,Month_of_Initial_RX-SEER,Year_of_Diagnosis,Year_of_Initial_RX-SEER">
            <expression><![CDATA[Integer year = Functions.asInt(line.dateInitialRxSeerYear)
Integer month = Functions.asInt(line.dateInitialRxSeerMonth)
Integer day = Functions.asInt(line.dateInitialRxSeerDay)

Integer yearCur  = Functions.getCurrentYear()
Integer monthCur = Functions.getCurrentMonth()
Integer dayCur = Functions.getCurrentDay()

if (line.registryId == '0000001544' && line.dateOfDiagnosisYear < '2000')
    return true

if (line.dateInitialRxSeerYear == null)
   return (line.dateInitialRxSeerMonth == null && line.dateInitialRxSeerDay == null)

if ((line.dateInitialRxSeerMonth == null && line.dateInitialRxSeerDay != null) || (month > 12 || (line.dateInitialRxSeerMonth != null && month < 1)))
   return false

if (!Functions.between(year, 1930, yearCur))
    return false

if (line.dateInitialRxSeerMonth == null) //by now year fits and day is null if month is null
    return true

if (year == yearCur && month > monthCur)
    return false

if (line.dateInitialRxSeerDay == null) //by now year and month fit
    return true

if (year == yearCur && month == monthCur && day > dayCur)
    return false

Calendar cal = new GregorianCalendar(year, month - 1, 1)
return cal != null && day <= cal.getActualMaximum(Calendar.DAY_OF_MONTH)]]></expression>
            <message>Date of Init RX--SEER is not valid.</message>
            <description><![CDATA[Earliest year of diagnosis and current system date are determined by the user and entered as parameetes in the interface.

This edit is skipped for New Jersey cases diagnosed before 2000.

The Date of Therapy checks are performed in this order:

  A)  If the year is blank, month and day must also be blank.

  D)  Year of Therapy must be between 1930 and the current system year.

  B)  If the month is blank, the day must be blank.

  C)  If day of Therapy is blank, the year of Therapy and
      month of Therapy can not be greater than the current system
      year/month.

  E)  If day is known, then entire Date of Therapy is verified.  The
      date must be a valid date (leap years checked) and must be less than
      or equal to the current system date.]]></description>
            <history>
                <event version="SE11-001-02" user="greend" date="1986-07-10">A correction was made allowing month to be equal to zero only when year is equal to zero.</event>
                <event version="SE11-001-17" user="greend" date="2003-09-22">Edit modified to skip cases from New Jersey diagnosed before 2000.</event>
                <event version="SE11-001-22" user="greend" date="2008-01-21">Edit now uses Day of initial RX--SEER [1260].</event>
                <event version="SE12-002-01" user="murphyr" date="2009-12-03">0-filled and 9 filled no longer allowed.</event>
                <event version="SE12-002-01" user="murphyr" date="2009-12-23">Fixed edit to correctly check for blank string instead of blank int.</event>
                <event version="SE12-003-03" user="murphyr" date="2011-02-10">Updated documentation.</event>
                <event version="SE13-009-01" user="murphyr" date="2012-12-20" ref="66776">Updated edit name.</event>
                <event version="SE16-015-01" user="kirbyk" date="2016-06-20" ref="67425">Fixed documentation.</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="SE22-022-13" user="kirbyk" date="2022-10-18" ref="69045">Fixing edit behavior for future dates.</event>
                <event version="SE24-024-06" user="kirbyk" date="2024-07-22" ref="69326">Removed some edit dependencies.</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy