This page is part of the FHIR Specification (v1.6.0: STU 3 Ballot 4). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions
Clinical Decision Support Work Group | Maturity Level: N/A | Ballot Status: STU 3 |
The DataRequirement structure defines a general data requirement for a knowledge asset such as a decision support rule or quality measure.
A DataRequirement differs from a parameter in that it specifies the data to be provided in terms of the type of data, and specific filters on code-valued and/or date-valued attributes. Data requirements are not named because they are referenced by type within the evaluation context.
Data requirements are used by knowledge modules to communicate the set of required data to a consumer in a way that is computable (as opposed to a set of named parameters which must be integrated by hand based on the meaning of the parameter as communicated through the documentation).
DataRequirements are typically used to communicate patient-dependent information such as MedicationStatements and Encounters, whereas Parameters are typically used to communicate patient-independent information such as configuration values
For example, consider the following CQL expression:
define "Total Colectomy Procedures":
[Procedure: "Total Colectomy Value Set"] P
where P.performedPeriod during "Measurement Period"
The criteria is looking for procedures matching the "Total Colectomy Value Set" that were performed during the "Measurement Period". In this case, "Measurement Period" is a parameter, referenced by name, whereas the reference to Procedure uses the name of the resource type, and so constitutes a data requirement of the criteria:
<dataRequirement>
<type value="Procedure"/>
<codeFilter>
<path value="code"/>
<valueSetString value="Total Colectomy Value Set"/>
</codeFilter>
<dateFilter>
<path value="performedPeriod"/>
<valuePeriod>
<start value="2016-01-01"/>
<end value="2016-12-31"/>
</valuePeriod>
</dateFilter>
</dataRequirement>
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
DataRequirement | Σ | Element | Describes a required data item | |
type | Σ | 1..1 | code | The type of the required data FHIRAllTypes (Required) |
profile | Σ | 0..* | Reference(StructureDefinition) | The profile of the required data |
mustSupport | Σ | 0..* | string | Indicates that specific structure elements are referenced by the knowledge module |
codeFilter | Σ | 0..* | Element | Code filters for the data |
path | Σ | 1..1 | string | The code-valued attribute of the filter |
valueSet[x] | Σ | 0..1 | Valueset for the filter | |
valueSetString | string | |||
valueSetReference | Reference(ValueSet) | |||
valueCode | Σ | 0..* | code | Code value of the filter |
valueCoding | Σ | 0..* | Coding | Coding value of the filter |
valueCodeableConcept | Σ | 0..* | CodeableConcept | CodeableConcept value of the filter |
dateFilter | Σ | 0..* | Element | Date filters for the data |
path | Σ | 1..1 | string | The date-valued attribute of the filter |
value[x] | Σ | 0..1 | The value of the filter, as a Period, DateTime, or Duration value | |
valueDateTime | dateTime | |||
valuePeriod | Period | |||
valueDuration | Duration | |||
Documentation for this format |
UML Diagram (Legend)
XML Template
<[name] xmlns="http://hl7.org/fhir"> <!-- from Element: extension --> <type value="[code]"/><!-- 1..1 The type of the required data --> <profile><!-- 0..* Reference(StructureDefinition) The profile of the required data --></profile> <mustSupport value="[string]"/><!-- 0..* Indicates that specific structure elements are referenced by the knowledge module --> <codeFilter> <!-- 0..* Code filters for the data --> <path value="[string]"/><!-- 1..1 The code-valued attribute of the filter --> <valueSet[x]><!-- 0..1 string|Reference(ValueSet) Valueset for the filter --></valueSet[x]> <valueCode value="[code]"/><!-- 0..* Code value of the filter --> <valueCoding><!-- 0..* Coding Coding value of the filter --></valueCoding> <valueCodeableConcept><!-- 0..* CodeableConcept CodeableConcept value of the filter --></valueCodeableConcept> </codeFilter> <dateFilter> <!-- 0..* Date filters for the data --> <path value="[string]"/><!-- 1..1 The date-valued attribute of the filter --> <value[x]><!-- 0..1 dateTime|Period|Duration The value of the filter, as a Period, DateTime, or Duration value --></value[x]> </dateFilter> </[name]>
JSON Template
{ // from Element: extension "type" : "<code>", // R! The type of the required data "profile" : [{ Reference(StructureDefinition) }], // The profile of the required data "mustSupport" : ["<string>"], // Indicates that specific structure elements are referenced by the knowledge module "codeFilter" : [{ // Code filters for the data "path" : "<string>", // R! The code-valued attribute of the filter // valueSet[x]: Valueset for the filter. One of these 2: "valueSetString" : "<string>", "valueSetReference" : { Reference(ValueSet) }, "valueCode" : ["<code>"], // Code value of the filter "valueCoding" : [{ Coding }], // Coding value of the filter "valueCodeableConcept" : [{ CodeableConcept }] // CodeableConcept value of the filter }], "dateFilter" : [{ // Date filters for the data "path" : "<string>", // R! The date-valued attribute of the filter // value[x]: The value of the filter, as a Period, DateTime, or Duration value. One of these 3: "valueDateTime" : "<dateTime>" "valuePeriod" : { Period } "valueDuration" : { Duration } }] }
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> . [ # from Element: Element.extension fhir:DataRequirement.type [ code ]; # 1..1 The type of the required data fhir:DataRequirement.profile [ Reference(StructureDefinition) ], ... ; # 0..* The profile of the required data fhir:DataRequirement.mustSupport [ string ], ... ; # 0..* Indicates that specific structure elements are referenced by the knowledge module fhir:DataRequirement.codeFilter [ # 0..* Code filters for the data fhir:DataRequirement.codeFilter.path [ string ]; # 1..1 The code-valued attribute of the filter # DataRequirement.codeFilter.valueSet[x] : 0..1 Valueset for the filter. One of these 2 fhir:DataRequirement.codeFilter.valueSetString [ string ] fhir:DataRequirement.codeFilter.valueSetReference [ Reference(ValueSet) ] fhir:DataRequirement.codeFilter.valueCode [ code ], ... ; # 0..* Code value of the filter fhir:DataRequirement.codeFilter.valueCoding [ Coding ], ... ; # 0..* Coding value of the filter fhir:DataRequirement.codeFilter.valueCodeableConcept [ CodeableConcept ], ... ; # 0..* CodeableConcept value of the filter ], ...; fhir:DataRequirement.dateFilter [ # 0..* Date filters for the data fhir:DataRequirement.dateFilter.path [ string ]; # 1..1 The date-valued attribute of the filter # DataRequirement.dateFilter.value[x] : 0..1 The value of the filter, as a Period, DateTime, or Duration value. One of these 3 fhir:DataRequirement.dateFilter.valueDateTime [ dateTime ] fhir:DataRequirement.dateFilter.valuePeriod [ Period ] fhir:DataRequirement.dateFilter.valueDuration [ Duration ] ], ...; ]
Changes since DSTU2
This complex-type did not exist in Release 2
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
DataRequirement | Σ | Element | Describes a required data item | |
type | Σ | 1..1 | code | The type of the required data FHIRAllTypes (Required) |
profile | Σ | 0..* | Reference(StructureDefinition) | The profile of the required data |
mustSupport | Σ | 0..* | string | Indicates that specific structure elements are referenced by the knowledge module |
codeFilter | Σ | 0..* | Element | Code filters for the data |
path | Σ | 1..1 | string | The code-valued attribute of the filter |
valueSet[x] | Σ | 0..1 | Valueset for the filter | |
valueSetString | string | |||
valueSetReference | Reference(ValueSet) | |||
valueCode | Σ | 0..* | code | Code value of the filter |
valueCoding | Σ | 0..* | Coding | Coding value of the filter |
valueCodeableConcept | Σ | 0..* | CodeableConcept | CodeableConcept value of the filter |
dateFilter | Σ | 0..* | Element | Date filters for the data |
path | Σ | 1..1 | string | The date-valued attribute of the filter |
value[x] | Σ | 0..1 | The value of the filter, as a Period, DateTime, or Duration value | |
valueDateTime | dateTime | |||
valuePeriod | Period | |||
valueDuration | Duration | |||
Documentation for this format |
XML Template
<[name] xmlns="http://hl7.org/fhir"> <!-- from Element: extension --> <type value="[code]"/><!-- 1..1 The type of the required data --> <profile><!-- 0..* Reference(StructureDefinition) The profile of the required data --></profile> <mustSupport value="[string]"/><!-- 0..* Indicates that specific structure elements are referenced by the knowledge module --> <codeFilter> <!-- 0..* Code filters for the data --> <path value="[string]"/><!-- 1..1 The code-valued attribute of the filter --> <valueSet[x]><!-- 0..1 string|Reference(ValueSet) Valueset for the filter --></valueSet[x]> <valueCode value="[code]"/><!-- 0..* Code value of the filter --> <valueCoding><!-- 0..* Coding Coding value of the filter --></valueCoding> <valueCodeableConcept><!-- 0..* CodeableConcept CodeableConcept value of the filter --></valueCodeableConcept> </codeFilter> <dateFilter> <!-- 0..* Date filters for the data --> <path value="[string]"/><!-- 1..1 The date-valued attribute of the filter --> <value[x]><!-- 0..1 dateTime|Period|Duration The value of the filter, as a Period, DateTime, or Duration value --></value[x]> </dateFilter> </[name]>
JSON Template
{ // from Element: extension "type" : "<code>", // R! The type of the required data "profile" : [{ Reference(StructureDefinition) }], // The profile of the required data "mustSupport" : ["<string>"], // Indicates that specific structure elements are referenced by the knowledge module "codeFilter" : [{ // Code filters for the data "path" : "<string>", // R! The code-valued attribute of the filter // valueSet[x]: Valueset for the filter. One of these 2: "valueSetString" : "<string>", "valueSetReference" : { Reference(ValueSet) }, "valueCode" : ["<code>"], // Code value of the filter "valueCoding" : [{ Coding }], // Coding value of the filter "valueCodeableConcept" : [{ CodeableConcept }] // CodeableConcept value of the filter }], "dateFilter" : [{ // Date filters for the data "path" : "<string>", // R! The date-valued attribute of the filter // value[x]: The value of the filter, as a Period, DateTime, or Duration value. One of these 3: "valueDateTime" : "<dateTime>" "valuePeriod" : { Period } "valueDuration" : { Duration } }] }
Turtle Template
@prefix fhir: <http://hl7.org/fhir/> . [ # from Element: Element.extension fhir:DataRequirement.type [ code ]; # 1..1 The type of the required data fhir:DataRequirement.profile [ Reference(StructureDefinition) ], ... ; # 0..* The profile of the required data fhir:DataRequirement.mustSupport [ string ], ... ; # 0..* Indicates that specific structure elements are referenced by the knowledge module fhir:DataRequirement.codeFilter [ # 0..* Code filters for the data fhir:DataRequirement.codeFilter.path [ string ]; # 1..1 The code-valued attribute of the filter # DataRequirement.codeFilter.valueSet[x] : 0..1 Valueset for the filter. One of these 2 fhir:DataRequirement.codeFilter.valueSetString [ string ] fhir:DataRequirement.codeFilter.valueSetReference [ Reference(ValueSet) ] fhir:DataRequirement.codeFilter.valueCode [ code ], ... ; # 0..* Code value of the filter fhir:DataRequirement.codeFilter.valueCoding [ Coding ], ... ; # 0..* Coding value of the filter fhir:DataRequirement.codeFilter.valueCodeableConcept [ CodeableConcept ], ... ; # 0..* CodeableConcept value of the filter ], ...; fhir:DataRequirement.dateFilter [ # 0..* Date filters for the data fhir:DataRequirement.dateFilter.path [ string ]; # 1..1 The date-valued attribute of the filter # DataRequirement.dateFilter.value[x] : 0..1 The value of the filter, as a Period, DateTime, or Duration value. One of these 3 fhir:DataRequirement.dateFilter.valueDateTime [ dateTime ] fhir:DataRequirement.dateFilter.valuePeriod [ Period ] fhir:DataRequirement.dateFilter.valueDuration [ Duration ] ], ...; ]
Constraints