-
Notifications
You must be signed in to change notification settings - Fork 25
Cooking with CQL Q&A: General CQL
cnguyenn4 edited this page May 12, 2022
·
13 revisions
Each Q&A has the Cooking with CQL session number and date. For the most current and accurate information, please check the CQL Qs&As for a more recent answer to your question.
$cql operation and test case representation/packaging: Where can I locate the example used in the discussion of $cql operation and test case representation/packaging? (Session 57 - 9/16/21)
- Find the examples used in the discussion of $cql operation and test case representation/packaging on GitHub (https://github.com/WorldHealthOrganization/smart-anc/tree/master/input/tests/library/ANCDT01/charity-with-danger-signs).
CQL vs FHIRv4.0 nested structures: Is the structure of Clinical Quality Language (CQL) in a similar format to the Fast Healthcare Interoperability Resources® (FHIR®) 4.0 nested structure? (Session 53 - 4/22/21)
- Yes. The FHIR model information for CQL follows the same structure as in the FHIR documentation. The code, using FHIR version '4.0.1', tells the translator to bring FHIR into scope.
Additionally, the translator has built-in support for several versions of FHIR and the Quality Data Model (QDM) and now has support for dynamic loading of model information.
Databases in CQL: How do we actually use CQL against a database to generate results? Is this just another way to express measure functions, or does it run somewhere? (Session 25 - 5/31/18)
- CQL is designed to enable the description and distribution of eCQMs, but it also can be a basis for evaluation. There are at least two open source engine implementations of CQL that will actually evaluate the measures and supporting logic.
Double quotes in Clinical Quality Language 1.5 Library: In the Clinical Quality Language 1.5 library, if you use double quotes for identifiers, can you pull in a value set using double quotes? (Session 63 - 4/28/22)
- Yes, a value set can be referenced using a double-quoted identifier, for example, the "Office Visit" value set.
define "Qualifying Encounters":
( [Encounter: "Office Visit"]
union [Encounter: "Preventive Care Services - Established Office Visit, 18 and Up"]
union [Encounter: "Preventive Care Services-Initial Office Visit, 18 and Up"]
union [Encounter: "Home Healthcare Services"]
union [Encounter: "Telephone Visits"]
union [Encounter: "Online Assessments"]
) ValidEncounter
where ValidEncounter.status = 'finished'
and ValidEncounter.period during "Measurement Period"
Fast Healthcare Interoperability Resources® (FHIR®) encounter in a JAVA implementation: In a JAVA implementation, when a __retrieve__ expression is performed on a Fast Healthcare Interoperability Resources® (FHIR®) encounter, does the __retrieve__ expression return a FHIR object, or is the object transformed into a tuple, and is the alias a tuple type? (Session 63 - 4/28/22)
- In the JAVA implementation, data is physically represented as JAVA objects. The core engine defines interfaces for dealing with data access, terminology, and library loading, and the implementation of the interface is responsible for providing the actual data in response to a retrieve. In this case, a HAPI FHIR client is used, so the object is an instance of a HAPI FHIR Encounter class. Clinical Quality Language (CQL) supports both class and tuple types (aka anonymous types). The result of a retrieve is typed as a class, but class types are generally compatible with tuple types with the same structure, so most operations can be performed on either. One exception is the type testing operations, where is and as will only work with the actual type. Note also that using the return clause to shape the result of a query will typically result in a tuple type as well.
IG Refresh tooling: In the IG Refresh tooling, when tracking patients that are inpatients in the hospital and have outpatient visits, can a quality measure reference data that would be expected to be present in different systems across both those visits? (Session 56 - 7/29/21)
- Measure specifications do not specify the location of the data or what system the data comes from, although eCQM guidance indicates that the data come from an Electronic Health Record. Current reporting processes typically report from a single data store, though that store may itself be an aggregate such as an HIE. Digital Quality Measures explicitly recognize that data for a measure may come from various sources, including EHRs, Clinical Data Repositories, Health Information Exchanges, and even Personal Health Records and other patient feeds. As an exchange standard, FHIR supports the description of data across all of these servers by using web URLs to reference resources. Note that some expressions used to trace references within FHIR CQL assume that the reference’s logical ID is on the same server., which is a known gap. Approaches are being added to CQL used in a FHIR context to address this issue.
Authoring Patterns - QICore v4.1.1
Authoring Patterns - QICore v5.0.0
Authoring Patterns - QICore v6.0.0
Cooking with CQL Q&A All Categories
Additional Q&A Examples
Developers Introduction to CQL
Specifying Population Criteria