Skip to content

QA Trying to Union Different Types

Darren Duncan edited this page Oct 12, 2017 · 1 revision

Questions and Answers


Q&A - Trying to Union Different Types

Question

VTE-2 (CMS190) Intensive Care Unit Venous Thromboembolism Prophylaxis: I am unable to package this measure in the MAT due to my Numerator and Denominator Exclusions are returning more than one thing. This feedback came from the MAT team, as I asked them first to help assist with figuring out why this measure will not package, and they stated we should reach out to you for assistance with the CQL to ensure the logic is returning the correct list type. This is an episode-of-care measure.

Answer

Here's your denominator exclusion:

  define "Denominator Exclusion":
    "Encounter LOS LT 2d"
    union "Procedures"
    union "ED Encounters with Comfort Measures"
    // The issue is with these two components of the union, 
    // they are returning lists of Intervention Comfort Measures
    // rather than lists of Encounters
    union "ICM with ICU Admission or Transfer During Encounter"
    union "ICM Anesthesia with ICU Encounter"

Looking at those definitions, the question is, how do the Intervention Comfort Measures relate to the encounter under consideration from the initial population? I don't see a tie to the encounter:

  define "ICM with ICU Admission or Transfer During Encounter":
    "Intervention Comfort Measures" I
      with "ICU Admission or Transfer During Encounter" D
        such that I.authorDatetime 1 day or less on or after D.relevantPeriod

  define "ICM with Procedure of Anesthesia":
    "Intervention Comfort Measures" I
      with ["Procedure, Performed": "General or Neuraxial Anesthesia"] D
        such that I.authorDatetime 1 day or less on or after D.relevantPeriod

What needs to happen is these need to be related to the encounter, most likely using a with clause, and then return those as part of the denominator exclusion.

Question

I was able to fix the Denominator Exclusion. But the Numerator is still not returning the same value. It looks like its the same issue, but from what I can see all the definitions have the encounter related to them.

Answer

For the numerator, it looks like the issue is that all the unions are for things like medications and assessments:

  define "Numerator":
    "VTEProphylaxis"
    union 
    ("Medication of Xa"
      intersect ("Diagnosis of Atrial Fib"
        union "Procedure of Hip Knee"))
    union
    "Reasons of Assessment_Lab_Med in ED"
    union
    "Reasons of Assessment_Lab_Med in Encounter"
    union
    "Reasons of Assessment_Lab_Med in Procedure"
    union
    ("NoMedicationVTEProphylaxisMedicalReason_in ED"
      intersect "NoDeviceVTEProphylaxisMedicalReason_In ED")
    union
    ("NoMedicationVTEProphylaxisMedicalReason_in Encounter"
      intersect "NoDeviceVTEProphylaxisMedicalReason_In Encounter")
    union
    ("NoMedicationVTEProphylaxisMedicalReason_in Procedure"
      intersect "NoDeviceVTEProphylaxisMedicalReason_in Procedure")
    union
    "NoVTEProphylaxisPatientRefusal_Timings"

So the question is how they relate to the encounter from the initial population? If it's just that they exist, then you can put the entire union in an exists:

  define "Numerator":
    "VTEProphylaxis" V
      where exists(
        ("Medication of Xa"
          intersect ("Diagnosis of Atrial Fib"
            union "Procedure of Hip Knee"))
        union
        "Reasons of Assessment_Lab_Med in ED"
        union
        "Reasons of Assessment_Lab_Med in Encounter"
        union
        "Reasons of Assessment_Lab_Med in Procedure"
        union
        ("NoMedicationVTEProphylaxisMedicalReason_in ED"
          intersect "NoDeviceVTEProphylaxisMedicalReason_In ED")
        union
        ("NoMedicationVTEProphylaxisMedicalReason_in Encounter"
          intersect "NoDeviceVTEProphylaxisMedicalReason_In Encounter")
        union
        ("NoMedicationVTEProphylaxisMedicalReason_in Procedure"
          intersect "NoDeviceVTEProphylaxisMedicalReason_in Procedure")
        union
        "NoVTEProphylaxisPatientRefusal_Timings"
      )

If there's a timing relationship, use a with ... such that:

  define "Numerator":
    "VTEProphylaxis" V
      with (
        ("Medication of Xa"
          intersect ("Diagnosis of Atrial Fib"
        ....))
      ) M
        such that M.authorDatetime during V.relevantPeriod

Wiki Index

Home

Authoring Patterns - QICore v4.1.1

Authoring Patterns - QICore v5.0.0

Authoring Patterns - QICore v6.0.0

Authoring Measures in CQL

Composite Measure Development

Cooking with CQL Examples

Cooking with CQL Q&A All Categories
Additional Q&A Examples

CQL 1.3 Impact Guidance

CQL Error Messages

Developers Introduction to CQL

Discussion Items

Example Measures

Formatting and Usage Topics

Formatting Conventions

Library Versioning

Negation in QDM

QDM Known Issues

Specific Occurrences

Specifying Population Criteria

Supplemental Data Elements

Terminology in CQL

Translator Options For Measure Development

Unions in CQL

Clone this wiki locally