View raw Markdown
type: resourceresource: Library

Library

Introduction

Scope and Usage

The Library resource is a general purpose knowledge artifact that can fulfill a variety of use cases, including managing collections of artifacts, providing a FHIR wrapper for non-FHIR knowledge artifacts, and describing logic and interaction capabilities of knowledge modules. For example, a Library may be used to wrap a non-FHIR representation, such as a shareable library of clinical logic, written in Clinical Quality Language (CQL). In addition, a Library may be used to refer to artifacts defined using FHIR resources such as the description of a protocol represented by a PlanDefinition resource.

As a CanonicalResource and MetadataResource, a Library has all the typical metadata such as url, identifier, version, and title. In addition, 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.

For non-FHIR assets, 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.

A common use case for the Library resource is to establish the release dependencies of a collection of artifacts. A library with a type of asset-collection can be used to define the collection of artifacts, as well as the required dependencies, especially when the artifacts in the collection have version-independent canonical references, as is often the case with CodeSystem and ValueSet references. This usage is known as an artifact manifest, and is described more fully in the Artifact Manifest topic of the Canonical Resource Management Infrastructure implementation guide.

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, multimedia content, or other raw binary content.

Background and Context

Provides additional detail on exactly how the resource is to be used

StructureDefinition

Elements (Simplified)

Mappings

Operations

Full Operations

Resource Packs

list-Library-packs.xml

<?xml version="1.0" encoding="UTF-8"?>

<List xmlns="http://hl7.org/fhir">
  <id value="Library-packs"/>
  <status value="current"/>
  <mode value="working"/>
</List>

Search Parameters

Full Search Parameters

Examples

Full Examples

Mapping Exceptions

library-definition-mapping-exceptions.xml

Divergent Elements

Unmapped Elements

library-fivews-mapping-exceptions.xml

Unmapped Elements