Skip to main content

Batch

Submitting batch bundles (designated by batch on Bundle.type) allows you to submit sets of actions. These actions, unlike terminology, are non-atomic (an error occurring in one operation will not prevent other actions from being applied on the server). Use batch if you want to evaluate multiple actions in a single request but don't care or do not want all actions to fail if one fails.

API

R4

iguhealth api batch r4 --data '$MY_BATCH_BUNDLE'

R4B

iguhealth api batch r4b --data '$MY_BATCH_BUNDLE'

Example

The following is a batch bundle with two operations one that creates a Patient and another that creates a Practitioner.

{
"resourceType": "Bundle",
"type": "batch",
"entry": [
{
"request": {
"method": "POST",
"url": "Patient"
},
"resource": {
"resourceType": "Patient"
}
},
{
"request": {
"method": "POST",
"url": "Practitioner"
},
"resource": {
"resourceType": "Practitioner"
}
}
]
}