Using CQL With FHIR
2.1.0-cibuild - STU 2 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.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

Resource Profile: CQL Group Definition

Official URL: http://hl7.org/fhir/uv/cql/StructureDefinition/cql-groupdefinition Version: 2.1.0-cibuild
Standards status: Trial-use Maturity Level: 1 Computable Name: CQLGroupDefiition
Other Identifiers: OID:2.16.840.1.113883.4.642.40.37.42.17

The CQL Group Definition profile defines conformance expectations for the use of a FHIR Group resource as a cohort definition using Clinical Quality Language (CQL) to define membership criteria. This profile is intended to be consistent with and able to be used as a cohort definition in other similar efforts including clinical trial eligibility in the Evidence-based Medicine on FHIR space, as well as the Bulk Cohort API cohort definition profile.

Usages:

  • This Profile is not used by any profiles in this Implementation Guide

You can also check for usages in the FHIR IG Statistics

Formal Views of Profile Content

Description Differentials, Snapshots, and other representations.

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Group C 0..* Group Group of multiple entities
Constraints: grp-1
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
.... extension:cqlOptions S 0..1 (Complex) What options
URL: http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions
..... url 1..1 uri "http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions"
..... value[x] 1..1 Reference(CQL Options) Value of extension
.... extension:cqlLibrary S 0..* ?gen-e1? [CanonicalType[http://hl7.org/fhir/StructureDefinition/cqf-cqlLibrary]] Extension
URL: http://hl7.org/fhir/StructureDefinition/cqf-cqlLibrary
..... url 1..1 uri identifies the meaning of the extension
..... value[x] 1..1 canonical(CQL Library) Value of extension
.... extension:characteristicExpression S 1..1 (Complex) Criteria for group membership
URL: http://hl7.org/fhir/StructureDefinition/characteristicExpression
..... extension 0..0 Extension
Slice: Unordered, Open by value:url
..... url 1..1 uri "http://hl7.org/fhir/StructureDefinition/characteristicExpression"
..... value[x] 1..1 Expression Value of extension
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... actual ΣC 1..1 boolean Descriptive or actual
Fixed Value: false
... member C 0..* BackboneElement Not allowed
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... entity 1..1 Reference(Patient | Practitioner | PractitionerRole | Device | Medication | Substance | Group) Reference to the group member

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
Group.type Base required GroupType 📍4.0.1 FHIR Std.
Group.characteristic.​code Base example Not State Unknown
Group.characteristic.​value[x] Base example Not State Unknown

Constraints

Id Grade Path(s) Description Expression
dom-2 error Group If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error Group If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4 error Group If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
dom-5 error Group If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice Group A resource should have narrative for robust management text.`div`.exists()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
ext-1 error **ALL** extensions Must have either extensions or value[x], not both extension.exists() != value.exists()
grp-1 error Group Can only have members if group is "actual" member.empty() or (actual = true)

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Group 0..* Group Group of multiple entities
... Slices for extension Content/Rules for all slices
.... extension:cqlOptions S 0..1 (Complex) What options
URL: http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions
..... value[x] 1..1 Reference(CQL Options) Value of extension
.... extension:cqlLibrary S 0..* ?gen-e1? [CanonicalType[http://hl7.org/fhir/StructureDefinition/cqf-cqlLibrary]] Extension
URL: http://hl7.org/fhir/StructureDefinition/cqf-cqlLibrary
..... value[x] 1..1 canonical(CQL Library) Value of extension
.... extension:characteristicExpression S 1..1 (Complex) Criteria for group membership
URL: http://hl7.org/fhir/StructureDefinition/characteristicExpression
..... value[x] 1..1 Expression Value of extension
... actual 1..1 boolean Descriptive or actual
Fixed Value: false
... characteristic 0..0 Not allowed

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Group C 0..* Group Group of multiple entities
Constraints: grp-1
... id Σ 0..1 id Logical id of this artifact
... meta Σ 0..1 Meta Metadata about the resource
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... text 0..1 Narrative Text summary of the resource, for human interpretation
This profile does not constrain the narrative in regard to content, language, or traceability to data elements
... contained 0..* Resource Contained, inline Resources
... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
.... extension:cqlOptions S 0..1 (Complex) What options
URL: http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... url 1..1 uri "http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions"
..... value[x] 1..1 Reference(CQL Options) Value of extension
.... extension:cqlLibrary S 0..* ?gen-e1? [CanonicalType[http://hl7.org/fhir/StructureDefinition/cqf-cqlLibrary]] Extension
URL: http://hl7.org/fhir/StructureDefinition/cqf-cqlLibrary
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... url 1..1 uri identifies the meaning of the extension
..... value[x] 1..1 canonical(CQL Library) Value of extension
.... extension:characteristicExpression S 1..1 (Complex) Criteria for group membership
URL: http://hl7.org/fhir/StructureDefinition/characteristicExpression
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..0 Extension
Slice: Unordered, Open by value:url
..... url 1..1 uri "http://hl7.org/fhir/StructureDefinition/characteristicExpression"
..... value[x] 1..1 Expression Value of extension
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... identifier Σ 0..* Identifier Unique id
... active Σ 0..1 boolean Whether this group's record is in active use
... type Σ 1..1 code person | animal | practitioner | device | medication | substance
Binding: GroupType (required): Types of resources that are part of group.
... actual ΣC 1..1 boolean Descriptive or actual
Fixed Value: false
... code Σ 0..1 CodeableConcept Kind of Group members
Binding Description: (example): Kind of particular resource; e.g. cow, syringe, lake, etc.
... name Σ 0..1 string Label for Group
... quantity Σ 0..1 unsignedInt Number of members
... managingEntity Σ 0..1 Reference(Organization | RelatedPerson | Practitioner | PractitionerRole) Entity that is the custodian of the Group's definition
... member C 0..* BackboneElement Not allowed
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... entity 1..1 Reference(Patient | Practitioner | PractitionerRole | Device | Medication | Substance | Group) Reference to the group member
.... period 0..1 Period Period member belonged to the group
.... inactive 0..1 boolean If member is no longer in group

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
Group.language Base preferred Common Languages 📍4.0.1 FHIR Std.
Group.type Base required GroupType 📍4.0.1 FHIR Std.
Group.code Base example Not State Unknown
Group.characteristic.​code Base example Not State Unknown
Group.characteristic.​value[x] Base example Not State Unknown

Constraints

Id Grade Path(s) Description Expression
dom-2 error Group If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error Group If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4 error Group If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
dom-5 error Group If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice Group A resource should have narrative for robust management text.`div`.exists()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
ext-1 error **ALL** extensions Must have either extensions or value[x], not both extension.exists() != value.exists()
grp-1 error Group Can only have members if group is "actual" member.empty() or (actual = true)

Summary

Mandatory: 2 elements(2 nested mandatory elements)
Must-Support: 3 elements
Fixed: 1 element
Prohibited: 1 element

Structures

This structure refers to these other structures:

Extensions

This structure refers to these extensions:

Maturity: 1

Key Elements View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Group C 0..* Group Group of multiple entities
Constraints: grp-1
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
.... extension:cqlOptions S 0..1 (Complex) What options
URL: http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions
..... url 1..1 uri "http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions"
..... value[x] 1..1 Reference(CQL Options) Value of extension
.... extension:cqlLibrary S 0..* ?gen-e1? [CanonicalType[http://hl7.org/fhir/StructureDefinition/cqf-cqlLibrary]] Extension
URL: http://hl7.org/fhir/StructureDefinition/cqf-cqlLibrary
..... url 1..1 uri identifies the meaning of the extension
..... value[x] 1..1 canonical(CQL Library) Value of extension
.... extension:characteristicExpression S 1..1 (Complex) Criteria for group membership
URL: http://hl7.org/fhir/StructureDefinition/characteristicExpression
..... extension 0..0 Extension
Slice: Unordered, Open by value:url
..... url 1..1 uri "http://hl7.org/fhir/StructureDefinition/characteristicExpression"
..... value[x] 1..1 Expression Value of extension
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... actual ΣC 1..1 boolean Descriptive or actual
Fixed Value: false
... member C 0..* BackboneElement Not allowed
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... entity 1..1 Reference(Patient | Practitioner | PractitionerRole | Device | Medication | Substance | Group) Reference to the group member

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
Group.type Base required GroupType 📍4.0.1 FHIR Std.
Group.characteristic.​code Base example Not State Unknown
Group.characteristic.​value[x] Base example Not State Unknown

Constraints

Id Grade Path(s) Description Expression
dom-2 error Group If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error Group If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4 error Group If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
dom-5 error Group If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice Group A resource should have narrative for robust management text.`div`.exists()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
ext-1 error **ALL** extensions Must have either extensions or value[x], not both extension.exists() != value.exists()
grp-1 error Group Can only have members if group is "actual" member.empty() or (actual = true)

Differential View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Group 0..* Group Group of multiple entities
... Slices for extension Content/Rules for all slices
.... extension:cqlOptions S 0..1 (Complex) What options
URL: http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions
..... value[x] 1..1 Reference(CQL Options) Value of extension
.... extension:cqlLibrary S 0..* ?gen-e1? [CanonicalType[http://hl7.org/fhir/StructureDefinition/cqf-cqlLibrary]] Extension
URL: http://hl7.org/fhir/StructureDefinition/cqf-cqlLibrary
..... value[x] 1..1 canonical(CQL Library) Value of extension
.... extension:characteristicExpression S 1..1 (Complex) Criteria for group membership
URL: http://hl7.org/fhir/StructureDefinition/characteristicExpression
..... value[x] 1..1 Expression Value of extension
... actual 1..1 boolean Descriptive or actual
Fixed Value: false
... characteristic 0..0 Not allowed

doco Documentation for this format

Snapshot ViewView

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. Group C 0..* Group Group of multiple entities
Constraints: grp-1
... id Σ 0..1 id Logical id of this artifact
... meta Σ 0..1 Meta Metadata about the resource
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... text 0..1 Narrative Text summary of the resource, for human interpretation
This profile does not constrain the narrative in regard to content, language, or traceability to data elements
... contained 0..* Resource Contained, inline Resources
... Slices for extension 1..* Extension Extension
Slice: Unordered, Open by value:url
.... extension:cqlOptions S 0..1 (Complex) What options
URL: http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... url 1..1 uri "http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions"
..... value[x] 1..1 Reference(CQL Options) Value of extension
.... extension:cqlLibrary S 0..* ?gen-e1? [CanonicalType[http://hl7.org/fhir/StructureDefinition/cqf-cqlLibrary]] Extension
URL: http://hl7.org/fhir/StructureDefinition/cqf-cqlLibrary
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... url 1..1 uri identifies the meaning of the extension
..... value[x] 1..1 canonical(CQL Library) Value of extension
.... extension:characteristicExpression S 1..1 (Complex) Criteria for group membership
URL: http://hl7.org/fhir/StructureDefinition/characteristicExpression
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..0 Extension
Slice: Unordered, Open by value:url
..... url 1..1 uri "http://hl7.org/fhir/StructureDefinition/characteristicExpression"
..... value[x] 1..1 Expression Value of extension
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... identifier Σ 0..* Identifier Unique id
... active Σ 0..1 boolean Whether this group's record is in active use
... type Σ 1..1 code person | animal | practitioner | device | medication | substance
Binding: GroupType (required): Types of resources that are part of group.
... actual ΣC 1..1 boolean Descriptive or actual
Fixed Value: false
... code Σ 0..1 CodeableConcept Kind of Group members
Binding Description: (example): Kind of particular resource; e.g. cow, syringe, lake, etc.
... name Σ 0..1 string Label for Group
... quantity Σ 0..1 unsignedInt Number of members
... managingEntity Σ 0..1 Reference(Organization | RelatedPerson | Practitioner | PractitionerRole) Entity that is the custodian of the Group's definition
... member C 0..* BackboneElement Not allowed
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... entity 1..1 Reference(Patient | Practitioner | PractitionerRole | Device | Medication | Substance | Group) Reference to the group member
.... period 0..1 Period Period member belonged to the group
.... inactive 0..1 boolean If member is no longer in group

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
Group.language Base preferred Common Languages 📍4.0.1 FHIR Std.
Group.type Base required GroupType 📍4.0.1 FHIR Std.
Group.code Base example Not State Unknown
Group.characteristic.​code Base example Not State Unknown
Group.characteristic.​value[x] Base example Not State Unknown

Constraints

Id Grade Path(s) Description Expression
dom-2 error Group If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error Group If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4 error Group If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
dom-5 error Group If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice Group A resource should have narrative for robust management text.`div`.exists()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
ext-1 error **ALL** extensions Must have either extensions or value[x], not both extension.exists() != value.exists()
grp-1 error Group Can only have members if group is "actual" member.empty() or (actual = true)

Summary

Mandatory: 2 elements(2 nested mandatory elements)
Must-Support: 3 elements
Fixed: 1 element
Prohibited: 1 element

Structures

This structure refers to these other structures:

Extensions

This structure refers to these extensions:

Maturity: 1

 

Other representations of profile: CSV, Excel, Schematron