STU 3 Ballot

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 . Page versions: R5 R4B R4 R3

14.3 Resource Library - Content

Clinical Decision Support Work GroupMaturity Level: 0Compartments: Not linked to any defined compartments

The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose exist knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets.

14.3.1 Scope and Usage

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 Reasoning module.

The Library resource is a general purpose container for clinical knowledge that is defined using a non-FHIR representation. For example, a shareable library of clinical logic, written in Clinical Quality Language (CQL), or the XML Schema for an information model. In addition to representing the metadata of the library, the resource has elements for tracking dependencies, as well as for representing the parameters and data requirements for any expression functionality provided by the library.

The actual content of the library is represented using the Attachment data type, and may either be referenced with a url, or the content may be embedded as a base-64 encoded string. Either way, the contentType element of the attachment is used to indicate the representation of the library content.

Note that because the library content may be embedded as well as be retrievable from an external 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.

14.3.2 Boundaries and Relationships

The Library resource is definitional in nature, meaning it is intended to represent shareable knowledge independent of any particular patient. This is in contrast to the DocumentReference resource, which captures non-FHIR content related to a specific patient, and the Media and Binary resources which capture multimedia content and raw binary content, respectively.

This resource is referenced by ActivityDefinition, Measure and PlanDefinition

14.3.3 Resource Content

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Library DomainResourceRepresents a library of quality improvement components
... url Σ0..1uriLogical URL to reference this library
... identifier Σ0..*IdentifierLogical identifier(s) for the library
... version Σ0..1stringThe version of the library, if any
... name Σ0..1stringA machine-friendly name for the library
... title Σ0..1stringA user-friendly title for the library
... type ?!Σ1..1CodeableConceptlogic-library | model-definition | asset-collection | module-definition
LibraryType (Extensible)
... status ?!Σ1..1codedraft | active | inactive
LibraryStatus (Required)
... experimental ?!Σ0..1booleanIf for testing purposes, not real usage
... description 0..1stringNatural language description of the library
... purpose 0..1stringDescribes the purpose of the library
... usage 0..1stringDescribes the clinical usage of the library
... publicationDate 0..1datePublication date for this version of the library
... lastReviewDate 0..1dateLast review date for the library
... effectivePeriod 0..1PeriodThe effective date range for the library
... coverage 0..*UsageContextDescribes the context of use for this library
... topic 0..*CodeableConceptDescriptional topics for the library
... contributor 0..*ContributorA content contributor
... publisher 0..1stringName of the publisher (Organization or individual)
... contact 0..*ContactDetailContact details of the publisher
... copyright 0..1stringUse and/or publishing restrictions
... relatedResource 0..*RelatedResourceRelated resources for the library
... parameter 0..*ParameterDefinitionParameters defined by the library
... dataRequirement 0..*DataRequirementData requirements of the library
... content 1..1AttachmentThe content of the library

doco Documentation for this format

UML Diagram (Legend)

Library (DomainResource)An absolute URL that is used to identify this library when it is referenced. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this library is (or will be) publishedurl : uri [0..1]A logical identifier for the library such as the CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifactsidentifier : Identifier [0..*]The version of the library, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifactsversion : string [0..1]A machine-friendly name for the library. This name should be usable as an identifier for the library by machine processing applications such as code generationname : string [0..1]A short, descriptive, user-friendly title for the librarytitle : string [0..1]Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition (this element modifies the meaning of other elements)type : CodeableConcept [1..1] « The type of knowledge asset this library contains (Strength=Extensible)LibraryType+ »The status of the library (this element modifies the meaning of other elements)status : code [1..1] « The status of the knowledge asset (Strength=Required)LibraryStatus! »Determines whether the library was developed for testing purposes (or education/evaluation/marketing), and is not intended to be used in production environments (this element modifies the meaning of other elements)experimental : boolean [0..1]A free text natural language description of the library from the consumer's perspectivedescription : string [0..1]A brief description of the purpose of the librarypurpose : string [0..1]A detailed description of how the library is used from a clinical perspectiveusage : string [0..1]The date on which the library was publishedpublicationDate : date [0..1]The date on which the library content was last reviewedlastReviewDate : date [0..1]The period during which the library content is effectiveeffectivePeriod : Period [0..1]Specifies various attributes of the patient population for whom and/or environment of care in which, the library is applicablecoverage : UsageContext [0..*]Clinical topics related to the content of the librarytopic : CodeableConcept [0..*]A contributor to the content of the library, including authors, editors, reviewers, and endorserscontributor : Contributor [0..*]The name of the individual or organization that published the library (also known as the steward for the library). This information is required for non-experimental active artifactspublisher : string [0..1]Contact details to assist a user in finding and communicating with the publishercontact : ContactDetail [0..*]A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the librarycopyright : string [0..1]Related resources such as additional documentation, justification, or bibliographic referencesrelatedResource : RelatedResource [0..*]The parameter element defines parameters used by the libraryparameter : ParameterDefinition [0..*]Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the librarydataRequirement : DataRequirement [0..*]The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the contentcontent : Attachment [1..1]

