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

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

The newest version!
        <rule id="IFN6179" name="EOD Prostate Pathologic Extension, RX Summ--Surg Prim Site 03-2022 (SEER)" tag="N6179" java-path="lines.line" category="inter-field" depends="Year_of_Diagnosis">
            <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2021' || line.dateOfDiagnosisYear > '2022' || line.schemaId == null ||
    line.schemaId != '00580' || line.prostatePathologicalExtension == null || line.rxSummSurgPrimSite == null)
    return true
if (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.rxSummSurgPrimSite == '90' || line.rxSummSurgPrimSite == '99')
    return line.prostatePathologicalExtension == '900' || line.prostatePathologicalExtension == '950' || line.prostatePathologicalExtension == '999'

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

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

if (line.prostatePathologicalExtension == '900' || line.prostatePathologicalExtension == '950')
    return Functions.matches(line.rxSummSurgPrimSite, /^[012]\d|30|90|99$/)

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

1. The edit is skipped for the following conditions:
    a. Date of Diagnosis before 2021 or after 2022, 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 03-2022 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 03-2022 = 90 or 99 (surgery NOS or unknown if surgery)
    then EOD Prostate Pathologic Extension must = 900, 950, or 999 (unknown if radical prostatectomy performed)

    A. If RX Summ--Surg Prim Site 03-2022 = 50-80 (radical prostatectomy performed)
        then EOD Prostate Pathologic Extension must = 000-800, 999.

    B. If RX Summ--Surg Prim Site 03-2022 = 00-30 (radical prostatectomy not performed)
        then EOD Prostate Pathologic Extension must = 900 (no radical prostatectomy performed) or 950 (radical prostatectomy not first course therapy)

    C. If EOD Prostate Pathologic Extension = 900 or 950
        then RX Summ--Surg Prim Site 03-2022 must = 00-30, 90, or 99 (no radical prostatectomy performed)]]></description>
            <history>
                <event version="SE21-021-04" user="kirbyk" date="2021-04-14" ref="68638">Edit created.</event>
                <event version="SE22-022-01" user="beverung" date="2022-02-08" ref="68873">Updated edit for 2022.</event>
                <event version="SE22-022-17" user="beverung" date="2022-11-03" ref="69060">Added skip condition for Type of Reporting Source = 6 (Autopsy Only)</event>
                <event version="SE23-023-01" user="cooki" date="2023-01-25" ref="69105">Added 2022+ skip condition and 03-2022 labels for Surg Prim Site, updated edit name.</event>
                <event version="SE23-023-01" user="secristc" date="2023-02-23" ref="69195">Updated valid RX Summ-Surg Prim Site values for EOD Prostate Path Ext for DX year = 2021.</event>
                <event version="SE24-024-01" user="cooki" date="2024-03-13" ref="69335">Updated logic and description to V24.</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