Page tree
Skip to end of metadata
Go to start of metadata


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 RelatedResource data type, which may reference a FHIR Resource, or an Attachment, which is either referenced with a url, or 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.

The intent of the resource is to establish a standard mechanism to enable the sharing of clinical knowledge content that is not represented in FHIR resources. It is used throughout the clinical reasoning module to allow CQL to be referenced and incorporated into clinical artifacts.

Owning committee name

Clinical Decision Support Work Group

Committee Approval Date:

Contributing or Reviewing Work Groups

FHIR Resource Development Project Insight ID

1234: FHIR-Based Clinical Quality Framework (CQF-on-FHIR)

Scope of coverage

A Library is a knowledge artifact that enables automated sharing of non-FHIR-based clinical knowledge. Because it is definitional in nature, it is not a patient-specific resource. The resource describes metadata and content and is flexible enough to be used for any discipline and locale. It is intended to be used by decision support and quality improvement content providers as a means of distributing computable representations of clinical logic, as well as by health care delivery and reporting systems as a means of automtically integrating clinical logic.

Although Library resources are capable of being used independently (to distribute shared logic, for example), they will often be packaged with other knowledge artifacts such as ActivityDefinition, PlanDefinition, and Measure.

RIM scope

Resource appropriateness

Clinical quality measurement and improvement is a broad domain encompassing many aspects of overall healthcare. From decision support services and functionality to quality measurement and reporting, all these aspects make extensive use of logic to describe behavior and reasoning. Several existing HL7 Standards make use of Clinical Quality Language to represent this logic in various knowledge artifacts, and enabling that content to be published as a FHIR resource will extend the reach of that content. In addition, defining a general purpose Library resource will enable another potential role of a FHIR server as a Knowledge Repository.

Expected implementations

Multiple decision support and quality measurement content providers have expressed interest in using the Library resource to enable standards-based distribution of Clinical Quality Language libraries.

Content sources

Example Scenarios

Exclusive Breastfeeding

Numerous studies document the benefits of exclusive breastfeeding for the first six months of life. A quality measure (CMS9v4) has been developed to attempt to determine the extent to which exclusive breastfeeding takes place. This measure has been translated into CQL and several derived decision support rules have been developed with the intention of ensuring that appropriate education regarding the benefits of exclusive breastfeeding is provided to all new mothers. In combination with the Measure and DecisionSupportRule resources, this codified clinical knowledge can be distributed to and integrated in various healthcare delivery systems to support improved outcomes for this guideline.

This scenario is a focus of the CQF-on-FHIR track at the September 2016 connectathon.

Resource Relationships

The Library resource is used by the following resources:

In addition, the resource makes use of the following common data types:


September 2016 Ballot Cycle in support of the CQF IG.

gForge Users