XML Template

<Library xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 0..1 Logical URL to reference this library -->
 <identifier><!-- 0..* Identifier Logical identifier(s) for the library --></identifier>
 <version value="[string]"/><!-- 0..1 The version of the library, if any -->
 <name value="[string]"/><!-- 0..1 A machine-friendly name for the library -->
 <title value="[string]"/><!-- 0..1 A user-friendly title for the library -->
 <type><!-- 1..1 CodeableConcept logic-library | model-definition | asset-collection | module-definition --></type>
 <status value="[code]"/><!-- 1..1 draft | active | inactive -->
 <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage -->
 <description value="[string]"/><!-- 0..1 Natural language description of the library -->
 <purpose value="[string]"/><!-- 0..1 Describes the purpose of the library -->
 <usage value="[string]"/><!-- 0..1 Describes the clinical usage of the library -->
 <publicationDate value="[date]"/><!-- 0..1 Publication date for this version of the library -->
 <lastReviewDate value="[date]"/><!-- 0..1 Last review date for the library -->
 <effectivePeriod><!-- 0..1 Period The effective date range for the library --></effectivePeriod>
 <coverage><!-- 0..* UsageContext Describes the context of use for this library --></coverage>
 <topic><!-- 0..* CodeableConcept Descriptional topics for the library --></topic>
 <contributor><!-- 0..* Contributor A content contributor --></contributor>
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (Organization or individual) -->
 <contact><!-- 0..* ContactDetail Contact details of the publisher --></contact>
 <copyright value="[string]"/><!-- 0..1 Use and/or publishing restrictions -->
 <relatedResource><!-- 0..* RelatedResource Related resources for the library --></relatedResource>
 <parameter><!-- 0..* ParameterDefinition Parameters defined by the library --></parameter>
 <dataRequirement><!-- 0..* DataRequirement Data requirements of the library --></dataRequirement>
 <content><!-- 1..1 Attachment The content of the library --></content>
</Library>

JSON Template

