Batch Upsert
A simple way to insert or update a collection of resources
This custom operation (a lightweight alternative to transaction) simplifies upsert (update or create) resources into FHIR server. Just put an array of resources (with id's) on /
1
PUT /
2
Accept: text/yaml
3
Content-Type: text/yaml
4
5
- status: draft
6
class: {code: IMP}
7
period: {start: "2013-06-08T10:57:34", end: "2013-06-08T12:00:00"}
8
resourceType: Encounter
9
id: enc-1
10
11
- status: draft
12
class: {code: IMP}
13
period: {start: "2013-06-08T11:00:05", end: "2013-06-08T11:30:00"}
14
resourceType: Encounter
15
id: enc-2
16
17
- status: draft
18
class: {code: AMB}
19
period: {start: "2013-06-08T10:21:01", end: "2013-06-08T11:42:11"}
20
resourceType: Encounter
21
id: enc-3
22
23
- status: draft
24
class: {code: IMP}
25
period: {start: "2013-06-07T09:02:01", end: "2013-06-07T15:10:09"}
26
resourceType: Encounter
27
id: enc-3
Copied!
Copy link