Run a FHIR batch (or FHIR transaction) bundle
post
/
Batch
Performs a set of independent operations on the server.
Supported Batch Operations
Create Provenance
Description:Creates a new provenance.
Authorization Scope | Request Method | Request URL | Resource Required? |
---|---|---|---|
Provenance.write
|
POST
|
Provenance
|
true
|
Resource Type:
Provenance
Example
Bundle.entry
:
{
"request": {
"method": "POST",
"url": "Provenance"
}
"resource": {
"resourceType": "Provenance",
"target": [
{
"reference": "DocumentReference/881049"
}
],
"recorded": "2019-10-25T14:57:43Z",
"agent": [
{
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/us/core/CodeSystem/us-core-provenance-participant-type",
"code": "transmitter"
}
]
},
"role": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/contractsignertypecodes",
"code": "SOURCE"
}
]
}
],
"who": {
"reference": "Organization/619848"
}
}
],
"entity": [
{
"role": "source",
"what": {
"reference": "DocumentReference/S-201"
}
}
]
}
}
Note: The resource should follow the same rules as when creating a single provenance.
Authorization Types
This operation supports the following authorization types:
Note: Only the body fields mentioned below are supported. Unsupported fields are ignored or can result in errors.
Request
Supported Media Types
- application/fhir+json
Header Parameters
-
Authorization(required): string
Contains the credentials to authenticate a consumer to the service. This should be the OAuth2 Bearer token.
-
accept(required): string
The media type to be requested. See what the resource's operation produces for what is supported.
-
content-type(required): string
Specifies the content type of the request entity body.
The FHIR batch (or FHIR transaction) bundle.
Root Schema : BatchTransactionBundle
Type:
object
A summary representation of a batch or transaction bundle.
Show Source
-
entry(required):
array entry
Minimum Number of Items:
1
An entry in the bundle. -
resourceType(required):
string
Allowed Values:
[ "Bundle" ]
The type of the FHIR resource. -
type(required):
string
Allowed Values:
[ "batch" ]
Indicates the purpose of this bundle.
Example:
{
"resourceType": "Bundle",
"type": "batch",
"entry": [
{
"request": {
"method": "POST",
"url": "Provenance"
},
"resource": {
"resourceType": "Provenance",
"target": [
{
"reference": "DocumentReference/881049"
}
],
"recorded": "2019-10-25T14:57:43Z",
"agent": [
{
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/us/core/CodeSystem/us-core-provenance-participant-type",
"code": "transmitter"
}
]
},
"role": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/contractsignertypecodes",
"code": "SOURCE"
}
]
}
],
"who": {
"reference": "Organization/619848"
}
}
],
"entity": [
{
"role": "source",
"what": {
"reference": "DocumentReference/S-201"
}
}
]
}
},
{
"request": {
"method": "POST",
"url": "Provenance"
},
"resource": {
"resourceType": "Provenance",
"target": [
{
"reference": "Observation/BP-206839089-206839091"
}
],
"recorded": "2024-09-18T10:58:13Z",
"agent": [
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type",
"code": "author"
}
]
},
"role": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/contractsignertypecodes",
"code": "SOURCE"
}
]
}
],
"who": {
"reference": "Organization/1054423",
}
}
]
}
}
]
}
Nested Schema : items
Type:
Show Source
object
-
entry.request(required):
object entry.request
Additional information about how this entry should be processed as part of a batch or transaction.
-
entry.resource:
object entry.resource
The resource for the entry. The Provenance resource is supported.
Nested Schema : entry.request
Type:
object
Additional information about how this entry should be processed as part of a batch or transaction.
Show Source
-
method(required):
string
Allowed Values:
[ "POST" ]
The HTTP action to be performed for this entry. -
url(required):
string
The URL for this entry, relative to the root (the address to which the request is posted).Example:
Provenance
Nested Schema : entry.resource
Type:
object
The resource for the entry. The Provenance resource is supported.
Example:
{
"resourceType": "Provenance",
"target": [
{
"reference": "DocumentReference/881049"
}
],
"recorded": "2019-10-25T14:57:43Z",
"agent": [
{
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/us/core/CodeSystem/us-core-provenance-participant-type",
"code": "transmitter"
}
]
},
"role": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/contractsignertypecodes",
"code": "SOURCE"
}
]
}
],
"who": {
"reference": "Organization/619848"
}
}
],
"entity": [
{
"role": "source",
"what": {
"reference": "DocumentReference/S-201"
}
}
]
}
Response
Supported Media Types
- application/fhir+json
Default Response
Example bundle with
Example Request:
batch-response
.Example Request:
POST https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d
Example Response:
{
"resourceType": "Bundle",
"id": "0fad2fbb-ca1f-4508-9fb3-0eb6784f6e95",
"type": "batch-response",
"entry": [
{
"response": {
"status": "201 Created",
"location": "https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Provenance/doc-185643",
"etag": "W/\"185643\"",
"lastModified": "2024-11-12T19:03:54.730Z"
}
},
{
"response": {
"status": "201 Created",
"location": "https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Provenance/doc-185646",
"etag": "W/\"185646\"",
"lastModified": "2024-11-12T19:03:54.730Z"
}
}
]
}
Headers
-
X-Request-Id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
X-Request-Id
, if present. -
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the
opc-Request-Id
, if present.