This page is part of the FHIR Specification (v1.4.0: STU 3 Ballot 3). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3
Clinical Decision Support Work Group | Maturity Level: 0 | Compartments: Not linked to any defined compartments |
The Library resource provides a representation container for knowledge artifact component definitions. It is effectively an exposure of the header information for a CQL/ELM library.
This resource is a draft proposal for use as part of an approach to Clinical Quality within FHIR, and is documented as part of the Clinical Quality Improvement Framework Implementation Guide.
The Library resource represents a shareable library of clinical logic, written in Clinical Quality Language (CQL). In addition to representing the metadata of the library, the resource has elements that expose the components defined within the library such as code system and value set references, named expressions and parameters.
The actual content of the library is represented using the Attachment data type, and may either be referenced with a url to some CQL repository, or the content may be embedded as a base-64 encoded string. Either way, the content may be shared as a CQL text document, or, for a more computable representation, as an (Expression Logical Model) ELM XML or JSON document.
Note that because the library content may be embedded as well as retrievable from a CQL repository via the attachment URL, the possibility exists for the embedded content to be different from the content on the repository. With proper versioning and governance, this should never occur, but to minimize the potential impact of this possibility, implementers SHALL give precedence to the embedded content of a library when it is present.
This resource is referenced by DecisionSupportRule, Measure and OrderSet
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
Library | Σ | DomainResource | Represents a library of quality improvement components | |
moduleMetadata | Σ | 0..1 | ModuleMetadata | The metadata information for the library |
model | Σ | 0..* | BackboneElement | A model used by the library |
name | Σ | 0..1 | string | Name of the model |
identifier | Σ | 1..1 | string | The identifier of the model |
version | Σ | 0..1 | string | The version of the model, if any |
library | Σ | 0..* | BackboneElement | A library referenced by this library |
name | Σ | 0..1 | string | Name of the library |
identifier | Σ | 1..1 | string | The identifier of the library |
version | Σ | 0..1 | string | The version of the library, if any |
document[x] | Σ | 0..1 | The content of the library | |
documentAttachment | Attachment | |||
documentReference | Reference(ModuleDefinition) | |||
codeSystem | Σ | 0..* | BackboneElement | A code system used by the library |
name | Σ | 0..1 | string | Name of the code system |
identifier | Σ | 1..1 | string | The identifier of the code system |
version | Σ | 0..1 | string | The version of the code system, if any |
valueSet | Σ | 0..* | BackboneElement | A value set used by the library |
name | Σ | 0..1 | string | Name of the value set |
identifier | Σ | 1..1 | string | The identifier of the value set |
version | Σ | 0..1 | string | The version of the value set |
codeSystem | Σ | 0..* | string | The code system binding for this value set definition |
parameter | Σ | 0..* | ParameterDefinition | Parameters defined by the library |
dataRequirement | Σ | 0..* | DataRequirement | Data requirements of the library |
document | Σ | 1..1 | Attachment | The content of the library |
Documentation for this format |
UML Diagram
XML Template
<Library xmlns="http://hl7.org/fhir"> <!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <moduleMetadata><!-- 0..1 ModuleMetadata The metadata information for the library --></moduleMetadata> <model> <!-- 0..* A model used by the library --> <name value="[string]"/><!-- 0..1 Name of the model --> <identifier value="[string]"/><!-- 1..1 The identifier of the model --> <version value="[string]"/><!-- 0..1 The version of the model, if any --> </model> <library> <!-- 0..* A library referenced by this library --> <name value="[string]"/><!-- 0..1 Name of the library --> <identifier value="[string]"/><!-- 1..1 The identifier of the library --> <version value="[string]"/><!-- 0..1 The version of the library, if any --> <document[x]><!-- 0..1 Attachment|Reference(ModuleDefinition) The content of the library --></document[x]> </library> <codeSystem> <!-- 0..* A code system used by the library --> <name value="[string]"/><!-- 0..1 Name of the code system --> <identifier value="[string]"/><!-- 1..1 The identifier of the code system --> <version value="[string]"/><!-- 0..1 The version of the code system, if any --> </codeSystem> <valueSet> <!-- 0..* A value set used by the library --> <name value="[string]"/><!-- 0..1 Name of the value set --> <identifier value="[string]"/><!-- 1..1 The identifier of the value set --> <version value="[string]"/><!-- 0..1 The version of the value set --> <codeSystem value="[string]"/><!-- 0..* The code system binding for this value set definition --> </valueSet> <parameter><!-- 0..* ParameterDefinition Parameters defined by the library --></parameter> <dataRequirement><!-- 0..* DataRequirement Data requirements of the library --></dataRequirement> <document><!-- 1..1 Attachment The content of the library --></document> </Library>
JSON Template
{ "resourceType" : "Library", // from Resource: id, meta, implicitRules, and language // from DomainResource: text, contained, extension, and modifierExtension "moduleMetadata" : { ModuleMetadata }, // The metadata information for the library "model" : [{ // A model used by the library "name" : "<string>", // Name of the model "identifier" : "<string>", // R! The identifier of the model "version" : "<string>" // The version of the model, if any }], "library" : [{ // A library referenced by this library "name" : "<string>", // Name of the library "identifier" : "<string>", // R! The identifier of the library "version" : "<string>", // The version of the library, if any // document[x]: The content of the library. One of these 2: "documentAttachment" : { Attachment } "documentReference" : { Reference(ModuleDefinition) } }], "codeSystem" : [{ // A code system used by the library "name" : "<string>", // Name of the code system "identifier" : "<string>", // R! The identifier of the code system "version" : "<string>" // The version of the code system, if any }], "valueSet" : [{ // A value set used by the library "name" : "<string>", // Name of the value set "identifier" : "<string>", // R! The identifier of the value set "version" : "<string>", // The version of the value set "codeSystem" : ["<string>"] // The code system binding for this value set definition }], "parameter" : [{ ParameterDefinition }], // Parameters defined by the library "dataRequirement" : [{ DataRequirement }], // Data requirements of the library "document" : { Attachment } // R! The content of the library }
Structure
Name | Flags | Card. | Type | Description & Constraints |
---|---|---|---|---|
Library | Σ | DomainResource | Represents a library of quality improvement components | |
moduleMetadata | Σ | 0..1 | ModuleMetadata | The metadata information for the library |
model | Σ | 0..* | BackboneElement | A model used by the library |
name | Σ | 0..1 | string | Name of the model |
identifier | Σ | 1..1 | string | The identifier of the model |
version | Σ | 0..1 | string | The version of the model, if any |
library | Σ | 0..* | BackboneElement | A library referenced by this library |
name | Σ | 0..1 | string | Name of the library |
identifier | Σ | 1..1 | string | The identifier of the library |
version | Σ | 0..1 | string | The version of the library, if any |
document[x] | Σ | 0..1 | The content of the library | |
documentAttachment | Attachment | |||
documentReference | Reference(ModuleDefinition) | |||
codeSystem | Σ | 0..* | BackboneElement | A code system used by the library |
name | Σ | 0..1 | string | Name of the code system |
identifier | Σ | 1..1 | string | The identifier of the code system |
version | Σ | 0..1 | string | The version of the code system, if any |
valueSet | Σ | 0..* | BackboneElement | A value set used by the library |
name | Σ | 0..1 | string | Name of the value set |
identifier | Σ | 1..1 | string | The identifier of the value set |
version | Σ | 0..1 | string | The version of the value set |
codeSystem | Σ | 0..* | string | The code system binding for this value set definition |
parameter | Σ | 0..* | ParameterDefinition | Parameters defined by the library |
dataRequirement | Σ | 0..* | DataRequirement | Data requirements of the library |
document | Σ | 1..1 | Attachment | The content of the library |
Documentation for this format |
XML Template
<Library xmlns="http://hl7.org/fhir"> <!-- from Resource: id, meta, implicitRules, and language --> <!-- from DomainResource: text, contained, extension, and modifierExtension --> <moduleMetadata><!-- 0..1 ModuleMetadata The metadata information for the library --></moduleMetadata> <model> <!-- 0..* A model used by the library --> <name value="[string]"/><!-- 0..1 Name of the model --> <identifier value="[string]"/><!-- 1..1 The identifier of the model --> <version value="[string]"/><!-- 0..1 The version of the model, if any --> </model> <library> <!-- 0..* A library referenced by this library --> <name value="[string]"/><!-- 0..1 Name of the library --> <identifier value="[string]"/><!-- 1..1 The identifier of the library --> <version value="[string]"/><!-- 0..1 The version of the library, if any --> <document[x]><!-- 0..1 Attachment|Reference(ModuleDefinition) The content of the library --></document[x]> </library> <codeSystem> <!-- 0..* A code system used by the library --> <name value="[string]"/><!-- 0..1 Name of the code system --> <identifier value="[string]"/><!-- 1..1 The identifier of the code system --> <version value="[string]"/><!-- 0..1 The version of the code system, if any --> </codeSystem> <valueSet> <!-- 0..* A value set used by the library --> <name value="[string]"/><!-- 0..1 Name of the value set --> <identifier value="[string]"/><!-- 1..1 The identifier of the value set --> <version value="[string]"/><!-- 0..1 The version of the value set --> <codeSystem value="[string]"/><!-- 0..* The code system binding for this value set definition --> </valueSet> <parameter><!-- 0..* ParameterDefinition Parameters defined by the library --></parameter> <dataRequirement><!-- 0..* DataRequirement Data requirements of the library --></dataRequirement> <document><!-- 1..1 Attachment The content of the library --></document> </Library>
JSON Template
{ "resourceType" : "Library", // from Resource: id, meta, implicitRules, and language // from DomainResource: text, contained, extension, and modifierExtension "moduleMetadata" : { ModuleMetadata }, // The metadata information for the library "model" : [{ // A model used by the library "name" : "<string>", // Name of the model "identifier" : "<string>", // R! The identifier of the model "version" : "<string>" // The version of the model, if any }], "library" : [{ // A library referenced by this library "name" : "<string>", // Name of the library "identifier" : "<string>", // R! The identifier of the library "version" : "<string>", // The version of the library, if any // document[x]: The content of the library. One of these 2: "documentAttachment" : { Attachment } "documentReference" : { Reference(ModuleDefinition) } }], "codeSystem" : [{ // A code system used by the library "name" : "<string>", // Name of the code system "identifier" : "<string>", // R! The identifier of the code system "version" : "<string>" // The version of the code system, if any }], "valueSet" : [{ // A value set used by the library "name" : "<string>", // Name of the value set "identifier" : "<string>", // R! The identifier of the value set "version" : "<string>", // The version of the value set "codeSystem" : ["<string>"] // The code system binding for this value set definition }], "parameter" : [{ ParameterDefinition }], // Parameters defined by the library "dataRequirement" : [{ DataRequirement }], // Data requirements of the library "document" : { Attachment } // R! The content of the library }
Alternate definitions: Schema/Schematron, Resource Profile (XML, JSON), Questionnaire
Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.
Name | Type | Description | Paths |
description | string | Text search against the description | Library.moduleMetadata.description |
identifier | token | Logical identifier for the module (e.g. CMS-143) | Library.moduleMetadata.identifier |
status | token | Status of the module | Library.moduleMetadata.status |
title | string | Text search against the title | Library.moduleMetadata.title |
topic | token | Topics associated with the module | Library.moduleMetadata.topic |
version | string | Version of the module (e.g. 1.0.0) | Library.moduleMetadata.version |