The FHIR R4 Bundle
resource is a container for grouping related resources together, allowing multiple resources to be transmitted as a single unit. It is often used for batch processing, document creation, and transaction handling in FHIR-based systems.
Use Cases
- Submit a batch of related resources as a single transaction
- Retrieve a set of related resources (e.g., encounters, observations, or medications) for a specific patient or event
- Organize multiple resources together for easier querying or aggregation
- Monitor changes in a bundle's contents using webhooks
Types of Bundles
Type | Description |
---|---|
batch | A batch of independent operations, each of which is executed separately, with results returned in the response. |
document | A bundle that represents a complete document, like a clinical note or a collection of related resources. |
transaction | A set of operations that should be executed as a single unit, ensuring atomicity of all the included operations. |
Health Gorilla primarily supports
batch
andtransaction
Bundles for write operations.
Base URLs
- Production:
https://api.healthgorilla.com/fhir/R4/Bundle
- Sandbox:
https://sandbox.healthgorilla.com/fhir/R4/Bundle
Authentication
All requests require OAuth 2.0 authentication using a Bearer Token. Unauthorized requests return 401 Unauthorized
responses.
Required Scopes
bundle.write
for POST
For more information, go to: OAuth 2.0 Authentication.
Supported Methods
Method | Operation | Description |
---|---|---|
POST | Submit Bundle | Processes a transaction or batch Bundle as a single request |
Request Parameters
The POST method for the Bundle resource does not require query parameters. The operation submits a group of resources within the request body, structured as a valid Bundle
resource.
Attributes
The POST
method for creating a Bundle
does not have specific attributes. The attributes are defined within the Bundle
resource itself, and the key part of the request is the body structure, which includes elements like type
, entry
, fullUrl
, and resource
.
Webhooks
Webhook notifications are not typically required for synchronous Bundle processing. However, if a submitted Bundle creates or updates a monitored resource (e.g., Patient
, AllergyIntolerance
), webhooks may still be triggered based on your active subscriptions. For more information, go to: Webhooks & Polling .
Error Handling
All Bundle operations follow standard Health Gorilla error handling practices using the FHIR OperationOutcome
resource. For more information, go to: Error Handling .