Profiles & Operations > Structure Definition: Bundle Profile

Structure Definition: Bundle

Canonical URL:http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-profile-bundle

Simplifier project page:

Command 'link' could not render: File not found for 'subject=bundle:name'

Derived from: Bundle (R4)

Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work

Differential View

idΣ0..1id
id0..1string
extensionC0..*Extension
versionIdΣ0..1id
lastUpdatedS Σ0..1instant
sourceΣ0..1uri
profileS Σ1..1canonical(StructureDefinition)Fixed Value
securityΣ0..*CodingBinding
tagΣ0..*Coding
implicitRulesΣ ?!0..1uri
language0..1codeBinding
identifierS Σ0..1Identifier
typeS Σ1..1codeBindingFixed Value
timestampS Σ1..1instant
totalΣ C0..1unsignedInt
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
relationΣ1..1string
urlΣ1..1uri
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
fullUrlS Σ0..1uri
resourceS Σ0..1Resource
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
modeΣ0..1codeBinding
scoreΣ0..1decimal
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
methodΣ1..1codeBinding
urlΣ1..1uri
ifNoneMatchΣ0..1string
ifModifiedSinceΣ0..1instant
ifMatchΣ0..1string
ifNoneExistΣ0..1string
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
statusΣ1..1string
locationΣ0..1uri
etagΣ0..1string
lastModifiedΣ0..1instant
outcomeΣ0..1Resource
signatureΣ0..1Signature

Hybrid View

idΣ0..1id
id0..1string
extensionC0..*Extension
versionIdΣ0..1id
lastUpdatedS Σ0..1instant
sourceΣ0..1uri
profileS Σ1..1canonical(StructureDefinition)Fixed Value
securityΣ0..*CodingBinding
tagΣ0..*Coding
implicitRulesΣ ?!0..1uri
language0..1codeBinding
identifierS Σ0..1Identifier
typeS Σ1..1codeBindingFixed Value
timestampS Σ1..1instant
totalΣ C0..1unsignedInt
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
relationΣ1..1string
urlΣ1..1uri
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
fullUrlS Σ0..1uri
resourceS Σ0..1Resource
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
modeΣ0..1codeBinding
scoreΣ0..1decimal
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
methodΣ1..1codeBinding
urlΣ1..1uri
ifNoneMatchΣ0..1string
ifModifiedSinceΣ0..1instant
ifMatchΣ0..1string
ifNoneExistΣ0..1string
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
statusΣ1..1string
locationΣ0..1uri
etagΣ0..1string
lastModifiedΣ0..1instant
outcomeΣ0..1Resource
signatureΣ0..1Signature

Snapshot View

idΣ0..1id
id0..1string
extensionC0..*Extension
versionIdΣ0..1id
lastUpdatedS Σ0..1instant
sourceΣ0..1uri
profileS Σ1..1canonical(StructureDefinition)Fixed Value
securityΣ0..*CodingBinding
tagΣ0..*Coding
implicitRulesΣ ?!0..1uri
language0..1codeBinding
identifierS Σ0..1Identifier
typeS Σ1..1codeBindingFixed Value
timestampS Σ1..1instant
totalΣ C0..1unsignedInt
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
relationΣ1..1string
urlΣ1..1uri
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
fullUrlS Σ0..1uri
resourceS Σ0..1Resource
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
modeΣ0..1codeBinding
scoreΣ0..1decimal
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
methodΣ1..1codeBinding
urlΣ1..1uri
ifNoneMatchΣ0..1string
ifModifiedSinceΣ0..1instant
ifMatchΣ0..1string
ifNoneExistΣ0..1string
id0..1string
extensionC0..*Extension
modifierExtensionΣ ?! C0..*Extension
statusΣ1..1string
locationΣ0..1uri
etagΣ0..1string
lastModifiedΣ0..1instant
outcomeΣ0..1Resource
signatureΣ0..1Signature

Table View

Bundle..
Bundle.meta1..
Bundle.meta.lastUpdated..
Bundle.meta.profile1..1
Bundle.identifier..
Bundle.type..
Bundle.timestamp1..
Bundle.entry..
Bundle.entry.fullUrl..
Bundle.entry.resource..

JSON View

