Batch

A batch Bundle allows multiple independent FHIR operations to be submitted in a single request. Each operation is represented as an entry within a Bundle of type batch and is processed separately from the others.

Health Gorilla supports batch Bundles to enable efficient submission of multiple unrelated operations while reducing request overhead.

Use Cases

Typical use cases for batch Bundles include:

  • Submitting multiple independent create or update operations in a single request
  • Reducing network overhead when sending a large number of small FHIR operations
  • Performing bulk operations where partial success is acceptable

Scope and Behavior

This page documents batch processing behavior for the FHIR R4 Bundle resource. Batch Bundles are used strictly as a request container and are not persisted or retrievable as standalone clinical resources.

Health Gorilla processes each entry in a batch Bundle independently. The success or failure of one entry does not affect the processing of other entries.

Batch Bundles do not provide transactional guarantees.

Bundle Structure Requirements

Batch requests must be submitted as a FHIR Bundle resource with the following characteristics:

  • resourceType must be Bundle
  • type must be set to batch
  • Each entry must include:
    • a resource element containing a valid FHIR resource
    • a request element defining the HTTP method and target URL for that entry

Batch Bundles do not support path or query parameters. All processing instructions are defined within the request body.

Entry Correlation (fullUrl)

To correlate request entries with their corresponding responses, Health Gorilla recommends including a fullUrl value for each entry in the request Bundle.

  • The fullUrl should be a unique URN-style UUID.
  • The same fullUrl value is echoed in the corresponding response entry.
  • This enables reliable matching of request entries to their outcomes, especially when processing large batches.

Processing Behavior

  • Batch processing is synchronous.
  • Each entry is validated and processed independently.
  • Partial success is possible: some entries may succeed while others fail.
  • Processing results are returned in a response Bundle of type batch-response.
  • Each response entry includes the outcome for the corresponding request entry.

Error Handling

If an entry fails processing, the corresponding response entry includes:

  • an HTTP status code indicating the failure
  • a FHIR OperationOutcome resource describing the error

Errors affecting one entry do not prevent other entries from being processed. All batch operations follow standard Health Gorilla error-handling conventions.

Limitations and Notes

  • Batch Bundles do not provide atomicity. For atomic, all-or-nothing behavior, use a transaction Bundle instead.
  • Resource-specific validation rules and side effects are documented on individual resource pages.
  • Batch Bundles are intended for independent operations only.

Related Information