{doco
  "resourceType" : "Library",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // Logical URL to reference this library
  "identifier" : [{ Identifier }], // Logical identifier(s) for the library
  "version" : "<string>", // The version of the library, if any
  "name" : "<string>", // A machine-friendly name for the library
  "title" : "<string>", // A user-friendly title for the library
  "type" : { CodeableConcept }, // R!  logic-library | model-definition | asset-collection | module-definition
  "status" : "<code>", // R!  draft | active | inactive
  "experimental" : <boolean>, // If for testing purposes, not real usage
  "description" : "<string>", // Natural language description of the library
  "purpose" : "<string>", // Describes the purpose of the library
  "usage" : "<string>", // Describes the clinical usage of the library
  "publicationDate" : "<date>", // Publication date for this version of the library
  "lastReviewDate" : "<date>", // Last review date for the library
  "effectivePeriod" : { Period }, // The effective date range for the library
  "coverage" : [{ UsageContext }], // Describes the context of use for this library
  "topic" : [{ CodeableConcept }], // Descriptional topics for the library
  "contributor" : [{ Contributor }], // A content contributor
  "publisher" : "<string>", // Name of the publisher (Organization or individual)
  "contact" : [{ ContactDetail }], // Contact details of the publisher
  "copyright" : "<string>", // Use and/or publishing restrictions
  "relatedResource" : [{ RelatedResource }], // Related resources for the library
  "parameter" : [{ ParameterDefinition }], // Parameters defined by the library
  "dataRequirement" : [{ DataRequirement }], // Data requirements of the library
  "content" : { Attachment } // R!  The content of the library
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:Library;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:Library.url [ uri ]; # 0..1 Logical URL to reference this library
  fhir:Library.identifier [ Identifier ], ... ; # 0..* Logical identifier(s) for the library
  fhir:Library.version [ string ]; # 0..1 The version of the library, if any
  fhir:Library.name [ string ]; # 0..1 A machine-friendly name for the library
  fhir:Library.title [ string ]; # 0..1 A user-friendly title for the library
  fhir:Library.type [ CodeableConcept ]; # 1..1 logic-library | model-definition | asset-collection | module-definition
  fhir:Library.status [ code ]; # 1..1 draft | active | inactive
  fhir:Library.experimental [ boolean ]; # 0..1 If for testing purposes, not real usage
  fhir:Library.description [ string ]; # 0..1 Natural language description of the library
  fhir:Library.purpose [ string ]; # 0..1 Describes the purpose of the library
  fhir:Library.usage [ string ]; # 0..1 Describes the clinical usage of the library
  fhir:Library.publicationDate [ date ]; # 0..1 Publication date for this version of the library
  fhir:Library.lastReviewDate [ date ]; # 0..1 Last review date for the library
  fhir:Library.effectivePeriod [ Period ]; # 0..1 The effective date range for the library
  fhir:Library.coverage [ UsageContext ], ... ; # 0..* Describes the context of use for this library
  fhir:Library.topic [ CodeableConcept ], ... ; # 0..* Descriptional topics for the library
  fhir:Library.contributor [ Contributor ], ... ; # 0..* A content contributor
  fhir:Library.publisher [ string ]; # 0..1 Name of the publisher (Organization or individual)
  fhir:Library.contact [ ContactDetail ], ... ; # 0..* Contact details of the publisher
  fhir:Library.copyright [ string ]; # 0..1 Use and/or publishing restrictions
  fhir:Library.relatedResource [ RelatedResource ], ... ; # 0..* Related resources for the library
  fhir:Library.parameter [ ParameterDefinition ], ... ; # 0..* Parameters defined by the library
  fhir:Library.dataRequirement [ DataRequirement ], ... ; # 0..* Data requirements of the library
  fhir:Library.content [ Attachment ]; # 1..1 The content of the library
]

Changes since DSTU2

This resource did not exist in Release 2

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. Library DomainResourceRepresents a library of quality improvement components
... url Σ0..1uriLogical URL to reference this library
... identifier Σ0..*IdentifierLogical identifier(s) for the library
... version Σ0..1stringThe version of the library, if any
... name Σ0..1stringA machine-friendly name for the library
... title Σ0..1stringA user-friendly title for the library
... type ?!Σ1..1CodeableConceptlogic-library | model-definition | asset-collection | module-definition
LibraryType (Extensible)
... status ?!Σ1..1codedraft | active | inactive
LibraryStatus (Required)
... experimental ?!Σ0..1booleanIf for testing purposes, not real usage
... description 0..1stringNatural language description of the library
... purpose 0..1stringDescribes the purpose of the library
... usage 0..1stringDescribes the clinical usage of the library
... publicationDate 0..1datePublication date for this version of the library
... lastReviewDate 0..1dateLast review date for the library
... effectivePeriod 0..1PeriodThe effective date range for the library
... coverage 0..*UsageContextDescribes the context of use for this library
... topic 0..*CodeableConceptDescriptional topics for the library
... contributor 0..*ContributorA content contributor
... publisher 0..1stringName of the publisher (Organization or individual)
... contact 0..*ContactDetailContact details of the publisher
... copyright 0..1stringUse and/or publishing restrictions
... relatedResource 0..*RelatedResourceRelated resources for the library
... parameter 0..*ParameterDefinitionParameters defined by the library
... dataRequirement 0..*DataRequirementData requirements of the library
... content 1..1AttachmentThe content of the library

doco Documentation for this format

UML Diagram (Legend)

