A visit by a care seeker to a location (care home) either in-person or via a virtual format (such video call).
A unique Id for the home visit.
The date/time the home visit was anonymized (if anonymized).
The user the home visit is assigned to.
The date/time the home visit was cancelled (if cancelled).
The Id of the care enquiry this home visit has been booked for.
The date/time the home visit was completed (if completed).
The date/time the home visit was created.
The date/time of the visit.
The host for the visit designated by their role at the location; manager, deputy_manager, administrator, receptionist, senior_carer, carer, customer_relations_adviser, nurse, other.
The Id of the location this home visit is to.
The date/time the home visit was modified.
Notes regarding the visit.
The Id of the service user contact who will attend the home during the visit. This is optional, if not specified then the care seeker associated with the care enquiry will be attending.
The type of visit booked; in_person, virtual.
{
"_id": "6724fbca4f73a2cebf63857b",
"anonymized": null,
"assigned_to": "6724fbc74f73a2cebf637806",
"cancelled": null,
"care_enquiry": "6724fbca4f73a2cebf638579",
"completed": "2024-10-27 15:30:00",
"created": "2024-11-01 16:03:22",
"date_time": "2024-10-27 14:30:00",
"host": "manager",
"location": "6724fbc74f73a2cebf6377fa",
"modified": "2024-11-01 16:03:22",
"notes": "",
"service_user_contact": null,
"visit_type": "in_person"
}
Unless suppressed creating a home visit will if possible send a confirmation email to the care seeker regarding their visit.
The Id of the user the home visit is assigned to. If you do not specify a user then CareHQ will allocate the home visit to the user the care enquiry is assigned to.
The Id of the care enquiry the home visit relates to.
The date/time the home visit is booked for.
The job title of the staff member who will host the visit.
Any notes regarding the visit.
The Id of the service user contact that will attend the visit (if not specified then the care seeker for the care enquiry will be recorded as the attendee).
Flag indicating if the email sent to care seekers confirming their visit should be suppressed.
Returns the home visit object created.
var homeVisit = apiClient.Request(
HttpMethod.Put,
"home-visits",
null,
new MultiValueDict()
.Add("care_enquiry", care_enquiry_id)
.Add("date_time", visit_date_time)
.Add("host", "manager")
.Add("notes", "Care seeker has requested to view ground floor rooms.")
.Add("visit_type", "in_person")
);
<?php
$comment = $api_client->request(
'PUT',
'home-visits',
NULL
[
'care_enquiry'=>$care_enquiry_id,
'date_time'=>$visit_date_time,
'host'=>'manager',
'notes'=>'Care seeker has requested to view ground floor rooms.',
'visit_type'=>'in_person'
]
);
home_visit = api_client(
'PUT',
'home-visits',
data={
'care_enquiry': care_enquiry_id,
'date_time': visit_date_time,
'host': 'manager',
'notes': 'Care seeker has requested to view ground floor rooms.',
'visit_type': 'in_person'
}
)
home_visit = api_client.request(
'PUT',
'home-visits',
data: {
'care_enquiry' => care_enquiry_id,
'date_time' => visit_date_time,
'host' => 'manager',
'notes' => 'Care seeker has requested to view ground floor rooms.',
'visit_type' => 'in_person'
}
)
{
"_id": "6724fbd63cd2cde34170f2c6",
"assigned_to": "6724fbc74f73a2cebf637800",
"cancelled": null,
"care_enquiry": "6724fbd64f73a2cebf638f33",
"completed": null,
"created": "2024-11-01 16:03:34",
"date_time": "2024-11-03 11:00:00",
"host": "manager",
"location": "6724fbc74f73a2cebf6377fa",
"modified": "2024-11-01 16:03:34",
"notes": "Care seeker has requested to view ground floor rooms.",
"service_user_contact": null,
"visit_type": "in_person"
}
Return a list of home visits booked for care seekers.
['_id']
A list of attributes to include for fetched objects.
unset
A filter that allows home visits to be filtered by whether the visit is anonymized.
A filter that accepts a list of user Ids and filters home visits by the user they are assigned.
unset
A filter that allows home visits to be filtered by whether the visit is cancelled.
A filter that accepts a list of care enquiry Ids and filters home visits by the enquiry the visit has been booked for.
unset
A filter that allows home visits to be filtered by whether the visit is completed.
A filter that accepts a date and filters home visits to those booked 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 home visits by the location they are 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 case insensitive keyword filter applied to the following fields; notes.
A filter that accepts a date and filters home visits to those booked after or on the start date.
A filter that allows home visits to be filtered by type.
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 home visits.
var homeVisits = apiClient.Request(
HttpMethod.Get,
"home-visits",
new MultiValueDict()
.Add("attributes", "care_enquiry", "date_time", "host", "notes")
.Add("filters-cancelled", "no")
.Add("filters-completed", "no")
);
<?php
$home_visits = $api_client->request(
'GET',
'home-visits',
[
'attributes'=>['care_enquiry', 'date_time', 'host', 'notes'],
'filters-cancelled'=>'no',
'filters-completed'=>'no'
]
);
home_visits = api_client(
'GET',
'home-visits',
params={
'attributes': ['care_enquiry', 'date_time', 'host', 'notes'],
'filters-cancelled': 'no',
'filters-completed': 'no'
}
)
home_visits = api_client.request(
'GET',
'home-visits',
params: {
'attributes'=>['care_enquiry', 'date_time', 'host', 'notes'],
'filters-cancelled'=>'no',
'filters-completed'=>'no'
}
)
{
"item_count": 23,
"items": [
{
"_id": "6724fbc94f73a2cebf638224",
"care_enquiry": "6724fbc94f73a2cebf638222",
"date_time": "2023-02-17 12:52:00",
"host": "manager",
"notes": ""
},
{
"_id": "6724fbc94f73a2cebf638244",
"care_enquiry": "6724fbc94f73a2cebf638242",
"date_time": "2023-02-26 10:18:00",
"host": "deputy_manager",
"notes": ""
},
{
"_id": "6724fbc94f73a2cebf6382a2",
"care_enquiry": "6724fbc94f73a2cebf6382a0",
"date_time": "2023-04-14 16:24:00",
"host": "deputy_manager",
"notes": ""
},
{
"_id": "6724fbc94f73a2cebf6382db",
"care_enquiry": "6724fbc94f73a2cebf6382d9",
"date_time": "2023-05-28 16:22:00",
"host": "manager",
"notes": ""
},
{
"_id": "6724fbc94f73a2cebf638375",
"care_enquiry": "6724fbc94f73a2cebf638373",
"date_time": "2023-08-18 14:35:00",
"host": "manager",
"notes": ""
},
{
"_id": "6724fbc94f73a2cebf638384",
"care_enquiry": "6724fbc94f73a2cebf638382",
"date_time": "2023-09-01 14:13:00",
"host": "manager",
"notes": ""
},
{
"_id": "6724fbc94f73a2cebf638388",
"care_enquiry": "6724fbc94f73a2cebf638386",
"date_time": "2023-09-13 10:08:00",
"host": "manager",
"notes": ""
},
{
"_id": "6724fbc94f73a2cebf638396",
"care_enquiry": "6724fbc94f73a2cebf638394",
"date_time": "2023-09-19 13:42:00",
"host": "manager",
"notes": ""
},
{
"_id": "6724fbca4f73a2cebf6383bc",
"care_enquiry": "6724fbca4f73a2cebf6383ba",
"date_time": "2023-10-17 08:20:00",
"host": "manager",
"notes": ""
},
{
"_id": "6724fbca4f73a2cebf6383d5",
"care_enquiry": "6724fbca4f73a2cebf6383d3",
"date_time": "2023-11-03 09:46:00",
"host": "manager",
"notes": ""
}
],
"page": 1,
"page_count": 3,
"per_page": 10
}
var homeVisit = apiClient.Request(
HttpMethod.Get,
$"home-visits/{homeVisitId}"
);
<?php
$home_visit = $api_client->request(
'GET',
'home-visits/' . $home_visit_id
);
home_visit = api_client('GET', f'home-visits/{home_visit_id}')
home_visit = api_client.request('GET', "home-visits/#{home_visit_id}")
{
"_id": "6724fbca4f73a2cebf63857b",
"anonymized": null,
"assigned_to": "6724fbc74f73a2cebf637806",
"cancelled": null,
"care_enquiry": "6724fbca4f73a2cebf638579",
"completed": "2024-10-27 15:30:00",
"created": "2024-11-01 16:03:22",
"date_time": "2024-10-27 14:30:00",
"host": "manager",
"location": "6724fbc74f73a2cebf6377fa",
"modified": "2024-11-01 16:03:22",
"notes": "",
"service_user_contact": null,
"visit_type": "in_person"
}
Home visits can only be updated if they are pending (not cancelled or completed).
Unless suppressed updating the date/time of a home visit will if possible send a confirmation email to the care seeker regarding their new visit time.
The Id of the user the home visit is assigned to. If you do not specify a user then CareHQ will allocate the home visit to the user the care enquiry is assigned to.
The date/time the home visit is booked for.
The job title of the staff member who will host the visit.
Any notes regarding the visit.
Flag indicating if the email sent to care seekers confirming their visit should be suppressed.
Returns the home visit object updated.
var action = apiClient.Request(
HttpMethod.Patch,
$"home-visits/{home_visit_id}",
null,
new MultiValueDict()
.Add("date_time, visitDateTime)
);
<?php
$comment = $api_client->request(
'PATCH',
'home-visits/' . home_visit_id,
NULL
['date_time'=>visit_date_time]
);
home_visit = api_client(
'PATCH',
f'home-visits/{home_visit_id}',
data={'date_time': visit_date_time}
)
action = api_client.request(
'PATCH',
"home-visits/#{home_visit_id}",
data: {
'date_time'=>visit_date_time
}
)
{
"_id": "6724fbd64f73a2cebf638f3b",
"assigned_to": "6724fbc74f73a2cebf637800",
"cancelled": null,
"care_enquiry": "6724fbd64f73a2cebf638f37",
"completed": null,
"created": "2024-11-01 16:03:34",
"date_time": "2024-11-03 12:00:00",
"host": "manager",
"location": "6724fbc74f73a2cebf6377fa",
"modified": "2024-11-01 16:03:34",
"notes": "Care seeker has requested to view ground floor rooms.",
"visit_type": "in_person"
}
var homeVisit = apiClient.Request(
HttpMethod.Patch,
$"home-visits/{homeVisitId}/cancel"
);
<?php
$home_visit = $api_client->request(
'PATCH',
'home-visits/' . home_visit_id . '/cancel'
);
home_visit = api_client(
'PATCH',
f'home-visits/{home_visit_id}/cancel'
)
home_visit = api_client.request(
'PATCH',
"home-visits/#{home_visit_id}/cancel"
)
{
"_id": "6724fbd64f73a2cebf638f25",
"assigned_to": "6724fbc74f73a2cebf637800",
"cancelled": "2024-11-01 16:03:34",
"care_enquiry": "6724fbd64f73a2cebf638f21",
"completed": null,
"created": "2024-11-01 16:03:34",
"date_time": "2024-11-03 11:00:00",
"host": "manager",
"location": "6724fbc74f73a2cebf6377fa",
"modified": "2024-11-01 16:03:34",
"notes": "Care seeker has requested to view ground floor rooms.",
"visit_type": "in_person"
}
var homeVisit = apiClient.Request(
HttpMethod.Patch,
$"home-visits/{homeVisitId}/complete"
);
<?php
$comment = $api_client->request(
'PATCH',
'home-visits/' . home_visit_id . '/complete'
);
home_visit = api_client(
'PATCH',
f'home-visits/{home_visit_id}/complete'
)
home_visit = api_client.request(
'PATCH',
"home-visits/#{home_visit_id}/complete"
)
{
"_id": "6724fbd64f73a2cebf638f2e",
"assigned_to": "6724fbc74f73a2cebf637800",
"cancelled": null,
"care_enquiry": "6724fbd64f73a2cebf638f2a",
"completed": "2024-11-01 16:03:34",
"created": "2024-11-01 16:03:34",
"date_time": "2024-11-03 11:00:00",
"host": "manager",
"location": "6724fbc74f73a2cebf6377fa",
"modified": "2024-11-01 16:03:34",
"notes": "Care seeker has requested to view ground floor rooms.",
"visit_type": "in_person"
}