Using CQL With FHIR
2.1.0-cibuild - STU 2 International flag

Using CQL With FHIR, published by HL7 International / Clinical Decision Support. This guide is not an authorized publication; it is the continuous build for version 2.1.0-cibuild built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/cql-ig/ and changes regularly. See the Directory of published versions

Library: Parameter Example (Experimental)

Official URL: http://hl7.org/fhir/uv/cql/Library/ParameterExample Version: 2.1.0-cibuild
Standards status: Informative Computable Name: ParameterExample
Other Identifiers: OID:2.16.840.1.113883.4.642.40.37.28.5

Example CQL library with a parameter defined, used to illustrate calling the $cql and Library/$evaluate operations with libraries that have parameters

Metadata
Title Parameter Example
Version 2.1.0-cibuild
Identifier urn:oid:2.16.840.1.113883.4.642.40.37.28.5
Experimental true
Jurisdiction World
Steward (Publisher) HL7 International / Clinical Decision Support
Description

Example CQL library with a parameter defined, used to illustrate calling the $cql and Library/$evaluate operations with libraries that have parameters

Type logic-library from http://terminology.hl7.org/CodeSystem/library-type
Dependency Description: Library FHIRHelpers
Resource: FHIR Helpers version: 4.0.1
Canonical URL: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1
Dependency Description: Code System LOINC
Resource: LOINC
Canonical URL: http://loinc.org
Data Requirement Type: Observation
Profile(s): Observation
Code Filter(s):
Path: code
Code(s): LOINC: 2339-0 (Glucose Bld-mCnc)
Parameters
Name Use Card. Type Documentation
GlucoseThreshold In 0..1 Quantity
Patient Out 0..1 Patient
Blood Glucose Observations Out 0..* Observation
Library Content
CQL Content
library ParameterExample

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1'

codesystem LOINC: 'http://loinc.org'
code "Blood Glucose": '2339-0' from LOINC display 'Glucose Bld-mCnc'

parameter GlucoseThreshold Quantity

context Patient

define "Blood Glucose Observations":
  [Observation: "Blood Glucose"] BG
    where BG.value > GlucoseThreshold
ELM JSON Content
Encoded data 
Generated using version 0.5.4 of the sample-content-ig Liquid templates