Skip to content

QA Matching Diagnoses on an Encounter, Performed

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

Questions and Answers


Q&A - Matching Diagnoses on an Encounter, Performed

Question

What is the best practice for searching Encounter.diagnoses?

Answer

CQL has a feature that supports implicit conversion from a List<Code> to a Concept, and since there is an overload which takes a Concept, the following expression in QDM 5.3 is valid CQL:

  ["Encounter, Performed": "Inpatient Encounter"] Encounter
    where Encounter.diagnoses in "Atrial Fibrillation"

However, QDM guidance recommends avoiding the use of the Concept type in CQL, so the above pattern is not recommended. Instead, testing for diagnoses within an encounter should use the following approach:

  ["Encounter, Performed": "Inpatient Encounter"] Encounter
    where exists (Encounter.diagnoses Diagnosis where Diagnosis in "Atrial Fibrillation")

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