Library (DomainResource)An absolute URL that is used to identify this library when it is referenced. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this library is (or will be) publishedurl : uri [0..1]A logical identifier for the library such as the CMS or NQF identifiers for a measure artifact. Note that at least one identifier is required for non-experimental active artifactsidentifier : Identifier [0..*]The version of the library, if any. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifactsversion : string [0..1]A machine-friendly name for the library. This name should be usable as an identifier for the library by machine processing applications such as code generationname : string [0..1]A short, descriptive, user-friendly title for the librarytitle : string [0..1]Identifies the type of library such as a Logic Library, Model Definition, Asset Collection, or Module Definition (this element modifies the meaning of other elements)type : CodeableConcept [1..1] « The type of knowledge asset this library contains (Strength=Extensible)LibraryType+ »The status of the library (this element modifies the meaning of other elements)status : code [1..1] « The status of the knowledge asset (Strength=Required)LibraryStatus! »Determines whether the library was developed for testing purposes (or education/evaluation/marketing), and is not intended to be used in production environments (this element modifies the meaning of other elements)experimental : boolean [0..1]A free text natural language description of the library from the consumer's perspectivedescription : string [0..1]A brief description of the purpose of the librarypurpose : string [0..1]A detailed description of how the library is used from a clinical perspectiveusage : string [0..1]The date on which the library was publishedpublicationDate : date [0..1]The date on which the library content was last reviewedlastReviewDate : date [0..1]The period during which the library content is effectiveeffectivePeriod : Period [0..1]Specifies various attributes of the patient population for whom and/or environment of care in which, the library is applicablecoverage : UsageContext [0..*]Clinical topics related to the content of the librarytopic : CodeableConcept [0..*]A contributor to the content of the library, including authors, editors, reviewers, and endorserscontributor : Contributor [0..*]The name of the individual or organization that published the library (also known as the steward for the library). This information is required for non-experimental active artifactspublisher : string [0..1]Contact details to assist a user in finding and communicating with the publishercontact : ContactDetail [0..*]A copyright statement relating to the library and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the librarycopyright : string [0..1]Related resources such as additional documentation, justification, or bibliographic referencesrelatedResource : RelatedResource [0..*]The parameter element defines parameters used by the libraryparameter : ParameterDefinition [0..*]Describes a set of data that must be provided in order to be able to successfully perform the computations defined by the librarydataRequirement : DataRequirement [0..*]The content of the library as an Attachment. The content may be a reference to a url, or may be directly embedded as a base-64 string. Either way, the contentType of the attachment determines how to interpret the contentcontent : Attachment [1..1]

XML Template

<Library xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <url value="[uri]"/><!-- 0..1 Logical URL to reference this library -->
 <identifier><!-- 0..* Identifier Logical identifier(s) for the library --></identifier>
 <version value="[string]"/><!-- 0..1 The version of the library, if any -->
 <name value="[string]"/><!-- 0..1 A machine-friendly name for the library -->
 <title value="[string]"/><!-- 0..1 A user-friendly title for the library -->
 <type><!-- 1..1 CodeableConcept logic-library | model-definition | asset-collection | module-definition --></type>
 <status value="[code]"/><!-- 1..1 draft | active | inactive -->
 <experimental value="[boolean]"/><!-- 0..1 If for testing purposes, not real usage -->
 <description value="[string]"/><!-- 0..1 Natural language description of the library -->
 <purpose value="[string]"/><!-- 0..1 Describes the purpose of the library -->
 <usage value="[string]"/><!-- 0..1 Describes the clinical usage of the library -->
 <publicationDate value="[date]"/><!-- 0..1 Publication date for this version of the library -->
 <lastReviewDate value="[date]"/><!-- 0..1 Last review date for the library -->
 <effectivePeriod><!-- 0..1 Period The effective date range for the library --></effectivePeriod>
 <coverage><!-- 0..* UsageContext Describes the context of use for this library --></coverage>
 <topic><!-- 0..* CodeableConcept Descriptional topics for the library --></topic>
 <contributor><!-- 0..* Contributor A content contributor --></contributor>
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (Organization or individual) -->
 <contact><!-- 0..* ContactDetail Contact details of the publisher --></contact>
 <copyright value="[string]"/><!-- 0..1 Use and/or publishing restrictions -->
 <relatedResource><!-- 0..* RelatedResource Related resources for the library --></relatedResource>
 <parameter><!-- 0..* ParameterDefinition Parameters defined by the library --></parameter>
 <dataRequirement><!-- 0..* DataRequirement Data requirements of the library --></dataRequirement>
 <content><!-- 1..1 Attachment The content of the library --></content>
</Library>

JSON Template

