This page is part of the FHIR Specification (v1.8.0: STU 3 Draft). 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 R2
Detailed Descriptions for the elements in the Bundle resource.
Bundle | |
Definition | A container for a collection of resources. |
Control | 1..1 |
Summary | true |
Invariants | Defined on this element bdl-1: total only when a search or history (expression : total.empty() or (type = 'searchset') or (type = 'history'), xpath: not(f:total) or (f:type/@value = 'searchset') or (f:type/@value = 'history')) bdl-2: entry.search only when a search (expression : entry.search.empty() or (type = 'searchset'), xpath: not(f:entry/f:search) or (f:type/@value = 'searchset')) bdl-3: entry.request only for some types of bundles (expression : entry.request.empty() or type = 'batch' or type = 'transaction' or type = 'history', xpath: not(f:entry/f:request) or (f:type/@value = 'batch') or (f:type/@value = 'transaction') or (f:type/@value = 'history')) bdl-4: entry.response only for some types of bundles (expression : entry.response.empty() or type = 'batch-response' or type = 'transaction-response', xpath: not(f:entry/f:response) or (f:type/@value = 'batch-response') or (f:type/@value = 'transaction-response')) bdl-7: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (expression : entry.where(fullUrl).select(fullUrl&resource.meta.versionId).isDistinct(), xpath: count(for $entry in f:entry[f:resource] return $entry[count(parent::f:Bundle/f:entry[f:fullUrl/@value=$entry/f:fullUrl/@value and ((not(f:resource/*/f:meta/f:versionId/@value) and not($entry/f:resource/*/f:meta/f:versionId/@value)) or f:resource/*/f:meta/f:versionId/@value=$entry/f:resource/*/f:meta/f:versionId/@value)])!=1])=0) bdl-9: A document must have an identifier with a system and a value (expression : type = 'document' implies (identifier.system.exists() and identifier.value.exists()), xpath: not(f:type/@value = 'document') or exists(f:identifier/f:system) or exists(f:identifier/f:value)) |
Bundle.type | |
Definition | Indicates the purpose of this bundle- how it was intended to be used. |
Control | 1..1 |
Terminology Binding | BundleType (Required) |
Type | code |
Summary | true |
Comments | 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. |
Bundle.identifier | |
Definition | A persistent identifier for the batch that won't change as a batch is copied from server to server. |
Note | This is a business identifer, not a resource identifier (see discussion) |
Control | 0..1 |
Type | Identifier |
Summary | true |
Comments | 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. |
Bundle.total | |
Definition | If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle). |
Control | 0..1 |
Type | unsignedInt |
Summary | true |
Comments | 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. |
Invariants | Affect this element bdl-1: total only when a search or history (expression : total.empty() or (type = 'searchset') or (type = 'history'), xpath: not(f:total) or (f:type/@value = 'searchset') or (f:type/@value = 'history')) |
Bundle.link | |
Definition | A series of links that provide context to this bundle. |
Control | 0..* |
Summary | true |
Bundle.link.relation | |
Definition | A name which details the functional use for this link - see http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1 . |
Control | 1..1 |
Type | string |
Summary | true |
Bundle.link.url | |
Definition | The reference details for the link. |
Control | 1..1 |
Type | uri |
Summary | true |
Bundle.entry | |
Definition | An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only). |
Control | 0..* |
Summary | true |
Invariants | Defined on this element bdl-5: must be a resource unless there's a request or response (expression : resource.exists() or request.exists() or response.exists(), xpath: exists(f:resource) or exists(f:request) or exists(f:response)) bdl-8: fullUrl cannot be a version specific reference (expression : fullUrl.contains('/_history/').not(), xpath: not(exists(f:fullUrl[contains(@value, '/_history/')]))) |
Bundle.entry.link | |
Definition | A series of links that provide context to this entry. |
Control | 0..* |
Type | See Bundle.link |
Summary | true |
Bundle.entry.fullUrl | |
Definition | The Absolute URL for the resource. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource. The fullUrl element SHALL have a value except that: * fullUrl can be empty on a POST (although it does not need to when specifying a temporary id for reference in the bundle) * Results from operations might involve resources that are not identified. |
Control | 0..1 |
Type | uri |
Summary | true |
Comments | fullUrl may 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 absolute URL may not end with the logical id of the resource (Resource.id), but if the fullUrl does look like a RESTful server URL (e.g. meets the regex, then it SHALL end with the Resource.id. |
Bundle.entry.resource | |
Definition | The Resources for the entry. |
Control | 0..1 |
Type | Resource |
Summary | true |
Bundle.entry.search | |
Definition | Information about the search process that lead to the creation of this entry. |
Control | 0..1 |
Summary | true |
Invariants | Affect this element bdl-2: entry.search only when a search (expression : entry.search.empty() or (type = 'searchset'), xpath: not(f:entry/f:search) or (f:type/@value = 'searchset')) |
Bundle.entry.search.mode | |
Definition | Why this entry is in the result set - whether it's included as a match or because of an _include requirement. |
Control | 0..1 |
Terminology Binding | SearchEntryMode (Required) |
Type | code |
Summary | true |
Comments | 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. |
Bundle.entry.search.score | |
Definition | When searching, the server's search ranking score for the entry. |
Control | 0..1 |
Type | decimal |
Summary | true |
Comments | 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. |
Bundle.entry.request | |
Definition | Additional information about how this entry should be processed as part of a transaction. |
Control | 0..1 |
Summary | true |
Invariants | Affect this element bdl-3: entry.request only for some types of bundles (expression : entry.request.empty() or type = 'batch' or type = 'transaction' or type = 'history', xpath: not(f:entry/f:request) or (f:type/@value = 'batch') or (f:type/@value = 'transaction') or (f:type/@value = 'history')) |
Bundle.entry.request.method | |
Definition | The HTTP verb for this entry in either a change history, or a transaction/ transaction response. |
Control | 1..1 |
Terminology Binding | HTTPVerb (Required) |
Type | code |
Summary | true |
Bundle.entry.request.url | |
Definition | The URL for this entry, relative to the root (the address to which the request is posted). |
Control | 1..1 |
Type | uri |
Summary | true |
Comments | 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]". |
Bundle.entry.request.ifNoneMatch | |
Definition | If the ETag values match, return a 304 Not modified status. See the API documentation for "Conditional Read". |
Control | 0..1 |
Type | string |
Summary | true |
Bundle.entry.request.ifModifiedSince | |
Definition | Only perform the operation if the last updated date matches. See the API documentation for "Conditional Read". |
Control | 0..1 |
Type | instant |
Summary | true |
Bundle.entry.request.ifMatch | |
Definition | Only perform the operation if the Etag value matches. For more information, see the API section "Managing Resource Contention". |
Control | 0..1 |
Type | string |
Summary | true |
Bundle.entry.request.ifNoneExist | |
Definition | Instruct 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 "?"). |
Control | 0..1 |
Type | string |
Summary | true |
Bundle.entry.response | |
Definition | Additional information about how this entry should be processed as part of a transaction. |
Control | 0..1 |
Summary | true |
Invariants | Affect this element bdl-4: entry.response only for some types of bundles (expression : entry.response.empty() or type = 'batch-response' or type = 'transaction-response', xpath: not(f:entry/f:response) or (f:type/@value = 'batch-response') or (f:type/@value = 'transaction-response')) |
Bundle.entry.response.status | |
Definition | The 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. |
Control | 1..1 |
Type | string |
Summary | true |
Bundle.entry.response.location | |
Definition | The location header created by processing this operation. |
Control | 0..1 |
Type | uri |
Summary | true |
Bundle.entry.response.etag | |
Definition | The etag for the resource, it the operation for the entry produced a versioned resource (see Resource Metadata and Versioning and Managing Resource Contention). |
Control | 0..1 |
Type | string |
Summary | true |
Comments | Etags match the Resource.meta.versionId. The ETag has to match the version id in the header if a resource is included. |
Bundle.entry.response.lastModified | |
Definition | The date/time that the resource was modified on the server. |
Control | 0..1 |
Type | instant |
Summary | true |
Comments | This has to match the same time in the meta header if a resource is included. |
Bundle.entry.response.outcome | |
Definition | An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction. |
Control | 0..1 |
Type | Resource |
Summary | true |
Comments | For a POST/PUT operation, this is the equivalent outcome that would be returned for prefer = oprationoutcome - except that the resource is always returned whether or not the outcome is returned. |
Bundle.signature | |
Definition | Digital Signature - base64 encoded. XML DigSIg or a JWT. |
Control | 0..1 |
Type | Signature |
Requirements | This element allows capturing signatures on documents. It also allows signatures on messages, transactions or even query responses. It may 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. |
Summary | true |
Comments | 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. |