{
"resourceType": "StructureDefinition",
"id": "profile-Bundle",
"url": "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-profile-bundle",
"version": "2.0.0",
"name": "Bundle",
"title": "MHA Bundle Profile",
"status": "active",
"date": "2025-05-17T20:17:06.3613088+00:00",
"fhirVersion": "4.0.1",
"mapping": [
{
"identity": "MHA-PDS-Mapping",
"name": "MHA PDS Mapping"
}
],
"kind": "resource",
"abstract": false,
"type": "Bundle",
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
"derivation": "constraint",
"element": [
{
"id": "Bundle",
"path": "Bundle",
{
"key": "mha-pds-bundle-inv-1",
"severity": "error",
"human": "Must contain exactly one patient resource in the bundle",
"expression": "entry.resource.ofType(Patient).count() = 1"
},
{
"key": "mha-pds-bundle-inv-2",
"severity": "error",
"human": "Must contain exactly one organization resource in the bundle",
"expression": "entry.resource.ofType(Organization).count() = 1"
},
{
"key": "mha-pds-bundle-inv-3",
"severity": "error",
"human": "Must contain exactly one location resource in the bundle",
"expression": "entry.resource.ofType(Location).count() = 1"
},
{
"key": "mha-bundle-rule-1",
"severity": "error",
"human": "Service First Contact Date in EpisodeOfCare must be on or after Referral Received Date in ServiceRequest",
"expression": "(entry.resource.where($this is EpisodeOfCare).extension('https://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-ext-FirstContactDate').exists() and entry.resource.where($this is EpisodeOfCare).referralRequest.resolve().extension('http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-ext-ServiceRequestReceivedDate').exists()) implies entry.resource.where($this is EpisodeOfCare).extension('https://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-ext-FirstContactDate').value.toString().substring(0,10) >= entry.resource.where($this is EpisodeOfCare).referralRequest.resolve().extension('http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-ext-ServiceRequestReceivedDate').value.toString().substring(0,10)"
},
{
"key": "mha-bundle-rule-2",
"severity": "warning",
"human": "If EpisodeOfCare status is 'planned', referral received date SHALL be present",
"expression": "entry.resource.where($this is EpisodeOfCare).status='planned' implies entry.resource.where($this is EpisodeOfCare).referralRequest.resolve().extension('http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-ext-ServiceRequestReceivedDate').exists()"
},
{
"key": "mha-bundle-inv-4",
"severity": "error",
"human": "Bundle must contain EpisodeOfCare and HealthcareService resource",
"expression": "entry.resource.where($this is EpisodeOfCare).exists() and entry.resource.where($this is HealthcareService).exists()"
}
]
},
{
"id": "Bundle.meta",
"path": "Bundle.meta",
"min": 1,
"mustSupport": true
},
{
"id": "Bundle.meta.lastUpdated",
"path": "Bundle.meta.lastUpdated",
"mustSupport": true
},
{
"id": "Bundle.meta.profile",
"path": "Bundle.meta.profile",
"min": 1,
"max": "1",
"fixedCanonical": "http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-profile-bundle",
"mustSupport": true
},
{
"id": "Bundle.identifier",
"path": "Bundle.identifier",
"mustSupport": true
},
{
"id": "Bundle.type",
"path": "Bundle.type",
"fixedCode": "collection",
"mustSupport": true
},
{
"id": "Bundle.timestamp",
"path": "Bundle.timestamp",
"min": 1,
"mustSupport": true
},
{
"id": "Bundle.entry",
"path": "Bundle.entry",
"mustSupport": true
},
{
"id": "Bundle.entry.fullUrl",
"path": "Bundle.entry.fullUrl",
"mustSupport": true
},
{
"id": "Bundle.entry.resource",
"path": "Bundle.entry.resource",
"mustSupport": true
}
]
}
}

Usage

The Bundle Resource gathers client data content into a single XML or JSON for exchange.

Notes

.meta.lastUpdated

  • The date when the bundle was assembled from the accompanying resources.
.meta.profile

  • used to declare conformance to this profile
  • populate with a fixed value: http://ontariohealth.ca/fhir/StructureDefinition/ca-on-mha-profile-bundle
.meta.versionId

  • SHALL be populated by the OH FHIR server
  • source systems do not need to populate this element prior to submission
.identifier

  • A persistent identifier that is generated by the submitting system
  • SHALL contain a unique value.
.type

  • SHALL contain a fixed value of collection
.timestamp

  • SHALL contain the date/time the bundle was assembled.
.entry

  • create an entry for each of the FHIR Resources required to convey the information in the data submission.
  • each .entry slice listed in this section SHALL contain the corresponding resource in .entry(SliceName).resource
  • each bundle submission for both operations supported by this implementation SHALL contain at a minimum .entryPatient, .entryOrganization and .entryLocation.
  • if present there SHALL be 1 and only 1 .entryServiceRequest,.entryEpisodeOfCare, .entryAppointment, and .entryHealthCareService entries per bundle
  • if present there MAY be 1 or more entries of .entryLocation, .entryEncounter, .entryCondition, and .entryObservdationSDOH entries per bundle
.entry.fullUrl

  • each entry in the Bundle SHALL have a fullUrl which is the identity of the resource in the entry.
  • if a persistent identity for the resource is not available to use in the Bundle, a UUID SHOULD be used (urn:uuid:...)
.entry.resource

  • SHALL be populated with the resource for this entry