{doco
  "resourceType" : "Library",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "url" : "<uri>", // Logical URL to reference this library
  "identifier" : [{ Identifier }], // Logical identifier(s) for the library
  "version" : "<string>", // The version of the library, if any
  "name" : "<string>", // A machine-friendly name for the library
  "title" : "<string>", // A user-friendly title for the library
  "type" : { CodeableConcept }, // R!  logic-library | model-definition | asset-collection | module-definition
  "status" : "<code>", // R!  draft | active | inactive
  "experimental" : <boolean>, // If for testing purposes, not real usage
  "description" : "<string>", // Natural language description of the library
  "purpose" : "<string>", // Describes the purpose of the library
  "usage" : "<string>", // Describes the clinical usage of the library
  "publicationDate" : "<date>", // Publication date for this version of the library
  "lastReviewDate" : "<date>", // Last review date for the library
  "effectivePeriod" : { Period }, // The effective date range for the library
  "coverage" : [{ UsageContext }], // Describes the context of use for this library
  "topic" : [{ CodeableConcept }], // Descriptional topics for the library
  "contributor" : [{ Contributor }], // A content contributor
  "publisher" : "<string>", // Name of the publisher (Organization or individual)
  "contact" : [{ ContactDetail }], // Contact details of the publisher
  "copyright" : "<string>", // Use and/or publishing restrictions
  "relatedResource" : [{ RelatedResource }], // Related resources for the library
  "parameter" : [{ ParameterDefinition }], // Parameters defined by the library
  "dataRequirement" : [{ DataRequirement }], // Data requirements of the library
  "content" : { Attachment } // R!  The content of the library
}

Turtle Template

@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:Library;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:Library.url [ uri ]; # 0..1 Logical URL to reference this library
  fhir:Library.identifier [ Identifier ], ... ; # 0..* Logical identifier(s) for the library
  fhir:Library.version [ string ]; # 0..1 The version of the library, if any
  fhir:Library.name [ string ]; # 0..1 A machine-friendly name for the library
  fhir:Library.title [ string ]; # 0..1 A user-friendly title for the library
  fhir:Library.type [ CodeableConcept ]; # 1..1 logic-library | model-definition | asset-collection | module-definition
  fhir:Library.status [ code ]; # 1..1 draft | active | inactive
  fhir:Library.experimental [ boolean ]; # 0..1 If for testing purposes, not real usage
  fhir:Library.description [ string ]; # 0..1 Natural language description of the library
  fhir:Library.purpose [ string ]; # 0..1 Describes the purpose of the library
  fhir:Library.usage [ string ]; # 0..1 Describes the clinical usage of the library
  fhir:Library.publicationDate [ date ]; # 0..1 Publication date for this version of the library
  fhir:Library.lastReviewDate [ date ]; # 0..1 Last review date for the library
  fhir:Library.effectivePeriod [ Period ]; # 0..1 The effective date range for the library
  fhir:Library.coverage [ UsageContext ], ... ; # 0..* Describes the context of use for this library
  fhir:Library.topic [ CodeableConcept ], ... ; # 0..* Descriptional topics for the library
  fhir:Library.contributor [ Contributor ], ... ; # 0..* A content contributor
  fhir:Library.publisher [ string ]; # 0..1 Name of the publisher (Organization or individual)
  fhir:Library.contact [ ContactDetail ], ... ; # 0..* Contact details of the publisher
  fhir:Library.copyright [ string ]; # 0..1 Use and/or publishing restrictions
  fhir:Library.relatedResource [ RelatedResource ], ... ; # 0..* Related resources for the library
  fhir:Library.parameter [ ParameterDefinition ], ... ; # 0..* Parameters defined by the library
  fhir:Library.dataRequirement [ DataRequirement ], ... ; # 0..* Data requirements of the library
  fhir:Library.content [ Attachment ]; # 1..1 The content of the library
]

Changes since DSTU2

This resource did not exist in Release 2

 

Alternate definitions: Master Definition (XML, JSON), XML Schema/Schematron (for ) + JSON Schema, ShEx (for Turtle)

14.3.3.1 Terminology Bindings

PathDefinitionTypeReference
Library.type The type of knowledge asset this library containsExtensibleLibraryType
Library.status The status of the knowledge assetRequiredLibraryStatus

14.3.4 Search Parameters

Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.

NameTypeDescriptionPaths
descriptionstringText search against the descriptionLibrary.description
identifiertokenLogical identifier for the module (e.g. CMS-143)Library.identifier
statustokenStatus of the moduleLibrary.status
titlestringText search against the titleLibrary.title
topictokenTopics associated with the moduleLibrary.topic
versionstringVersion of the module (e.g. 1.0.0)Library.version