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