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

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

There is a newer version: 024-13
Show newest version
        <rule id="IFN7039" name="Circumferential Resection Margin, Colon, RX Summ--Surgical Margins (NAACCR)" tag="N7039" java-path="lines.line" category="inter-field" depends="Year_of_Diagnosis">
            <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2024' || line.typeOfReportingSource == '7')
    return true
if (line.schemaId != '00200' || line.behaviorCodeIcdO3 == '2' || line.rxSummSurgicalMargins == null)
    return true
if (line.circumferentialResectionMargin == null || line.circumferentialResectionMargin == 'XX.8')
    return true

if (line.circumferentialResectionMargin == '0.0')
    if (!['0', '1', '2', '3'].contains(line.rxSummSurgicalMargins))
        return false

if (line.rxSummSurgicalMargins == '0')
    if (!Functions.matches(line.circumferentialResectionMargin, /^(\d\.\d|[1-9]\d\.\d|XX\.[0-79])$/))
        return false

if (line.rxSummSurgicalMargins == '7')
    if (!Functions.matches(line.circumferentialResectionMargin, /^XX\.[279]$/))
        return false

if (line.rxSummSurgicalMargins == '8')
    if (line.circumferentialResectionMargin != 'XX.7')
        return false

return true
]]></expression>
            <message>Conflict between RX Summ--Surgical Margins and Circumferential Resection Margin (CRM)</message>
            <description><![CDATA[This edit verifies that the Circumferential Resection Margin (CRM) SSDI is coded consistently with RX Summ--Surgical Margins.

1. The edit is skipped for the following conditions:
    a. Date of Diagnosis before 2024, blank (unknown), or invalid.
    b. Schema ID is not 00200
    c. Behavior Code = 2
    d. Circumferential Resection Margin (CRM) is blank or XX.8 (not applicable).
    e. RX Summ--Surgical Margins is blank
    f. Type of Reporting Source = 7 (Death Certificate Only)

2. If the Circumferential Resection Margin is coded 0.0 (positive circumferential resection margin),
    then RX Summ--Surgical Margins must be coded 0 (margin stated as negative), 1, 2, or 3 (residual tumor)

3. If RX Summ--Surgical Margins is coded 0 (negative margins)
    Circumferential Resection Margin must be coded 0.0-99.9, XX.0-XX.7, XX.9
    
4. If RX Summ--Surgical Margins is coded 7 (Margins not evaluable)
    Circumferential Resection Margin must be coded XX.2 (margins cannot be assessed), XX.7 (enough tissue available to assess margins),
    or XX.9 (Circumferential or radial resection margin not assessed or unknown if assessed)

5. If RX Summ--Surgical Margins is coded 8 (no primary site surgery)
    Circumferential Resection Margin must be coded XX.7 (no resection of primary site)
]]></description>
            <history>
                <event version="SE24-024-03" user="beverung" date="2024-03-12" ref="69438">Edit created.</event>
                <event version="SE24-024-06" user="shearerw" date="2024-06-21" ref="69492">Updated name and logic.</event>
                <event version="SE24-024-08" user="beverung" date="2024-08-20" ref="69529">Fix logic for RX Summ--Surgical Margins negative.</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy