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

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

There is a newer version: 024-13
Show newest version
        <rule id="IFN7104" name="Gleason Score Pathological, Grade Pathological (SEER)" tag="N7104" java-path="lines.line" category="inter-field" depends="Year_of_Diagnosis">
            <expression><![CDATA[if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2019' || line.schemaId != '00580' || line.typeOfReportingSource == '6')
    return true

String gleason = line.gleasonScorePathological
if (gleason == null || gleason == 'X8' || gleason == 'X9')
    return true
if (line.gradePathological == null || Functions.matches(line.gradePathological, /^[ABCD]$/))
    return true

Integer gradeClinInt = Functions.asInt(line.gradeClinical)
Integer gradePathInt = Functions.asInt(line.gradePathological)
if (gradeClinInt != null && gradePathInt != null && gradeClinInt >= gradePathInt && gradeClinInt != 9)
    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 (Functions.matches(gleason, /^0[1-6]$/))
    return line.gradePathological == '1'
else if (gleason == '07')
    return line.gradePathological == '2' || line.gradePathological == '3' || line.gradePathological == 'E'
else if (gleason == '08')
    return line.gradePathological == '4'
else if (gleason == '09' || gleason == '10')
    return line.gradePathological == '5'

return true]]></expression>
            <message>Gleason Score Pathological conflicts with Grade Pathological.</message>
            <description><![CDATA[This edit verifies that Grade Pathological is coded consistently with Gleason Score Pathological SSDI.

1. The edit is skipped for the following conditions:
   a. Date of Diagnosis before 2019, blank (unknown), or invalid.
   b. Schema ID is not 00580
   c. Gleason Score Pathological is blank, X8, or X9.
   d. Grade Pathological is blank or = A, B, C, or D.
   e. Grade Clinical is numeric and >= Grade Pathological and Grade Clinical Not = 9
   f. Type of Reporting Source = 6
   g. Vital Status = 0 and Date of Last Contact within 5 months of Date of Diagnosis

2. If Gleason Score Pathological = 1, 2, 3, 4, 5, or 6,
   Then Grade Pathological must = 1

3. If Gleason Score Pathological = 7
   Then Grade Pathological must = 2, 3 or E

4. If Gleason Score Pathological = 8
   Then Grade Pathological must = 4

5. If Gleason Score Pathological = 9 or 10
   Then Grade Pathological must = 5]]></description>
            <history>
                <event version="SE22-022-05" user="secristc" date="2022-05-04" ref="68938">Edit created.</event>
                <event version="SE24-024-06" user="beverung" date="2024-07-23" ref="69455">Updated edit name/id/tag and updated skip conditions.</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy