HL7 FHIR Implementation Guide: Data Access Policies
1.0.0-current - ci-build International flag

HL7 FHIR Implementation Guide: Data Access Policies, published by HL7 International / Security. This guide is not an authorized publication; it is the continuous build for version 1.0.0-current built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/data-access-policies/ and changes regularly. See the Directory of published versions

Resource Profile: BundleWithPermission - Detailed Descriptions

Page standards status: Informative Maturity Level: 0

Definitions for the dap.bundleWithPermission resource profile.

Guidance on how to interpret the contents of this table can be found here

0. Bundle
Definition

A container for a collection of resources.

ShortContains a collection of resources
Control0..*
Is Modifierfalse
Must Supportfalse
Summaryfalse
Invariantsbdl-1: total only when a search or history (total.empty() or (type = 'searchset') or (type = 'history'))
bdl-2: entry.search only when a search ((type = 'searchset') or entry.search.empty())
bdl-7: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles) ((type = 'history') or entry.where(fullUrl.exists()).select(fullUrl&iif(resource.meta.versionId.exists(), resource.meta.versionId, '')).isDistinct())
bdl-9: A document must have an identifier with a system and a value (type = 'document' implies (identifier.system.exists() and identifier.value.exists()))
bdl-10: A document must have a date (type = 'document' implies (timestamp.hasValue()))
bdl-11: A document must have a Composition as the first resource (type = 'document' implies entry.first().resource.is(Composition))
bdl-12: A message must have a MessageHeader as the first resource (type = 'message' implies entry.first().resource.is(MessageHeader))
bdl-13: A subscription-notification must have a SubscriptionStatus as the first resource (type = 'subscription-notification' implies entry.first().resource.is(SubscriptionStatus))
bdl-14: entry.request.method PATCH not allowed for history (type = 'history' implies entry.request.method != 'PATCH')
bdl-15: Bundle resources where type is not transaction, transaction-response, batch, or batch-response or when the request is a POST SHALL have Bundle.entry.fullUrl populated (type='transaction' or type='transaction-response' or type='batch' or type='batch-response' or entry.all(fullUrl.exists() or request.method='POST'))
bdl-16: Issue.severity for all issues within the OperationOutcome must be either 'information' or 'warning'. (issues.exists() implies (issues.issue.severity = 'information' or issues.issue.severity = 'warning'))
bdl-17: Use and meaning of issues for documents has not been validated because the content will not be rendered in the document. (type = 'document' implies issues.empty())
bdl-18: Self link is required for searchsets. (type = 'searchset' implies link.where(relation = 'self' and url.exists()).exists())
bdl-3a: For collections of type document, message, searchset or collection, all entries must contain resources, and not have request or response elements (type in ('document' | 'message' | 'searchset' | 'collection') implies entry.all(resource.exists() and request.empty() and response.empty()))
bdl-3b: For collections of type history, all entries must contain request or response elements, and resources if the method is POST, PUT or PATCH (type = 'history' implies entry.all(request.exists() and response.exists() and ((request.method in ('POST' | 'PATCH' | 'PUT')) = resource.exists())))
bdl-3c: For collections of type transaction or batch, all entries must contain request elements, and resources if the method is POST, PUT or PATCH (type in ('transaction' | 'batch') implies entry.all(request.method.exists() and ((request.method in ('POST' | 'PATCH' | 'PUT')) = resource.exists())))
bdl-3d: For collections of type transaction-response or batch-response, all entries must contain response elements (type in ('transaction-response' | 'batch-response') implies entry.all(response.exists()))
2. Bundle.implicitRules
Definition

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.

ShortA set of rules under which this content was created
Comments

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.

Control0..1
Typeuri
Is Modifiertrue because This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies its meaning or interpretation
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Must Supportfalse
Summarytrue
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
4. Bundle.type
Definition

Indicates the purpose of this bundle - how it is intended to be used.

Shortdocument | message | transaction | transaction-response | batch | batch-response | history | searchset | collection | subscription-notification
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.

Control1..1
This element is affected by the following invariants: bdl-1, bdl-2, bdl-3a, bdl-3b, bdl-3c, bdl-3d, bdl-7, bdl-9, bdl-10, bdl-11, bdl-12, bdl-13, bdl-14, bdl-15, bdl-17, bdl-18
BindingThe codes SHALL be taken from BundleTypehttp://hl7.org/fhir/ValueSet/bundle-type|6.0.0-ballot2
(required to http://hl7.org/fhir/ValueSet/bundle-type|6.0.0-ballot2)

Indicates the purpose of a bundle - how it is intended to be used.

Typecode
Is Modifierfalse
Primitive ValueThis primitive element may be present, or absent, or replaced by an extension
Must Supportfalse
Summarytrue
Invariantsele-1: All FHIR elements must have a @value or children (hasValue() or (children().count() > id.count()))
6. Bundle.issues
Definition

Captures issues and warnings that relate to the construction of the Bundle and the content within it.

ShortIssues with the Bundle
Comments

Usage notes: These issues and warnings must apply to the Bundle as a whole, not to individual entries.Messages relating to the processing of individual entries (e.g. in a batch or transaction) SHALL be reported in the entry.response.outcome for that entry. If there are errors that arise in the creation of the Bundle, then that should be handled by an OperationOutcome being returned instead of the Bundle.

Control0..1
This element is affected by the following invariants: bdl-16, bdl-17
TypeResource(OperationOutcome)
Is Modifierfalse
Must Supportfalse
Summarytrue