FHIR Documents
This is the FHIR method of exchanging clinical documents. where content to be exchanged is wrapped by a Composition that provides the context of the content, and that has a fixed presentation for a human reader. The document framework is provided to help with computer-assisted human to human communication uses - which are not uncommon in healthcare.
Typically, exchanging documents is associated with exchanging clinical information across NHS organisation and care setting boundaries (e.g., Transfer of Care), while data-based exchange using the RESTful API is appropriate within where there are well established clinical governance arrangements.
The FHIR document is a FHIR Bundle with the type of document
Profile url |
---|
https://fhir.nhs.uk/StructureDefinition/NHSDigital-Bundle-FHIRDocument |
Bundle | I | Bundle | There are no (further) constraints on this element Element IdBundle Contains a collection of resources DefinitionA container for a collection of resources.
| |
identifier | Σ | 0..1 | Identifier | There are no (further) constraints on this element Element IdBundle.identifier Persistent identifier for the bundle DefinitionA persistent identifier for the bundle that won't change as a bundle is copied from server to server. Persistent identity generally only matters for batches of type Document, Message, and Collection. It would not normally be populated for search and history results and servers ignore Bundle.identifier when processing batches and transactions. For Documents the .identifier SHALL be populated such that the .identifier is globally unique.
|
type | Σ | 1..1 | codeBindingFixed Value | Element IdBundle.type document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection DefinitionIndicates the purpose of this bundle - how it is intended to be used. It's possible to use a bundle for other purposes (e.g. a document can be accepted as a transaction). This is primarily defined so that there can be specific rules for some of the bundle types. Indicates the purpose of a bundle - how it is intended to be used. BundleType (required)Constraints
document
|
timestamp | Σ | 0..1 | instant | There are no (further) constraints on this element Element IdBundle.timestamp When the bundle was assembled DefinitionThe date/time that the bundle was assembled - i.e. when the resources were placed in the bundle. For many bundles, the timestamp is equal to .meta.lastUpdated, because they are not stored (e.g. search results). When a bundle is placed in a persistent store, .meta.lastUpdated will be usually be changed by the server. When the bundle is a message, a middleware agent altering the message (even if not stored) SHOULD update .meta.lastUpdated. .timestamp is used to track the original time of the Bundle, and SHOULD be populated. Usage:
The timestamp value should be greater than the lastUpdated and other timestamps in the resources in the bundle, and it should be equal or earlier than the .meta.lastUpdated on the Bundle itself.
|
total | Σ I | 0..1 | unsignedInt | There are no (further) constraints on this element Element IdBundle.total If search, the total number of matches DefinitionIf a set of search matches, this is the total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle. Only used if the bundle is a search result set. The total does not include resources such as OperationOutcome and included resources, only the total number of matching resources.
|
link | Σ | 0..0 | BackboneElement | There are no (further) constraints on this element Element IdBundle.link Links related to this Bundle DefinitionA series of links that provide context to this bundle. Both Bundle.link and Bundle.entry.link are defined to support providing additional context when Bundles are used (e.g. HATEOAS). Bundle.entry.link corresponds to links found in the HTTP header if the resource in the entry was read directly. This specification defines some specific uses of Bundle.link for searching and paging, but no specific uses for Bundle.entry.link, and no defined function in a transaction - the meaning is implementation specific.
|
entry | Σ I | 2..* | BackboneElement | Element IdBundle.entry Entry in the bundle - will have a resource or information DefinitionAn entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only). Unordered, Open, by resource.resolve()(Profile) Constraints
|
(All Slices) | There are no (further) constraints on this element | |||
link | Σ | 0..0 | see (link) | There are no (further) constraints on this element Element IdBundle.entry.link Links related to this entry DefinitionA series of links that provide context to this entry. |
fullUrl | Σ | 1..1 | uri | There are no (further) constraints on this element Element IdBundle.entry.fullUrl URI for resource (Absolute URL server address or URI for UUID/OID) DefinitionThe Absolute URL for the resource. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that:
fullUrl might not be unique in the context of a resource. Note that since FHIR resources do not need to be served through the FHIR API, the fullURL might be a URN or an absolute URL that does not end with the logical id of the resource (Resource.id). However, but if the fullUrl does look like a RESTful server URL (e.g. meets the regex, then the 'id' portion of the fullUrl SHALL end with the Resource.id. Note that the fullUrl is not the same as the canonical URL - it's an absolute url for an endpoint serving the resource (these will happen to have the same value on the canonical server for the resource with the canonical URL).
|
resource | Σ | 0..1 | Resource | There are no (further) constraints on this element Element IdBundle.entry.resource A resource in the bundle DefinitionThe Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type.
|
search | Σ I | 0..1 | BackboneElement | There are no (further) constraints on this element Element IdBundle.entry.search Search related information DefinitionInformation about the search process that lead to the creation of this entry.
|
mode | Σ | 0..1 | codeBinding | There are no (further) constraints on this element Element IdBundle.entry.search.mode match | include | outcome - why this is in the result set DefinitionWhy this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process. There is only one mode. In some corner cases, a resource may be included because it is both a match and an include. In these circumstances, 'match' takes precedence. Why an entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process. SearchEntryMode (required)Constraints
|
score | Σ | 0..1 | decimal | There are no (further) constraints on this element Element IdBundle.entry.search.score Search ranking (between 0 and 1) DefinitionWhen searching, the server's search ranking score for the entry. Servers are not required to return a ranking score. 1 is most relevant, and 0 is least relevant. Often, search results are sorted by score, but the client may specify a different sort order. See Patient Match for the EMPI search which relates to this element.
|
request | Σ I | 0..1 | BackboneElement | There are no (further) constraints on this element Element IdBundle.entry.request Additional execution information (transaction/batch/history) DefinitionAdditional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry.
|
method | Σ | 1..1 | codeBinding | There are no (further) constraints on this element Element IdBundle.entry.request.method GET | HEAD | POST | PUT | DELETE | PATCH DefinitionIn a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred. Note that FHIR strings SHALL NOT exceed 1MB in size HTTP verbs (in the HTTP command line). See [HTTP rfc](https://tools.ietf.org/html/rfc7231) for details. HTTPVerb (required)Constraints
|
url | Σ | 1..1 | uri | There are no (further) constraints on this element Element IdBundle.entry.request.url URL for HTTP equivalent of this entry DefinitionThe URL for this entry, relative to the root (the address to which the request is posted). E.g. for a Patient Create, the method would be "POST" and the URL would be "Patient". For a Patient Update, the method would be PUT and the URL would be "Patient/[id]".
|
ifNoneMatch | Σ | 0..1 | string | There are no (further) constraints on this element Element IdBundle.entry.request.ifNoneMatch For managing cache currency DefinitionIf the ETag values match, return a 304 Not Modified status. See the API documentation for "Conditional Read". Note that FHIR strings SHALL NOT exceed 1MB in size
|
ifModifiedSince | Σ | 0..1 | instant | There are no (further) constraints on this element Element IdBundle.entry.request.ifModifiedSince For managing cache currency DefinitionOnly perform the operation if the last updated date matches. See the API documentation for "Conditional Read". Note: This is intended for where precisely observed times are required, typically system logs etc., and not human-reported times - for them, see date and dateTime (which can be as precise as instant, but is not required to be) below. Time zone is always required
|
ifMatch | Σ | 0..1 | string | There are no (further) constraints on this element Element IdBundle.entry.request.ifMatch For managing update contention DefinitionOnly perform the operation if the Etag value matches. For more information, see the API section "Managing Resource Contention". Note that FHIR strings SHALL NOT exceed 1MB in size
|
ifNoneExist | Σ | 0..1 | string | There are no (further) constraints on this element Element IdBundle.entry.request.ifNoneExist For conditional creates DefinitionInstruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for "Conditional Create". This is just the query portion of the URL - what follows the "?" (not including the "?"). Note that FHIR strings SHALL NOT exceed 1MB in size
|
response | Σ I | 0..1 | BackboneElement | There are no (further) constraints on this element Element IdBundle.entry.response Results of execution (transaction/batch/history) DefinitionIndicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history.
|
status | Σ | 1..1 | string | There are no (further) constraints on this element Element IdBundle.entry.response.status Status response code (text optional) DefinitionThe status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code. Note that FHIR strings SHALL NOT exceed 1MB in size
|
location | Σ | 0..1 | uri | There are no (further) constraints on this element Element IdBundle.entry.response.location The location (if the operation returns a location) DefinitionThe location header created by processing this operation, populated if the operation returns a location. see http://en.wikipedia.org/wiki/Uniform_resource_identifier
|
etag | Σ | 0..1 | string | There are no (further) constraints on this element Element IdBundle.entry.response.etag The Etag for the resource (if relevant) DefinitionThe Etag for the resource, if the operation for the entry produced a versioned resource (see Resource Metadata and Versioning and Managing Resource Contention). Etags match the Resource.meta.versionId. The ETag has to match the version id in the header if a resource is included.
|
lastModified | Σ | 0..1 | instant | There are no (further) constraints on this element Element IdBundle.entry.response.lastModified Server's date time modified DefinitionThe date/time that the resource was modified on the server. This has to match the same time in the meta header (meta.lastUpdated) if a resource is included.
|
outcome | Σ | 0..1 | Resource | There are no (further) constraints on this element Element IdBundle.entry.response.outcome OperationOutcome with hints and warnings (for batch/transaction) DefinitionAn OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction. For a POST/PUT operation, this is the equivalent outcome that would be returned for prefer = operationoutcome - except that the resource is always returned whether or not the outcome is returned. This outcome is not used for error responses in batch/transaction, only for hints and warnings. In a batch operation, the error will be in Bundle.entry.response, and for transaction, there will be a single OperationOutcome instead of a bundle in the case of an error.
|
composition | Σ I | 1..* | BackboneElement | There are no (further) constraints on this element Element IdBundle.entry:composition Entry in the bundle - will have a resource or information DefinitionAn entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).
|
link | Σ | 0..* | see (link) | There are no (further) constraints on this element Element IdBundle.entry:composition.link Links related to this entry DefinitionA series of links that provide context to this entry. |
fullUrl | Σ | 0..1 | uri | There are no (further) constraints on this element Element IdBundle.entry:composition.fullUrl URI for resource (Absolute URL server address or URI for UUID/OID) DefinitionThe Absolute URL for the resource. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that:
fullUrl might not be unique in the context of a resource. Note that since FHIR resources do not need to be served through the FHIR API, the fullURL might be a URN or an absolute URL that does not end with the logical id of the resource (Resource.id). However, but if the fullUrl does look like a RESTful server URL (e.g. meets the regex, then the 'id' portion of the fullUrl SHALL end with the Resource.id. Note that the fullUrl is not the same as the canonical URL - it's an absolute url for an endpoint serving the resource (these will happen to have the same value on the canonical server for the resource with the canonical URL).
|
resource | Σ I | 0..1 | NHSDigitalComposition | Element IdBundle.entry:composition.resource A set of resources composed into a single coherent clinical statement with clinical attestation DefinitionA set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition SHALL be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition SHALL be included as subsequent entries in the Bundle, for example Patient, Practitioner, Encounter, etc. While the focus of this specification is on patient-specific clinical statements, this resource can also apply to other healthcare-related statements such as study protocol designs, healthcare invoices and other activities that are not necessarily patient-specific or clinical.
|
search | Σ I | 0..1 | BackboneElement | There are no (further) constraints on this element Element IdBundle.entry:composition.search Search related information DefinitionInformation about the search process that lead to the creation of this entry.
|
mode | Σ | 0..1 | codeBinding | There are no (further) constraints on this element Element IdBundle.entry:composition.search.mode match | include | outcome - why this is in the result set DefinitionWhy this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process. There is only one mode. In some corner cases, a resource may be included because it is both a match and an include. In these circumstances, 'match' takes precedence. Why an entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process. SearchEntryMode (required)Constraints
|
score | Σ | 0..1 | decimal | There are no (further) constraints on this element Element IdBundle.entry:composition.search.score Search ranking (between 0 and 1) DefinitionWhen searching, the server's search ranking score for the entry. Servers are not required to return a ranking score. 1 is most relevant, and 0 is least relevant. Often, search results are sorted by score, but the client may specify a different sort order. See Patient Match for the EMPI search which relates to this element.
|
request | Σ I | 0..1 | BackboneElement | There are no (further) constraints on this element Element IdBundle.entry:composition.request Additional execution information (transaction/batch/history) DefinitionAdditional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry.
|
method | Σ | 1..1 | codeBinding | There are no (further) constraints on this element Element IdBundle.entry:composition.request.method GET | HEAD | POST | PUT | DELETE | PATCH DefinitionIn a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred. Note that FHIR strings SHALL NOT exceed 1MB in size HTTP verbs (in the HTTP command line). See [HTTP rfc](https://tools.ietf.org/html/rfc7231) for details. HTTPVerb (required)Constraints
|
url | Σ | 1..1 | uri | There are no (further) constraints on this element Element IdBundle.entry:composition.request.url URL for HTTP equivalent of this entry DefinitionThe URL for this entry, relative to the root (the address to which the request is posted). E.g. for a Patient Create, the method would be "POST" and the URL would be "Patient". For a Patient Update, the method would be PUT and the URL would be "Patient/[id]".
|
ifNoneMatch | Σ | 0..1 | string | There are no (further) constraints on this element Element IdBundle.entry:composition.request.ifNoneMatch For managing cache currency DefinitionIf the ETag values match, return a 304 Not Modified status. See the API documentation for "Conditional Read". Note that FHIR strings SHALL NOT exceed 1MB in size
|
ifModifiedSince | Σ | 0..1 | instant | There are no (further) constraints on this element Element IdBundle.entry:composition.request.ifModifiedSince For managing cache currency DefinitionOnly perform the operation if the last updated date matches. See the API documentation for "Conditional Read". Note: This is intended for where precisely observed times are required, typically system logs etc., and not human-reported times - for them, see date and dateTime (which can be as precise as instant, but is not required to be) below. Time zone is always required
|
ifMatch | Σ | 0..1 | string | There are no (further) constraints on this element Element IdBundle.entry:composition.request.ifMatch For managing update contention DefinitionOnly perform the operation if the Etag value matches. For more information, see the API section "Managing Resource Contention". Note that FHIR strings SHALL NOT exceed 1MB in size
|
ifNoneExist | Σ | 0..1 | string | There are no (further) constraints on this element Element IdBundle.entry:composition.request.ifNoneExist For conditional creates DefinitionInstruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for "Conditional Create". This is just the query portion of the URL - what follows the "?" (not including the "?"). Note that FHIR strings SHALL NOT exceed 1MB in size
|
response | Σ I | 0..1 | BackboneElement | There are no (further) constraints on this element Element IdBundle.entry:composition.response Results of execution (transaction/batch/history) DefinitionIndicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history.
|
status | Σ | 1..1 | string | There are no (further) constraints on this element Element IdBundle.entry:composition.response.status Status response code (text optional) DefinitionThe status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code. Note that FHIR strings SHALL NOT exceed 1MB in size
|
location | Σ | 0..1 | uri | There are no (further) constraints on this element Element IdBundle.entry:composition.response.location The location (if the operation returns a location) DefinitionThe location header created by processing this operation, populated if the operation returns a location. see http://en.wikipedia.org/wiki/Uniform_resource_identifier
|
etag | Σ | 0..1 | string | There are no (further) constraints on this element Element IdBundle.entry:composition.response.etag The Etag for the resource (if relevant) DefinitionThe Etag for the resource, if the operation for the entry produced a versioned resource (see Resource Metadata and Versioning and Managing Resource Contention). Etags match the Resource.meta.versionId. The ETag has to match the version id in the header if a resource is included.
|
lastModified | Σ | 0..1 | instant | There are no (further) constraints on this element Element IdBundle.entry:composition.response.lastModified Server's date time modified DefinitionThe date/time that the resource was modified on the server. This has to match the same time in the meta header (meta.lastUpdated) if a resource is included.
|
outcome | Σ | 0..1 | Resource | There are no (further) constraints on this element Element IdBundle.entry:composition.response.outcome OperationOutcome with hints and warnings (for batch/transaction) DefinitionAn OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction. For a POST/PUT operation, this is the equivalent outcome that would be returned for prefer = operationoutcome - except that the resource is always returned whether or not the outcome is returned. This outcome is not used for error responses in batch/transaction, only for hints and warnings. In a batch operation, the error will be in Bundle.entry.response, and for transaction, there will be a single OperationOutcome instead of a bundle in the case of an error.
|
patient | Σ I | 1..* | BackboneElement | There are no (further) constraints on this element Element IdBundle.entry:patient Entry in the bundle - will have a resource or information DefinitionAn entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).
|
link | Σ | 0..* | see (link) | There are no (further) constraints on this element Element IdBundle.entry:patient.link Links related to this entry DefinitionA series of links that provide context to this entry. |
fullUrl | Σ | 0..1 | uri | There are no (further) constraints on this element Element IdBundle.entry:patient.fullUrl URI for resource (Absolute URL server address or URI for UUID/OID) DefinitionThe Absolute URL for the resource. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that:
fullUrl might not be unique in the context of a resource. Note that since FHIR resources do not need to be served through the FHIR API, the fullURL might be a URN or an absolute URL that does not end with the logical id of the resource (Resource.id). However, but if the fullUrl does look like a RESTful server URL (e.g. meets the regex, then the 'id' portion of the fullUrl SHALL end with the Resource.id. Note that the fullUrl is not the same as the canonical URL - it's an absolute url for an endpoint serving the resource (these will happen to have the same value on the canonical server for the resource with the canonical URL).
|
resource | Σ I | 0..1 | NHSDigitalPatient | Element IdBundle.entry:patient.resource Information about an individual or animal receiving health care services Alternate namesSubjectOfCare Client Resident DefinitionDemographics and other administrative information about an individual or animal receiving care or other health-related services.
|
search | Σ I | 0..0 | BackboneElement | There are no (further) constraints on this element Element IdBundle.entry:patient.search Search related information DefinitionInformation about the search process that lead to the creation of this entry.
|
request | Σ I | 0..0 | BackboneElement | There are no (further) constraints on this element Element IdBundle.entry:patient.request Additional execution information (transaction/batch/history) DefinitionAdditional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry.
|
response | Σ I | 0..0 | BackboneElement | There are no (further) constraints on this element Element IdBundle.entry:patient.response Results of execution (transaction/batch/history) DefinitionIndicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history.
|
signature | Σ | 0..1 | Signature | There are no (further) constraints on this element Element IdBundle.signature Digital Signature DefinitionDigital Signature - base64 encoded. XML-DSig or a JWT. A Signature holds an electronic representation of a signature and its supporting context in a FHIR accessible form. The signature may either be a cryptographic type (XML DigSig or a JWS), which is able to provide non-repudiation proof, or it may be a graphical image that represents a signature or a signature process. This element allows capturing signatures on documents, messages, transactions or even search responses, to support content-authentication, non-repudiation or other business cases. This is primarily relevant where the bundle may travel through multiple hops or via other mechanisms where HTTPS non-repudiation is insufficient. The signature could be created by the "author" of the bundle or by the originating device. Requirements around inclusion of a signature, verification of signatures and treatment of signed/non-signed bundles is implementation-environment specific.
|
The FHIR Documents are exchanged using FHIR Messaging (which is also a FHIR Bundle of type of message
), as shown in the diagram below:
The NHSDigital-Composition is subdivided into sections which are equivalent to PRSB headings.