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": "66bfb4c09ab4e3d6eb735681",
"anonymized": null,
"assigned_to": "66bfb4bb9ab4e3d6eb73490c",
"cancelled": null,
"care_enquiry": "66bfb4c09ab4e3d6eb73567f",
"completed": "2024-08-11 15:30:00",
"created": "2024-08-16 20:21:20",
"date_time": "2024-08-11 14:30:00",
"host": "manager",
"location": "66bfb4bb9ab4e3d6eb734900",
"modified": "2024-08-16 20:21:20",
"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": "66bfb4d9c3d53f8d1dead159",
"assigned_to": "66bfb4bb9ab4e3d6eb734906",
"cancelled": null,
"care_enquiry": "66bfb4d99ab4e3d6eb73601a",
"completed": null,
"created": "2024-08-16 20:21:45",
"date_time": "2024-08-18 11:00:00",
"host": "manager",
"location": "66bfb4bb9ab4e3d6eb734900",
"modified": "2024-08-16 20:21:45",
"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": "66bfb4bf9ab4e3d6eb73532a",
"care_enquiry": "66bfb4bf9ab4e3d6eb735328",
"date_time": "2022-12-02 12:52:00",
"host": "manager",
"notes": ""
},
{
"_id": "66bfb4bf9ab4e3d6eb73534a",
"care_enquiry": "66bfb4bf9ab4e3d6eb735348",
"date_time": "2022-12-11 10:18:00",
"host": "deputy_manager",
"notes": ""
},
{
"_id": "66bfb4bf9ab4e3d6eb7353a8",
"care_enquiry": "66bfb4bf9ab4e3d6eb7353a6",
"date_time": "2023-01-27 16:24:00",
"host": "deputy_manager",
"notes": ""
},
{
"_id": "66bfb4bf9ab4e3d6eb7353e1",
"care_enquiry": "66bfb4bf9ab4e3d6eb7353df",
"date_time": "2023-03-12 16:22:00",
"host": "manager",
"notes": ""
},
{
"_id": "66bfb4bf9ab4e3d6eb73547b",
"care_enquiry": "66bfb4bf9ab4e3d6eb735479",
"date_time": "2023-06-02 14:35:00",
"host": "manager",
"notes": ""
},
{
"_id": "66bfb4bf9ab4e3d6eb73548a",
"care_enquiry": "66bfb4bf9ab4e3d6eb735488",
"date_time": "2023-06-16 14:13:00",
"host": "manager",
"notes": ""
},
{
"_id": "66bfb4bf9ab4e3d6eb73548e",
"care_enquiry": "66bfb4bf9ab4e3d6eb73548c",
"date_time": "2023-06-28 10:08:00",
"host": "manager",
"notes": ""
},
{
"_id": "66bfb4bf9ab4e3d6eb73549c",
"care_enquiry": "66bfb4bf9ab4e3d6eb73549a",
"date_time": "2023-07-04 13:42:00",
"host": "manager",
"notes": ""
},
{
"_id": "66bfb4bf9ab4e3d6eb7354c2",
"care_enquiry": "66bfb4bf9ab4e3d6eb7354c0",
"date_time": "2023-08-01 08:20:00",
"host": "manager",
"notes": ""
},
{
"_id": "66bfb4bf9ab4e3d6eb7354db",
"care_enquiry": "66bfb4bf9ab4e3d6eb7354d9",
"date_time": "2023-08-18 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": "66bfb4c09ab4e3d6eb735681",
"anonymized": null,
"assigned_to": "66bfb4bb9ab4e3d6eb73490c",
"cancelled": null,
"care_enquiry": "66bfb4c09ab4e3d6eb73567f",
"completed": "2024-08-11 15:30:00",
"created": "2024-08-16 20:21:20",
"date_time": "2024-08-11 14:30:00",
"host": "manager",
"location": "66bfb4bb9ab4e3d6eb734900",
"modified": "2024-08-16 20:21:20",
"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": "66bfb4d99ab4e3d6eb736022",
"assigned_to": "66bfb4bb9ab4e3d6eb734906",
"cancelled": null,
"care_enquiry": "66bfb4d99ab4e3d6eb73601e",
"completed": null,
"created": "2024-08-16 20:21:45",
"date_time": "2024-08-18 12:00:00",
"host": "manager",
"location": "66bfb4bb9ab4e3d6eb734900",
"modified": "2024-08-16 20:21:45",
"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": "66bfb4d89ab4e3d6eb73600c",
"assigned_to": "66bfb4bb9ab4e3d6eb734906",
"cancelled": "2024-08-16 20:21:44",
"care_enquiry": "66bfb4d89ab4e3d6eb736008",
"completed": null,
"created": "2024-08-16 20:21:44",
"date_time": "2024-08-18 11:00:00",
"host": "manager",
"location": "66bfb4bb9ab4e3d6eb734900",
"modified": "2024-08-16 20:21:44",
"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": "66bfb4d99ab4e3d6eb736015",
"assigned_to": "66bfb4bb9ab4e3d6eb734906",
"cancelled": null,
"care_enquiry": "66bfb4d99ab4e3d6eb736011",
"completed": "2024-08-16 20:21:45",
"created": "2024-08-16 20:21:45",
"date_time": "2024-08-18 11:00:00",
"host": "manager",
"location": "66bfb4bb9ab4e3d6eb734900",
"modified": "2024-08-16 20:21:45",
"notes": "Care seeker has requested to view ground floor rooms.",
"visit_type": "in_person"
}