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

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

There is a newer version: 024-13
Show newest version
        <rule id="IFN6753" name="EOD Prostate Pathologic Extension, RX Summ--Surg Prim Site 2023 (SEER)" tag="N6753" java-path="lines.line" category="inter-field" depends="Year_of_Diagnosis">
            <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2023' || line.schemaId == null ||
    line.schemaId != '00580' || line.prostatePathologicalExtension == null || line.rxSummSurgPrimSite2023 == null || line.typeOfReportingSource == '6' || line.typeOfReportingSource == '7')
    return true

Integer dolcYear = Functions.asInt(line.dateOfLastContactYear)
Integer dolcMonth = Functions.asInt(line.dateOfLastContactMonth)
Integer dolcDay = Functions.asInt(line.dateOfLastContactDay)
Integer dxYear = Functions.asInt(line.dateOfDiagnosisYear)
Integer dxMonth = Functions.asInt(line.dateOfDiagnosisMonth)
Integer dxDay = Functions.asInt(line.dateOfDiagnosisDay)

if (line.vitalStatus == '0' && (Boolean)((Closure)Context.compareDatesWithinMonths).call(dolcYear, dolcMonth, dolcDay, dxYear, dxMonth, dxDay, 5))
    return true

if (line.rxSummSurgPrimSite2023 == 'A900' || line.rxSummSurgPrimSite2023 == 'A990')
    return line.prostatePathologicalExtension == '900' || line.prostatePathologicalExtension == '950' || line.prostatePathologicalExtension == '999'

if (Functions.matches(line.rxSummSurgPrimSite2023, /^A[5-7]\d\d|A800$/))
        return Functions.matches(line.prostatePathologicalExtension, /^[0-7]\d\d|800|999$/)

if (Functions.matches(line.rxSummSurgPrimSite2023, /^A[012]\d\d|A300$/))
        return line.prostatePathologicalExtension == '900' || line.prostatePathologicalExtension == '950'

if (line.prostatePathologicalExtension == '900' || line.prostatePathologicalExtension == '950')
        return Functions.matches(line.rxSummSurgPrimSite2023, /^A[012]\d\d|A300|A900|A990$/)

return true]]></expression>
            <message>Conflict between RX Summ--Surg Prim Site 2023 and EOD Prostate Pathologic Extension</message>
            <description><![CDATA[This edit verifies that EOD Prostate Pathologic Extension is coded consistently
with RX Summ--Surg Prim Site 2023 for Schema ID 00580, Prostate.

1. The edit is skipped for the following conditions:
    a. Date of Diagnosis before 2023, blank (unknown), or invalid.
    b. Schema ID is blank or not 00580
    c. EOD Prostate Pathlogic Extension is blank
    d. RX Summ--Surg Prim Site 2023 is blank
    e. Type of Reporting Source is 6 (Autopsy Only) or 7 (Death Certificate Only)
    f. Vital Status = 0 and Date of Last Contact within 5 months of Date of Diagnosis

2. If RX Summ--Surg Prim Site 2023 = A900 or A990 (surgery NOS or unknown if surgery)
    then EOD Prostate Pathologic Extension must = 900, 950, or 999 (unknown if
    prostatectomy performed)

3. If RX Summ--Surg Prim Site 2023 = A500-A800 (prostatectomy performed)
    then EOD Prostate Pathologic Extension must = 000-800, 999.

4. If RX Summ--Surg Prim Site 2023 = A000-A300 (prostatectomy not performed)
    then EOD Prostate Pathologic Extension must = 900 (no prostatectomy performed)
   or 950 (prostatectomy not first course therapy)

5. If EOD Prostate Pathologic Extension = 900 or 950
    then RX Summ--Surg Prim Site 2023 must = A000-A300, A900, or A990 (no
    prostatectomy performed)]]></description>
            <history>
                <event version="SE23-023-05" user="cooki" date="2023-06-21" ref="69232">Edit created.</event>
                <event version="SE23-023-06" user="cooki" date="2023-07-31" ref="69296">Added skip condition for Type of Reporting Source = 6.</event>
                <event version="SE24-024-06" user="cooki" date="2024-07-18" ref="69494">Added skip condition f.</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy