Generate sample data for Bulk API
You can use sample data for executing Bulk API endpoints from related documentation sections.
Sample data contains:
  • FHIR citizenship extension
  • 3 patients one of which uses the citizenship extension
  • 3 appointments with references to patients
You can quickly copy sample requests using the icon in the top right corner of code blocks and execute them in the Aidbox REST console.
Create Sample data
1
POST /
2
3
resourceType: bundle
4
type: transaction
5
entry:
6
7
- request:
8
method: PUT
9
url: "/Attribute/Patient.citizenship"
10
resource:
11
resourceType: Attribute
12
description: "The patient's legal status as citizen of a country."
13
resource:
14
id: Patient
15
resourceType: Entity
16
path: [citizenship]
17
id: Patient.citizenship
18
isCollection: true
19
extensionUrl: "http://hl7.org/fhir/StructureDefinition/patient-citizenship"
20
- request:
21
method: PUT
22
url: "/Attribute/Patient.citizenship.code"
23
resource:
24
resourceType: Attribute
25
description: "Nation code representing the citizenship of patient."
26
resource:
27
id: Patient
28
resourceType: Entity
29
path: [citizenship, code]
30
id: Patient.citizenship.code
31
type: {id: CodeableConcept, resourceType: Entity}
32
extensionUrl: "code"
33
34
- request:
35
method: POST
36
url: "/Patient"
37
resource:
38
id: pt-1
39
name:
40
- given: ["Alice"]
41
- request:
42
method: POST
43
url: "/Patient"
44
resource:
45
id: pt-2
46
name:
47
- given: ["Bob"]
48
- request:
49
method: POST
50
url: "/Patient"
51
resource:
52
id: pt-3
53
name:
54
- given: ["Charles"]
55
citizenship:
56
- code: {text: "ru"}
57
58
- request:
59
method: POST
60
url: "/Appointment"
61
resource:
62
id: ap-1
63
status: fulfilled
64
participant:
65
- status: accepted
66
actor:
67
resourceType: Patient
68
id: pt-1
69
- request:
70
method: POST
71
url: "/Appointment"
72
resource:
73
id: ap-2
74
status: booked
75
participant:
76
- status: accepted
77
actor:
78
resourceType: Patient
79
id: pt-1
80
- request:
81
method: POST
82
url: "/Appointment"
83
resource:
84
id: ap-3
85
status: fulfilled
86
participant:
87
- status: accepted
88
actor:
89
resourceType: Patient
90
id: pt-2
Copied!
Copy link