This page is part of the Using CQL with FHIR Implementation Guide (v1.0.0: STU1) based on FHIR (HL7® FHIR® Standard) R4. This is the current published version. For a full list of available versions, see the Directory of published versions
<Parameters xmlns="http://hl7.org/fhir">
<id value="cql-typemappingexampleresult"/>
<meta>
<profile
value="http://hl7.org/fhir/uv/cql/StructureDefinition/cql-evaluationresult"/>
</meta>
<parameter>
<name value="Patient"/>
<resource>
<Patient>
<id value="example"/>
<identifier>
<use value="usual"/>
<type>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/v2-0203"/>
<code value="MR"/>
</coding>
</type>
<system value="urn:oid:1.2.36.146.595.217.0.1"/>
<value value="12345"/>
<period>
<start value="2001-05-06"/>
</period>
<assigner>
<display value="Acme Healthcare"/>
</assigner>
</identifier>
<active value="true"/>
<name>
<use value="official"/>
<family value="Chalmers"/>
<given value="Peter"/>
<given value="James"/>
</name>
<name>
<use value="usual"/>
<family value="Chalmers"/>
<given value="Jim"/>
</name>
<name>
<use value="maiden"/>
<family value="Windsor"/>
<given value="Peter"/>
<given value="James"/>
<period>
<end value="2002"/>
</period>
</name>
<telecom>
<system value="phone"/>
<value value="(03) 5555 6473"/>
<use value="work"/>
<rank value="1"/>
</telecom>
<telecom>
<system value="phone"/>
<value value="(03) 3410 5613"/>
<use value="mobile"/>
<rank value="2"/>
</telecom>
<telecom>
<system value="phone"/>
<value value="(03) 5555 8834"/>
<use value="old"/>
<period>
<end value="2014"/>
</period>
</telecom>
<gender value="male"/>
<birthDate value="1974-12-25">
<extension
url="http://hl7.org/fhir/StructureDefinition/patient-birthTime">
<valueDateTime value="1974-12-25T14:35:45-05:00"/>
</extension>
</birthDate>
<deceasedBoolean value="false"/>
<address>
<use value="home"/>
<type value="both"/>
<text value="534 Erewhon St PeasantVille, Utah 84414"/>
<line value="534 Erewhon St"/>
<city value="PleasantVille"/>
<district value="Rainbow"/>
<state value="UT"/>
<postalCode value="84414"/>
<period>
<start value="1974-12-25"/>
</period>
</address>
<maritalStatus>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/v3-MaritalStatus"/>
<code value="M"/>
</coding>
</maritalStatus>
<contact>
<relationship>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/v2-0131"/>
<code value="N"/>
</coding>
</relationship>
<name>
<family value="du Marché">
<extension
url="http://hl7.org/fhir/StructureDefinition/humanname-own-prefix">
<valueString value="VV"/>
</extension>
</family>
<given value="Bénédicte"/>
</name>
<telecom>
<system value="phone"/>
<value value="+33 (237) 998327"/>
</telecom>
<address>
<use value="home"/>
<type value="both"/>
<line value="534 Erewhon St"/>
<city value="PleasantVille"/>
<district value="Rainbow"/>
<state value="VT"/>
<postalCode value="3999"/>
<period>
<start value="1974-12-25"/>
</period>
</address>
<gender value="female"/>
<period>
<start value="2012"/>
</period>
</contact>
</Patient>
</resource>
</parameter>
<parameter>
<name value="CQLBooleanExample"/>
<valueBoolean value="true"/>
</parameter>
<parameter>
<name value="CQLCodeExample"/>
<valueCoding>
<system value="http://hl7.org/fhir/uv/cql/CodeSystem/example"/>
<code value="example-code"/>
</valueCoding>
</parameter>
<parameter>
<name value="CQLCodeSystemExample"/>
<valueCanonical value="http://hl7.org/fhir/uv/cql/CodeSystem/example"/>
</parameter>
<parameter>
<name value="CQLConceptExample"/>
<valueCodeableConcept>
<coding>
<system value="http://hl7.org/fhir/uv/cql/CodeSystem/example"/>
<code value="example-code"/>
</coding>
</valueCodeableConcept>
</parameter>
<parameter>
<name value="CQLDateExample"/>
<valueDate value="2024-01-01"/>
</parameter>
<parameter>
<name value="CQLDateTimeExample"/>
<valueDateTime value="2024-01-01T10:30:00Z"/>
</parameter>
<parameter>
<name value="CQLDecimalExample"/>
<valueDecimal value="10.0"/>
</parameter>
<parameter>
<extension url="http://hl7.org/fhir/StructureDefinition/cqf-cqlType">
<valueString value="System.Long"/>
</extension>
<name value="CQLLongExample"/>
<valueInteger value="10"/>
</parameter>
<parameter>
<name value="CQLIntegerExample"/>
<valueInteger value="10"/>
</parameter>
<parameter>
<name value="CQLQuantityExample"/>
<valueQuantity>
<value value="10"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</valueQuantity>
</parameter>
<parameter>
<name value="CQLRatioExample"/>
<valueRatio>
<numerator>
<value value="5"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</numerator>
<denominator>
<value value="10"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</denominator>
</valueRatio>
</parameter>
<parameter>
<name value="CQLStringExample"/>
<valueString value="John"/>
</parameter>
<parameter>
<name value="CQLTimeExample"/>
<valueTime value="10:30:00"/>
</parameter>
<parameter>
<name value="CQLValueSetExample"/>
<valueCanonical
value="http://hl7.org/fhir/uv/cql/ValueSet/shareable-example"/>
</parameter>
<parameter>
<extension url="http://hl7.org/fhir/StructureDefinition/cqf-cqlType">
<valueString value="System.Vocabulary"/>
</extension>
<name value="CQLVocabularyExample"/>
<valueCanonical value="http://example.org/test/npe-preventer">
<extension
url="http://hl7.org/fhir/StructureDefinition/data-absent-reason">
<valueCode value="unknown"/>
</extension>
</valueCanonical>
</parameter>
<parameter>
<extension url="http://hl7.org/fhir/StructureDefinition/cqf-cqlType">
<valueString value="Interval<System.Date>"/>
</extension>
<name value="CQLDateIntervalExample"/>
<valuePeriod>
<start value="2024-01-01"/>
<end value="2024-01-31"/>
</valuePeriod>
</parameter>
<parameter>
<name value="CQLDateTimeIntervalExample"/>
<valuePeriod>
<start value="2024-01-01T10:30:00Z"/>
<end value="2024-01-31T10:30:00Z"/>
</valuePeriod>
</parameter>
<parameter>
<extension url="http://hl7.org/fhir/StructureDefinition/cqf-cqlType">
<valueString value="Interval<System.Time>"/>
</extension>
<name value="CQLTimeIntervalExample"/>
<part>
<name value="low"/>
<valueTime value="10:30:00"/>
</part>
<part>
<name value="high"/>
<valueTime value="11:30:00"/>
</part>
</parameter>
<parameter>
<extension url="http://hl7.org/fhir/StructureDefinition/cqf-cqlType">
<valueString value="Interval<System.Integer>"/>
</extension>
<name value="CQLIntegerIntervalExample"/>
<valueRange>
<low>
<value value="5"/>
</low>
<high>
<value value="10"/>
</high>
</valueRange>
</parameter>
<parameter>
<name value="CQLQuantityIntervalExample"/>
<valueRange>
<low>
<value value="5"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</low>
<high>
<value value="10"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</high>
</valueRange>
</parameter>
<parameter>
<name value="CQLListExample"/>
<valueInteger value="1"/>
</parameter>
<parameter>
<name value="CQLListExample"/>
<valueInteger value="2"/>
</parameter>
<parameter>
<name value="CQLListExample"/>
<valueInteger value="3"/>
</parameter>
<parameter>
<name value="CQLListExample"/>
<valueInteger value="4"/>
</parameter>
<parameter>
<name value="CQLListExample"/>
<valueInteger value="5"/>
</parameter>
<parameter>
<name value="CQLTupleExample"/>
<part>
<name value="X"/>
<valueInteger value="1"/>
</part>
<part>
<name value="Y"/>
<valueInteger value="1"/>
</part>
</parameter>
<parameter>
<extension url="http://hl7.org/fhir/StructureDefinition/cqf-cqlType">
<valueString
value="List<Choice<System.Integer,System.Decimal>>"/>
</extension>
<name value="CQLChoiceListExample"/>
<valueInteger value="1"/>
</parameter>
<parameter>
<name value="CQLChoiceListExample"/>
<valueDecimal value="1.0"/>
</parameter>
<parameter>
<name value="CQLTupleListExample"/>
<part>
<name value="X"/>
<valueInteger value="1"/>
</part>
<part>
<name value="Y"/>
<valueInteger value="1"/>
</part>
</parameter>
<parameter>
<name value="CQLTupleListExample"/>
<part>
<name value="X"/>
<valueInteger value="1"/>
</part>
<part>
<name value="Y"/>
<valueInteger value="2"/>
</part>
</parameter>
<parameter>
<name value="CQLTupleListExample"/>
<part>
<name value="X"/>
<valueInteger value="1"/>
</part>
<part>
<name value="Y"/>
<valueInteger value="3"/>
</part>
</parameter>
<parameter>
<extension url="http://hl7.org/fhir/StructureDefinition/cqf-cqlType">
<valueString
value="Tuple{id:System.Integer,name:System.String,address:List<Tuple{street:System.String,city:System.String,state:System.String}>}"/>
</extension>
<name value="CQLComplexTupleExample"/>
<part>
<name value="id"/>
<valueInteger value="1"/>
</part>
<part>
<name value="name"/>
<valueString value="Patrick"/>
</part>
<part>
<name value="address"/>
<part>
<name value="street"/>
<valueString value="123 Spinning Ave"/>
</part>
<part>
<name value="city"/>
<valueString value="Dayton"/>
</part>
<part>
<name value="state"/>
<valueString value="OH"/>
</part>
</part>
</parameter>
<parameter>
<extension url="http://hl7.org/fhir/StructureDefinition/cqf-cqlType">
<valueString
value="List<Tuple{id:System.Integer,name:System.String,address:List<Tuple{street:System.String,city:System.String,state:System.String}>}>"/>
</extension>
<name value="CQLComplexTupleListExample"/>
<part>
<name value="id"/>
<valueInteger value="1"/>
</part>
<part>
<name value="name"/>
<valueString value="Patrick"/>
</part>
<part>
<name value="address"/>
<part>
<name value="street"/>
<valueString value="123 Spinning Ave"/>
</part>
<part>
<name value="city"/>
<valueString value="Dayton"/>
</part>
<part>
<name value="state"/>
<valueString value="OH"/>
</part>
</part>
</parameter>
<parameter>
<extension url="http://hl7.org/fhir/StructureDefinition/cqf-cqlType">
<valueString
value="List<Tuple{id:System.Integer,name:System.String,address:List<Tuple{street:System.String,city:System.String,state:System.String}>}>"/>
</extension>
<name value="CQLEmptyListExample"/>
<valueBoolean>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-isEmptyList">
<valueBoolean value="true"/>
</extension>
</valueBoolean>
</parameter>
<parameter>
<name value="FHIRBooleanExample"/>
<valueBoolean value="true"/>
</parameter>
<parameter>
<name value="FHIRStringExample"/>
<valueString value="Chalmers"/>
</parameter>
<parameter>
<name value="FHIRQuantityExample"/>
<valueQuantity>
<value value="76.0"/>
<unit value="mg/dL"/>
<system value="http://unitsofmeasure.org"/>
</valueQuantity>
</parameter>
<parameter>
<name value="FHIRPeriodExample"/>
<valuePeriod>
<start value="1974-12-25"/>
</valuePeriod>
</parameter>
<parameter>
<name value="FHIRRangeExample"/>
<valueRange>
<low>
<value value="40.0"/>
<unit value="mg/dL"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg/dL"/>
</low>
<high>
<value value="109.0"/>
<unit value="mg/dL"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg/dL"/>
</high>
</valueRange>
</parameter>
<parameter>
<name value="FHIRObservationExample"/>
<resource>
<Observation>
<id value="blood-glucose"/>
<status value="final"/>
<category>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/observation-category"/>
<code value="laboratory"/>
<display value="Laboratory"/>
</coding>
<text value="Laboratory"/>
</category>
<code>
<coding>
<system value="http://loinc.org"/>
<code value="2339-0"/>
<display value="Glucose Bld-mCnc"/>
</coding>
<text value="Glucose Bld-mCnc"/>
</code>
<subject>🔗
<reference value="Patient/example"/>
<display value="Amy Shaw"/>
</subject>
<effectiveDateTime value="2005-07-05"/>
<valueQuantity>
<value value="76.0"/>
<unit value="mg/dL"/>
<system value="http://unitsofmeasure.org"/>
</valueQuantity>
<referenceRange>
<low>
<value value="40.0"/>
<unit value="mg/dL"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg/dL"/>
</low>
<high>
<value value="109.0"/>
<unit value="mg/dL"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg/dL"/>
</high>
<appliesTo>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/referencerange-meaning"/>
<code value="normal"/>
<display value="Normal Range"/>
</coding>
<text value="Normal Range"/>
</appliesTo>
</referenceRange>
</Observation>
</resource>
</parameter>
<parameter>
<name value="FHIRObservationListExample"/>
<resource>
<Observation>
<id value="blood-glucose"/>
<status value="final"/>
<category>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/observation-category"/>
<code value="laboratory"/>
<display value="Laboratory"/>
</coding>
<text value="Laboratory"/>
</category>
<code>
<coding>
<system value="http://loinc.org"/>
<code value="2339-0"/>
<display value="Glucose Bld-mCnc"/>
</coding>
<text value="Glucose Bld-mCnc"/>
</code>
<subject>🔗
<reference value="Patient/example"/>
<display value="Amy Shaw"/>
</subject>
<effectiveDateTime value="2005-07-05"/>
<valueQuantity>
<value value="76.0"/>
<unit value="mg/dL"/>
<system value="http://unitsofmeasure.org"/>
</valueQuantity>
<referenceRange>
<low>
<value value="40.0"/>
<unit value="mg/dL"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg/dL"/>
</low>
<high>
<value value="109.0"/>
<unit value="mg/dL"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg/dL"/>
</high>
<appliesTo>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/referencerange-meaning"/>
<code value="normal"/>
<display value="Normal Range"/>
</coding>
<text value="Normal Range"/>
</appliesTo>
</referenceRange>
</Observation>
</resource>
</parameter>
<parameter>
<name value="FHIRObservationListExample"/>
<resource>
<Observation>
<id value="blood-pressure"/>
<status value="final"/>
<category>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/observation-category"/>
<code value="vital-signs"/>
<display value="Vital Signs"/>
</coding>
<text value="Vital Signs"/>
</category>
<code>
<coding>
<system value="http://loinc.org"/>
<code value="85354-9"/>
<display value="Blood pressure panel with all children optional"/>
</coding>
<text value="Blood pressure systolic and diastolic"/>
</code>
<subject>🔗
<reference value="Patient/example"/>
<display value="Amy Shaw"/>
</subject>
<encounter>
<display value="GP Visit"/>
</encounter>
<effectiveDateTime value="1999-07-02"/>
<component>
<code>
<coding>
<system value="http://loinc.org"/>
<code value="8480-6"/>
<display value="Systolic blood pressure"/>
</coding>
<text value="Systolic blood pressure"/>
</code>
<valueQuantity>
<value value="109"/>
<unit value="mmHg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mm[Hg]"/>
</valueQuantity>
</component>
<component>
<code>
<coding>
<system value="http://loinc.org"/>
<code value="8462-4"/>
<display value="Diastolic blood pressure"/>
</coding>
<text value="Diastolic blood pressure"/>
</code>
<valueQuantity>
<value value="44"/>
<unit value="mmHg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mm[Hg]"/>
</valueQuantity>
</component>
</Observation>
</resource>
</parameter>
<parameter>
<name value="FHIRObservationListExample"/>
<resource>
<Observation>
<id value="bmi"/>
<status value="final"/>
<category>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/observation-category"/>
<code value="vital-signs"/>
<display value="Vital Signs"/>
</coding>
<text value="Vital Signs"/>
</category>
<code>
<coding>
<system value="http://loinc.org"/>
<code value="39156-5"/>
<display value="Body mass index (BMI) [Ratio]"/>
</coding>
<text value="BMI"/>
</code>
<subject>🔗
<reference value="Patient/example"/>
<display value="Amy Shaw"/>
</subject>
<encounter>
<display value="GP Visit"/>
</encounter>
<effectiveDateTime value="1999-07-02"/>
<valueQuantity>
<value value="16.2"/>
<unit value="kg/m2"/>
<system value="http://unitsofmeasure.org"/>
<code value="kg/m2"/>
</valueQuantity>
</Observation>
</resource>
</parameter>
<parameter>
<extension url="http://hl7.org/fhir/StructureDefinition/cqf-cqlType">
<valueString value="List<FHIR.Observation>"/>
</extension>
<name value="FHIRObservationEmptyListExample"/>
<valueBoolean>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-isEmptyList">
<valueBoolean value="true"/>
</extension>
</valueBoolean>
</parameter>
</Parameters>