A complaint reported relating to a service user.
Detailed complaint information is not intended to be captured or held on CareHQ, instead complaints provides a flag against users to indicate when there is an active complaint against them and allows for reporting on complaints in line with other data held on CareHQ.
A unique Id for the complaint.
The date the complaint was reported by the complainant.
The date/time the complaint was created.
The Id of the location the complaint relates to.
The date/time the booking was modified.
Notes regarding the complaint.
The outcome of the complaint; upheld, partially_upheld, not_upheld, inconclusive, withdrawn.
The date the outcome of an investigation into the complaint was reported to the complainant.
A reference number for the complaint (e.g. a complaints number/reference on a dedicated complaints system).
Flag indicating if the complaint was referred to any other regulatory bodies.
The Id of the service user the complaint relates to.
The subject matter of the complaint.
{
"_id": "6724fbd04f73a2cebf638db2",
"complaint_reported_date": "2024-10-19",
"created": "2024-11-01 16:03:28",
"location": "6724fbc74f73a2cebf6377fc",
"modified": "2024-11-01 16:03:28",
"notes": "Barry has reported that staff members are ignoring requests he's made to change the layout of his room so that he's able to see outside whilst in his bed.",
"outcome": null,
"outcome_reported_date": null,
"ref": "140331",
"referred_to_other_bodies": false,
"service_user": "6724fbca4f73a2cebf638674",
"subject_matter": "6724fbc74f73a2cebf637720"
}
Return a list of complaints.
['_id']
A list of attributes to include for fetched objects.
A filter that accepts a date and filters complaints to those reported before or on the end date.
A filter that accepts a list of Ids and filters the items returned to those with an Id in the list.
A filter that accepts a list of location Ids and filters complaints by the location the complaint relates to.
A filter that accepts a date/time and filters the items returned to those modified after the date/time.
A filter that accepts a date/time and filters the items returned to those modified before the date/time.
A filter that allows complaints to be filtered to a list of outcomes.
A case insensitive keyword filter applied to the following fields; ref.
A filter that accepts a list of service user Ids and filters complaints by the service user the complaint relates to.
A filter that accepts a date and filters complaints to those reported after or on the start date.
A filter that accepts a list of subject matters and filters complaints by the subject matter of the complaint.
1
The page number to fetch.
10
The number of items to return per page.
_id
A list of fields the returned items can be sorted by. Fields prefixed with minus (-) sign are sorted in descending order.
Returns a page of complaints.
var complaints = apiClient.Request(
HttpMethod.Get,
"complaints",
new MultiValueDict()
.Add(
"attributes",
"complaint_reported_date_str",
"subject_matter",
"outcome"
)
.Add("filters-location", locationId)
);
<?php
$complaints = $api_client->request(
'GET',
'complaints',
[
'attributes'=>[
'complaint_reported_date_str',
'subject_matter',
'outcome'
],
'filters-location'=>[$location_id]
]
);
complaints = api_client(
'GET',
'complaints',
params={
'attributes': [
'complaint_reported_date_str',
'subject_matter',
'outcome'
],
'filters-location': [location_id]
}
)
complaints = api_client.request(
'GET',
'complaints',
params: {
'attributes' => [
'complaint_reported_date_str',
'subject_matter',
'outcome'
],
'filters-location' => [$location_id]
}
)
{
"item_count": 12,
"items": [
{
"_id": "6724fbd04f73a2cebf638db4",
"complaint_reported_date": "2023-12-25",
"outcome": "partially_upheld",
"subject_matter": "6724fbc74f73a2cebf637726"
},
{
"_id": "6724fbd04f73a2cebf638db6",
"complaint_reported_date": "2024-09-22",
"outcome": "inconclusive",
"subject_matter": "6724fbc74f73a2cebf637720"
},
{
"_id": "6724fbd04f73a2cebf638db8",
"complaint_reported_date": "2023-09-05",
"outcome": "upheld",
"subject_matter": "6724fbc74f73a2cebf637724"
},
{
"_id": "6724fbd04f73a2cebf638dba",
"complaint_reported_date": "2022-09-21",
"outcome": "upheld",
"subject_matter": "6724fbc74f73a2cebf637728"
},
{
"_id": "6724fbd04f73a2cebf638dbc",
"complaint_reported_date": "2024-10-30",
"outcome": null,
"subject_matter": "6724fbc74f73a2cebf63772e"
},
{
"_id": "6724fbd04f73a2cebf638dbe",
"complaint_reported_date": "2023-10-30",
"outcome": "partially_upheld",
"subject_matter": "6724fbc74f73a2cebf637726"
},
{
"_id": "6724fbd04f73a2cebf638dc0",
"complaint_reported_date": "2024-02-12",
"outcome": "upheld",
"subject_matter": "6724fbc74f73a2cebf637722"
},
{
"_id": "6724fbd04f73a2cebf638dc2",
"complaint_reported_date": "2024-09-20",
"outcome": "not_upheld",
"subject_matter": "6724fbc74f73a2cebf63772a"
},
{
"_id": "6724fbd04f73a2cebf638dc4",
"complaint_reported_date": "2023-12-14",
"outcome": "upheld",
"subject_matter": "6724fbc74f73a2cebf637724"
},
{
"_id": "6724fbd04f73a2cebf638dd2",
"complaint_reported_date": "2024-09-04",
"outcome": "upheld",
"subject_matter": "6724fbc74f73a2cebf63772c"
}
],
"page": 1,
"page_count": 2,
"per_page": 10
}
var complaint = apiClient.Request(HttpMethod.Get, $"complaints/{complaintId}");
<?php
$complaint = $api_client->request('GET', 'complaints/' . $complaint_id);
complaint = api_client('GET', f'complaints/{complaint_id}')
complaint = api_client.request('GET', "complaints/#{complaint_id}")
{
"_id": "6724fbd04f73a2cebf638db2",
"complaint_reported_date": "2024-10-19",
"created": "2024-11-01 16:03:28",
"location": "6724fbc74f73a2cebf6377fc",
"modified": "2024-11-01 16:03:28",
"notes": "Barry has reported that staff members are ignoring requests he's made to change the layout of his room so that he's able to see outside whilst in his bed.",
"outcome": null,
"outcome_reported_date": null,
"ref": "140331",
"referred_to_other_bodies": false,
"service_user": "6724fbca4f73a2cebf638674",
"subject_matter": "6724fbc74f73a2cebf637720"
}