Documents


Introduction


FHIR supports multiple exchange paradigms, which are all equally valid: REST, Documents, Messages and Services. Documents are important in clinical workflows. In this module you will learn more about the Document framework. Topics covered in this module are:

  • Document structure
  • Document resources
  • Document profiles

Reading material


1. FHIR Document Framework

The FHIR Document Framework allows the exchange of clinical and non-clinical documents, like a clinical referral letter, a clinical request form or a set of practice guidelines.

1.1 What is a FHIR Document?

A FHIR document is a structured set of coherent information authored and assembled in FHIR. After their creation, FHIR documents cannot be changed. FHIR documents are immutable and provide a fixed representation of a set of resources. FHIR documents can be authored and/or attested by humans, organizations or devices. It is also possible to sign them with digital signatures.

1.2 Document characteristics

Documents have a couple of characteristics which are supported by the FHIR Document Framework:

  • Persistency; a document continues to exist in an unaltered state for a specific time period defined by local and regulatory requirements. They must be stored and reproduced on demand.
  • Stewardship; a document is maintained by a trusted organization.
  • Authentication; a document is an assemblage of information intended to be legally authenticated.
  • Context; a document establishes the default context for its content.
  • Wholeness; authentication of a document will apply to the document as a whole and not to parts of the document without the full context.
  • Human readable; a document should be human readable.

1.3 Dual nature of data

The FHIR Document Framework supports the duality of a clinical record. On one hand, clinical records contain structured, coded data, which is needed to drive applications. On the other hand, clinical records contain unstructured, hand-written data which is valuable to human beings. Although engineers believe in structured data that is easy to exchange and reuse, clinicians believe that the hand-written narratives of their colleagues are the most important part of the clinical record.

2. FHIR Document Bundle

2.1 Document structure

A FHIR Document is a Bundle of type Document. The first entry of the Bundle is a Composition resource. The Composition resource is the foundation of the FHIR document representing its 'table of contents'. It contains information about its purpose and context as well as key information like subject, author and attester. The Composition resource divides the document into sections, each with their own narrative.

The Composition resource is followed by other resources referenced from the Composition resource. The Document Bundle should include at least every resource with a direct reference from the Composition resource. In addition, resources which have an indirect reference from the Composition resource may be added. For example, the Document Bundle should include the Composition subject and every entry of each section. The Document Bundle may or may not include the subject’s primary care provider (assuming the subject is a Patient).

<Bundle>
    <meta />
    <type value="Document" />
    <entry>
        <Composition />
    </entry>
    <entry>
        <Patient />
    </entry>
    <entry>
        <Condition />
    </entry>
    <entry>
        <Observation />
    </entry>
</Bundle>

2.2 Attested content

FHIR documents should contain a machine computable and a human readable part. The human readable presentation of a document should include:

  1. The narrative of the resource that is in the subject of the document
  2. The narrative of the Composition resource
  3. The narratives of each section in the Composition resource

Due to the nature and characteristics of a document, this content is called the attested content. Document bundles contain at least the attested content, but they may also include additional resources.

Note that, like in any other resource, the narratives are XHTML fragments. The FHIR XML Tools reference implementation includes a XSLT transform that can convert XML documents into browser-ready XHTML. You can find it on the downloads page.

3. Document resources

3.1 Composition

FHIR documents are built from FHIR resources using the Composition resource. The Composition resource organizes clinical and administrative content into sections, each of which contains a narrative, and references other resources for supporting data. While a Composition defines the structure, it does not actually contain the content: rather the full content of a document is contained in the Document Bundle, of which the Composition is the first resource contained.

The Composition resource includes at least the following information:

  • Type of document (e.g. a discharge summary or a nurse transfer note)
  • Subject the document is about (e.g. a specific patient)
  • Date of editing the composition
  • Author of the document
  • Custodian (i.e. the maintaining organization)
  • Sections with narratives and references to supporting resources (note that this element is not mandatory, but a Composition without any section would result in an empty document)

3.2 Document reference

FHIR defines a document format as described above as well as a document reference. While FHIR documents are documents authored and assembled in FHIR, the document reference resource is mainly intended for general references to pre-existing documents, like pdf files, CDA documents or FHIR documents stored elsewhere (i.e. in a XDS repository). Unstructured documents like pdf files are often stored as a binary resource.

3.3 Document manifest

The document manifest resource can be used to store a collection of (FHIR) documents. A document manifest contains a collection of document reference resources to group documents for specific purposes such as auditing or targeted delivery. For example, document manifest resources are used in document indexing systems, such as an in an XDS repository.

3.4 Other resources

Other resources used in the Document Framework are:

  • Bundle; as explained earlier Bundles of type Document contain the actual FHIR Document.
  • Binary; used to store binary documents
  • AuditEvent; used to track usage of documents in a registry or repository

4. Document profiles

Document profiles describe rules for documents with a specific purpose, e.g. a discharge summary. For example, you may either want to constrain the Composition resource to control its structure and sections or the Bundle resource to control the resources to include in your Document. In the case of a discharge summary you will likely constrain the subject to a Patient resource. In addition, you may want to include sections like admission details, diagnoses, discharge details, procedures and so on. For each section you may want to constrain the type of resource that is referenced (e.g. Encounter for admission details, Condition for diagnoses etc.). You may even want to make some of the sections mandatory. For example, information on allergies and adverse reactions.

Here below is an example of a discharge document by CareConnect. Take a look at the sections, the resource references and which parts are mandatory. This gives you an overall idea of how to use document profiles.

careSettingTypeExtensionS1..1Extension
useΣ ?!0..0codeBinding
systemΣ1..1uri
valueΣ1..1string
statusS Σ ?!1..1codeBinding
systemΣ1..1uri
versionΣ0..0string
codeΣ1..1code
displayΣ1..1string
userSelectedΣ0..1boolean
textΣ0..1string
systemΣ1..1uri
versionΣ0..1string
codeΣ1..1code
displayΣ1..1string
userSelectedΣ0..1boolean
textΣ0..1string
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
dateS Σ1..1dateTime
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
titleS Σ1..1string
confidentialityΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
codeΣ1..1codeBindingFixed Value
targetIdentifierIdentifier
targetReferenceReference(CareConnect-ITK-EDIS-Composition-1)
title0..1string
systemΣ0..1uri
versionΣ0..1string
codeΣ0..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..1codeBinding
systemΣ0..1uri
versionΣ0..1string
codeΣ0..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
referenceΣ0..1string
identifierΣ0..1Identifier
displayΣ0..1string
systemΣ0..1uri
versionΣ0..1string
codeΣ0..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
section0..*see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value
systemΣ1..1uriFixed Value
versionΣ0..0string
codeΣ1..1codeFixed Value
displayΣ1..1stringFixed Value
userSelectedΣ0..0boolean
textΣ0..0string
status1..1codeBinding
div1..1xhtml
modeΣ ?!0..0codeBinding
referenceΣ1..1string
identifierΣ0..1Identifier
displayΣ0..1string
section0..0see (section)
title1..1stringFixed Value