Get a list of wounds for a patient
Retrieve a list of wounds for a patient with optional sorting, pagination, and filtering.
Query parameters
-
ID of the patient to retrieve wounds for.
-
Number of items per page.
-
Comma-separated list of fields to be returned in the response. Only 'id', 'onset_date', 'type', 'secondary_type', 'primary_location', 'secondary_location', 'is_front', 'is_locked', 'status', 'created_at', and 'updated_at' columns are allowed.
-
Filter criteria to narrow down the list of patients. The filter parameter is an object with key-value pairs where the key is the field to filter by and the value is '{operator}{value}'. The operator is optional and defaults to '='. (e.g. '/wounds?patient_id=3089&filter[is_locked]=false&filter[status]=Active')
-
Field to sort the results by, prefixed with a minus sign (-) for descending order and without for ascending order.
curl \
--request GET 'https://publicapi.ekareinc.com/api/v1/wounds?patient_id=42' \
--header "X-API-KEY: $API_KEY"
{
"data": [
{
"id": 9876,
"patient_id": "3089",
"onset_date": "2021-01-01",
"type": "Pressure Injury",
"secondary_type": "Stage 1",
"primary_location": "Calf, Right",
"secondary_location": "Calf, Left",
"is_front": true,
"is_locked": false,
"status": "Active",
"created_at": "2021-01-01 00:00:00",
"updated_at": "2021-01-01 00:00:00"
}
],
"metadata": {
"current_page": 1,
"last_page": 10,
"per_page": 2,
"total": 20,
"next_page_url": "https://publicapi.ekareinc.com/api/v1/wounds?patient_id=3089&patient_id=3089&page=2",
"prev_page_url": "string"
}
}
{
"error": "Invalid API token",
"message": "Unauthorized. Please provide a valid API token.",
"error_code": "100"
}
{
"error": "Access denied",
"message": "Forbidden. You do not have permission to access this resource.",
"error_code": "101"
}
{
"error": "Not Found",
"message": "Patient not found.",
"error_cde": "104"
}
{
"error": "Bad Request",
"message": "The given data was invalid.",
"error_code": "102"
}