Read
1
GET [base]/[type]/[id]
Copied!
One of the most basic interactions is used to obtain a resource by a given id. For more advanced options for getting resources, check out Search.
Response code
Text
Description
200
OK
Resource successfully found and returned
404
Not Found
Resource with a given id doesn't exist on the server
410
Gone
Resource was deleted

200 OK

Get an existing patient:
Request (FHIR)
Request (Aidbox)
Response (FHIR)
Response (Aidbox)
1
GET /fhir/Patient/17b69d79-3d9b-45f8-af79-75f958502763
Copied!
1
GET /Patient/17b69d79-3d9b-45f8-af79-75f958502763
Copied!
Status: 200
1
name:
2
- given: Bob
3
gender: male
4
id: 17b69d79-3d9b-45f8-af79-75f958502763
5
resourceType: Patient
6
meta:
7
lastUpdated: '2018-11-29T10:44:10.588Z'
8
versionId: '13'
9
extension:
10
- url: 'ex:createdAt'
11
valueInstant: '2018-11-29T10:44:10.588Z'
Copied!
Status: 200
1
name:
2
- given: Bob
3
gender: male
4
id: 17b69d79-3d9b-45f8-af79-75f958502763
5
resourceType: Patient
6
meta:
7
lastUpdated: '2018-11-29T10:44:10.588Z'
8
createdAt: '2018-11-29T10:44:10.588Z'
9
versionId: '13'
Copied!

404 Not Found

Attempt to get a non-existing patient:
Request (FHIR)
Request (Aidbox)
Request (FHIR)
Response (Aidbox)
1
GET /fhir/Patient/some-not-existing-id
Copied!
1
GET /Patient/some-not-existing-id
Copied!
Status: 404
1
resourceType: OperationOutcome
2
id: 'not-found'
3
text:
4
status: generated
5
div: Resource Patient/some-not-existing-id not found
6
issue:
7
- severity: fatal
8
code: not-found
9
diagnostics: Resource Patient/some-not-existing-id not found
Copied!
Status: 404
1
resourceType: OperationOutcome
2
id: 'not-found'
3
text:
4
status: generated
5
div: Resource Patient/some-not-existing-id not found
6
issue:
7
- severity: fatal
8
code: not-found
9
diagnostics: Resource Patient/some-not-existing-id not found
Copied!

vread

1
GET [base]/[type]/[id]/_history/[vid]
Copied!
This one is another read interaction, but it returns a specific version resource. Similar to read, but it additionally requires to specify version id.

200 OK

Version id 13 was extracted from the response of a create interaction.
Request (FHIR)
Request (Aidbox)
Response (FHIR)
Response (Aidbox)
1
GET /fhir/Patient/17b69d79-3d9b-45f8-af79-75f958502763/_history/13
Copied!
1
GET /Patient/17b69d79-3d9b-45f8-af79-75f958502763/_history/13
Copied!
Status: 200
1
name:
2
- given:
3
- Bob
4
gender: male
5
id: '17b69d79-3d9b-45f8-af79-75f958502763'
6
resourceType: Patient
7
meta:
8
lastUpdated: '2018-11-29T10:44:10.588Z'
9
versionId: '13'
10
extension:
11
- url: 'ex:createdAt'
12
valueInstant: '2018-11-29T10:44:10.588Z'
Copied!
Status: 200
1
name:
2
- given:
3
- Bob
4
gender: male
5
id: '17b69d79-3d9b-45f8-af79-75f958502763'
6
resourceType: Patient
7
meta:
8
lastUpdated: '2018-11-29T10:44:10.588Z'
9
createdAt: '2018-11-29T10:44:10.588ZZ'
10
versionId: '13'
Copied!

Last modified 1yr ago