Short answer: A Bundle is the FHIR resource that groups other resources: search results, a set of writes sent in one request, a clinical document such as a patient summary, or a message. Its type says what the group means and how a server must handle it.
The nine types in FHIR R4
- searchset: the results of a search, with paging links.
- transaction: writes processed all-or-nothing; if one fails, none is applied.
- batch: writes processed independently; each entry succeeds or fails on its own.
- transaction-response / batch-response: what the server returns for each.
- document: a clinical document (the first entry is a Composition), such as the International Patient Summary; it is signed or stored as a whole.
- message: a message, the first entry is a MessageHeader.
- history: the versions of resources.
- collection: a set of resources with no further meaning.
Transaction vs batch
Use a transaction when the resources depend on each other, for example a Patient and the Observations that reference it: references between entries can use temporary urn:uuid: identifiers that the server resolves. Use a batch for independent operations where partial success is acceptable.
{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{"fullUrl": "urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f0a",
"resource": {"resourceType": "Patient", "name": [{"family": "Example"}]},
"request": {"method": "POST", "url": "Patient"}},
{"resource": {"resourceType": "Observation", "status": "final",
"code": {"coding": [{"system": "http://loinc.org", "code": "8867-4"}]},
"subject": {"reference": "urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f0a"},
"valueQuantity": {"value": 72, "unit": "/min", "system": "http://unitsofmeasure.org", "code": "/min"}},
"request": {"method": "POST", "url": "Observation"}}
]
}
In Anpheros
Anpheros Platform accepts transaction and batch bundles and returns searchset bundles with paging; the International Patient Summary is returned as a document bundle. See the FHIR sandbox to try them, and the International Patient Summary in FHIR.
Related pages
Sources
Frequently asked questions
What is the difference between a FHIR transaction and a batch?
A transaction is all-or-nothing; a batch processes each entry independently.
How do I reference a resource created in the same bundle?
Give it a fullUrl such as urn:uuid:… and use that as the reference; in a transaction the server replaces it with the real id.
What type is a patient summary?
A document bundle whose first entry is a Composition.
Why does my search return a Bundle?
Search results are always a searchset bundle, with links to the next page.
Try it free in the sandbox
Your first FHIR call in 5 minutes. An HL7 FHIR R4 API with the patient's consent built in: try it in the sandbox, then connect your own app or clinic system.
Free · 30 synthetic patients · no card

The more you log, the clearer your record
Your health history in one place, under your control.
Free · Works in your browser · No card
