Get last observations
GET
/fhir/Observation/$lastnGET
/fhir/R4/Observation/$lastnGET
/fhir/R5/Observation/$lastndev
https://api.sandbox.ovok.comThis endpoint allows users to fetch patient informations, specifically observations.
Example cURL request
curl -X GET \
-G 'https://api.dev.ovok.com/fhir/Observation/$lastn' \
-d 'patient=Patient/e70f3aec-d37e-453d-887b-72654c26b3fe' \
-d 'max=2' \
-d 'code=131328,8886-4'
Example JSON response
{
"resourceType": "Bundle",
"type": "searchset",
"entry": [
{
"resource": {
"resourceType": "Observation",
"subject": {
"reference": "Patient/7c4d044d-af23-4ef8-948b-c4503e64e528",
"display": "Max Mustermann"
},
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "131328"
}
]
},
"status": "amended",
"id": "a4508b00-7854-4108-a903-57aa67eaa79e"
},
"fullUrl": "https://fhir.ovok.com/fhir/R4/Observation/a4508b00-7854-4108-a903-57aa67eaa79e"
},
{
"resource": {
"resourceType": "Observation",
"status": "final",
"valueQuantity": {
"unit": "bpm",
"value": 150
},
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "8883-1"
},
{
"system": "http://loinc.org",
"code": "8886-4"
}
]
},
"subject": {
"reference": "Patient/7c4d044d-af23-4ef8-948b-c4503e64e528",
"display": "Max Mustermann"
},
"id": "32fd6e5d-fa2f-4923-97ac-1042ed3f90bb"
},
"fullUrl": "https://fhir.ovok.com/fhir/R4/Observation/32fd6e5d-fa2f-4923-97ac-1042ed3f90bb"
}
]
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
patient | query | string | no | FHIR Patient reference (e.g. Patient/<uuid>) whose most-recent observations to return. |
max | query | string | no | Maximum number of observations to return per code. Defaults to 1. |
code | query | string | no | Comma-separated list of Observation codes to filter by (e.g. 131328,8886-4). |
Responses
| Code | Description |
|---|---|
200 | Success. |
400 | The request could not be operated by the server. |
401 | The resource owner or authorization server denied the request. |
404 | The requested resource could not be found. |
422 | The request could not be validated by the server. |
500 | The server encountered an unexpected condition. Please try again later. |
200 → PatientObservationResponseDto (application/json)
resourceType:string(required)type:string(required)entry:object[](required)resource:object(required)fullUrl:string(required)
Example
{
"resourceType": "Bundle",
"type": "searchset",
"entry": [
{
"resource": {
"id": "87ea5dfc-8b8e-384d-8489-79496e706390",
"resourceType": "Observation"
},
"fullUrl": "https://fhir.ovok.com/fhir/R4/Observation/87ea5dfc-8b8e-384d-8489-79496e706390"
}
]
}