Bundle | Medplum

On this page

A container for a collection of resources.

Elements

Name Required Type Description
identifier Identifier Persistent identifier for the bundle
Details
A 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 code document
Details
Indicates 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.
timestamp instant When the bundle was assembled
Details
The 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:

Search Parameters

Name Type Description Expression
composition reference The first resource in the bundle, if the bundle type is "document" - this is a composition, and this parameter provides access to search its contents Bundle.entry[0].resource
identifier token Persistent identifier for the bundle Bundle.identifier
message reference The first resource in the bundle, if the bundle type is "message" - this is a message header, and this parameter provides access to search its contents Bundle.entry[0].resource
timestamp date When the bundle was assembled Bundle.timestamp
type token document message

Inherited Elements

Name Required Type Description
id string Logical id of this artifact
Details
The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
The only time that a resource does not have an id is when it is being submitted to the server using a create operation.
meta Meta Metadata about the resource
Details
The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.
implicitRules uri A set of rules under which this content was created
Details
A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.
Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of its narrative along with other profiles, value sets, etc.
language code Language of the resource content
Details
The base language in which the resource is written.
Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).