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 1.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
Official URL: http://hl7.org/fhir/uv/cql/Library/ParameterExample | Version: 1.1.0-cibuild | |||
Active as of 2024-06-10 | 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
depends-on | FHIR model information | http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1 |
depends-on | Library FHIRHelpers | http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1 |
depends-on | Code system LOINC | Logical Observation Identifiers, Names and Codes (LOINC) |
GlucoseThreshold | in | 0 | 1 | Quantity |
Patient | out | 0 | 1 | Patient |
Blood Glucose Observations | out | 0 | * | Observation |
Type: Patient (Patient) |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 2339-0: Glucose Bld-mCnc |
text/cql
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
Content not shown - (
application/elm+xml
, size = 36Kb )
Content not shown - (
application/elm+json
, size = 27Kb )