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

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

There is a newer version: 024-13
Show newest version
    <rule id="IFN6822" name="LDH Lab/Upper Limits/LDH Level, Melanoma Skin (NAACCR)" tag="N6822" java-path="lines.line" category="inter-field" depends="Year_of_Diagnosis">
            <expression><![CDATA[if (line.dateOfDiagnosisYear < '2023' || line.dateOfDiagnosisYear == null || line.schemaId != '00470' || line.schemaId == null || line.typeOfReportingSource == '7')
    return true

boolean ldhLevelBlankNa = line.ldhPretreatmentLevel == null || line.ldhPretreatmentLevel == '8'
boolean ldhUpperLimitsOfNormalBlankNa = line.ldhUpperLimitsOfNormal == null || line.ldhUpperLimitsOfNormal == 'XX8'
boolean ldhLabValueBlankNa = line.ldhPretreatmentLabValue == null || line.ldhPretreatmentLabValue == 'XXXXX.8'
if (ldhLevelBlankNa && ldhUpperLimitsOfNormalBlankNa && ldhLabValueBlankNa)
    return true

if (!ldhUpperLimitsOfNormalBlankNa) {
    boolean isLabValueValidInt = Functions.matches(line.ldhPretreatmentLabValue, /^\d{1,5}\.\d$/)
    boolean isUpperLimitValidInt = Functions.matches(line.ldhUpperLimitsOfNormal, /^\d\d\d$/) && line.ldhUpperLimitsOfNormal != '000'

    if (isLabValueValidInt && isUpperLimitValidInt) {
        Integer ldhLabValueInt = Functions.asInt(line.ldhPretreatmentLabValue.substring(0, line.ldhPretreatmentLabValue.length() - 2))
        Integer ldhUpperLimitInt = Functions.asInt(line.ldhUpperLimitsOfNormal)

        if (ldhLabValueInt <= ldhUpperLimitInt && line.ldhPretreatmentLevel != '0')
            return false
        if (ldhLabValueInt > ldhUpperLimitInt && line.ldhPretreatmentLevel != '1')
            return false
    }
}

if (line.ldhPretreatmentLabValue == 'XXXXX.1' && line.ldhPretreatmentLevel != '1')
    return false

return true]]></expression>
            <message>Conflict among LDH Lab Value, LDH Upper Limits of Normal, and LDH Level</message>
            <description><![CDATA[This edit verifies that LDH Lab Value, LDH Upper Limits of Normal, and LDH Level SSDIs are coded consistently with each other

1. The edit is skipped for any of the following conditions:
    a. Date of Diagnosis pre-2023, blank (unknown), or invalid.
    b. Schema ID is blank or not 00470.
    c. Type of Reporting Source = 7 (Death Certificate Only)
    d. LDH Lab Value and LDH Upper Limits of Normal and LDH Level are all blank or coded not applicable

2. If LDH Upper Limits of Normal is not blank and not = XX8

    a. If LDH Lab Value <= LDH Upper Limits of Normal,
        LDH Level must = 0 (normal)

    b. If LDH Lab Value > LDH Upper Limits of Normal
        LDH Level must = 1 (elevated

3. If LDH Lab Value = XXXXX.1 (100,000 U/L or greater)
    LDH Level must = 1 (elevated)]]]></description>
            <history>
                <event version="SE24-024-06" user="cooki" date="2024-07-19" ref="69507">Edit created.</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy