Using CQL with FHIR
2.0.0-ballot - STU2Ballot 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.0.0-ballot 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

Example Parameters: Example Type Mapping Evaluation Result Parameters

Generated Narrative: Parameters cql-typemappingexampleresult

Parameters

Patient

Patient/example

Generated Narrative: Patient example

Jim Chalmers Male, DoB: 1974-12-25 ( Medical record number (use: usual, period: 2001-05-06 --> (ongoing)))


Active:trueDeceased:false
Marital Status:Married
Contact Detail
  • ph: (03) 5555 6473(Work)
  • ph: (03) 3410 5613(Mobile)
  • ph: (03) 5555 8834(Old)
  • 534 Erewhon St PeasantVille, Utah 84414(home)
Next-of-Kin:
  • Bénédicte du Marché (Female)
  • 534 Erewhon St PleasantVille VT 3999 (home)
  • +33 (237) 998327
  • Valid Period:2012 --> (ongoing)
CQLBooleanExampletrue
CQLCodeExampleCQL IG Example Code System example-code: Example Code
CQLCodeSystemExampleCQL IG Example Code System
CQLConceptExampleExample Code
CQLDateExample2024-01-01
CQLDateTimeExample2024-01-01 10:30:00+0000
CQLDecimalExample10.0
CQLLongExample10
CQLIntegerExample10
CQLQuantityExample10 mg (Details: UCUM codemg = 'mg')
CQLRatioExample5 mg (Details: UCUM codemg = 'mg')/10 mg (Details: UCUM codemg = 'mg')
CQLStringExampleJohn
CQLTimeExample10:30:00
CQLValueSetExampleExample Specific health concern(s) Codes
CQLVocabularyExamplehttp://example.org/test/npe-preventer
CQLDateIntervalExample2024-01-01 --> 2024-01-31
CQLDateTimeIntervalExample2024-01-01 10:30:00+0000 --> 2024-01-31 10:30:00+0000
CQLTimeIntervalExample
 low10:30:00
 high11:30:00
CQLIntegerIntervalExample5-10
CQLQuantityIntervalExample5-10
CQLListExample1
CQLListExample2
CQLListExample3
CQLListExample4
CQLListExample5
CQLTupleExample
 X1
 Y1
CQLChoiceListExample1
CQLChoiceListExample1.0
CQLTupleListExample
 X1
 Y1
CQLTupleListExample
 X1
 Y2
CQLTupleListExample
 X1
 Y3
CQLComplexTupleExample
 id1
 namePatrick
 address
  street123 Spinning Ave
  cityDayton
  stateOH
CQLComplexTupleListExample
 id1
 namePatrick
 address
  street123 Spinning Ave
  cityDayton
  stateOH
CQLEmptyListExampleIs Empty List: true
CQLListListExample
 element1
 element2
 element3
 element4
 element5
CQLListListExample
 element1
 element2
 element3
 element4
 element5
FHIRBooleanExampletrue
FHIRStringExampleChalmers
FHIRQuantityExample76.0 mg/dL
FHIRPeriodExample1974-12-25 --> (ongoing)
FHIRRangeExample40.0-109.0 mg/dL
FHIRObservationExample

Observation/blood-glucose

Generated Narrative: Observation blood-glucose

status: Final

category: Laboratory

code: Glucose Bld-mCnc

subject: Amy Shaw

effective: 2005-07-05

value: 76.0 mg/dL

ReferenceRanges

-LowHighAppliesTo
*40.0 mg/dL (Details: UCUM codemg/dL = 'mg/dL')109.0 mg/dL (Details: UCUM codemg/dL = 'mg/dL')Normal Range
FHIRObservationListExample

Observation/blood-glucose

Generated Narrative: Observation blood-glucose

status: Final

category: Laboratory

code: Glucose Bld-mCnc

subject: Amy Shaw

effective: 2005-07-05

value: 76.0 mg/dL

ReferenceRanges

-LowHighAppliesTo
*40.0 mg/dL (Details: UCUM codemg/dL = 'mg/dL')109.0 mg/dL (Details: UCUM codemg/dL = 'mg/dL')Normal Range
FHIRObservationListExample

Observation/blood-pressure

Generated Narrative: Observation blood-pressure

status: Final

category: Vital Signs

code: Blood pressure systolic and diastolic

subject: Amy Shaw

encounter: GP Visit

effective: 1999-07-02

component

code: Systolic blood pressure

value: 109 mmHg (Details: UCUM codemm[Hg] = 'mm[Hg]')

component

code: Diastolic blood pressure

value: 44 mmHg (Details: UCUM codemm[Hg] = 'mm[Hg]')

FHIRObservationListExample

Observation/bmi

Generated Narrative: Observation bmi

status: Final

category: Vital Signs

code: BMI

subject: Amy Shaw

encounter: GP Visit

effective: 1999-07-02

value: 16.2 kg/m2 (Details: UCUM codekg/m2 = 'kg/m2')

FHIRObservationEmptyListExampleIs Empty List: true