QA Give Two Results For One Exam Using Components - cqframework/CQL-Formatting-and-Usage-Wiki GitHub Wiki

Questions and Answers


Q&A - Give Two Results For One Exam Using Components

Question

For CMS167 / CQL eMeasure ID CMS21, the numerator logic has to have two pieces of information as a result of the macular exam: 1. Level of Severity of Retinopathy; 2. Macular Edema Present/Absent. Unable to add multiple results, please advise.

Answer

According to the QDM specification, there can only be a single result. To accomplish what you would like, you could use "Components" instead. You can have multiple components associated with a Diagnostic study and code the result for each component as well.

Question

We repackaged and uploaded CMS167 per the Office Hours discussion today and the numerator is still not passing. Adjusting for the new component values in Bonnie, both "Macular Edema Findings Absent" and "Macular Edema Findings Present" are highlighted which should not be the case. Furthermore, the definition still hasn't been met.

Answer

This logic of yours looks good:

  component.code in "Macular Exam"
    and component.result in "Level of Severity of Retinopathy Findings"

The rest of the logic in the statement doesn't look quite right to me:

  and ( component.result in "Macular Edema Findings Absent"
    or component.result in "Macular Edema Findings Present"
  )

This is looking for that same component to now have a different result. I believe for your intent, you want to be looking at a second component. Maybe the logic would work with something along these lines:

  (Study.components component1
    where component1.code in "Macular Exam"
      and component1.result in "Level of Severity of Retinopathy Findings")
  and 
  (Study.components component2
    where component2.code in "Macular Exam"
      and (component2.result in "Macular Edema Findings Absent"
        or component2.result in "Macular Edema Findings Present")
  )