Visit Distribution
Executive Summary
Visit Distribution moves visits onto the individual chairs (child facilities) of a master facility. A coordinator starts a session by choosing a source (a facility, or an employee together with a service code), a target master facility and a date range. When the session is processed, the system finds the visits in AlayaCare for each day, gives each visit to the first chair that is free at that time, and then writes the chair onto the visit in AlayaCare. The screen lists the sessions, and each session can be opened to see the results by date and by visit. Sessions created by the Visit Distribution Task Scheduler also appear in this list.
Key Features
- Start a new session with the Standard rule (source facility or employee, target master facility) or the Custom #1 rule
- Pick the source employee through a name search in AlayaCare
- Filter the session list by date range
- Open a session to process the whole date range with one click
- Review counts by date and the outcome of every visit, including the AlayaCare error message when an update fails
- Export a selected session to Excel
Typical Workflow
- Choose a date range and click Refresh List to find earlier sessions, or click Start A New Session.
- Choose the Processing Rule, the source, the target facility and the Visits From / To dates, then click Save and confirm the date range.
- The session opens. Click Process Job and wait for the progress panel to finish.
- Review the Dates and Visits tabs. Visits marked Failed show the reason in Message.
- Return to the list with the back link in the title and use Export Selected to save the session to Excel.
Available Permissions
The following permissions are available to be assigned to AlayaCare Roles:
| Attribute | What It Controls |
|---|---|
| View | Open the page and the session details, start sessions, process a session and export |
Main Grid
Lists the sessions whose visit dates fall in the selected range (14 rows per page). The first five columns stay in place when you scroll sideways. Tick a row (click it) to select it for Export Selected.
| Column | Description |
|---|---|
| ID | Session number (numbered by year). |
| Source Entity Type | Facility or Employee. |
| Source AC ID | AlayaCare ID of the source facility or employee. |
| Source Name | Name of the source facility or employee. |
| Target Facility ID | Shows the same AlayaCare ID as Source AC ID, not the ID of the target facility. |
| Target Name | Name of the target master facility. |
| Rule | Processing rule: Standard, Custom #1, or AutoTask for sessions created by the Visit Distribution Task Scheduler. |
| From Date | First day of the visit range. |
| To Date | Last day of the visit range. |
| Passed | Number of visit updates that succeeded. |
| Failed | Number of visit updates that failed. |
| Processing Start | When processing began. |
| Processing End | When processing finished. |
| Added | When the session was created. |
| Added By | User who created the session. |
| Manage Records | Edit icon that opens the session. |
Main Grid Filters
| Filter | Purpose |
|---|---|
| Choose a Range | Date range used to list sessions. It starts as today to today. |
Click Refresh List to reload the sessions for the chosen range.
Actions
| Button | Description |
|---|---|
| Start A New Session | Opens the Visit Distribution dialog. |
| Export Selected | Exports the one selected session to Excel (see below). Nothing happens unless exactly one row is selected. |
| Refresh List | Reloads the sessions for the chosen date range. |
| Edit (row icon, or right-click a row) | Opens the session details. |
Export Selected creates a workbook with three sheets: a Home sheet with the session details (ID, source type and name, target facility name and chair IDs, service code ID, visit range, added date and user), a Dates Processed sheet (Date, Recurring Visit Count, Recurring Updates Passed, Recurring Updates Failed, Single Visit Count, Single Visit Updates Passed, Single Visit Updates Failed) and a Visits Processed sheet (AC Visit ID, Start At, End At, Duration (Mins), Client Name, Employee Name, Facility Name, Service Code, Visit Status, Approval Status). The Service Code column on the visits sheet is left blank.
Dialog Components
Visit Distribution (Start A New Session)
Opens from Start A New Session. Click Save to create the session or Cancel to close. After the fields are validated you are asked to confirm the date range ("You have selected from ... to ... Is this range correct?"). Once confirmed the session is created and opened.
| Field | Purpose |
|---|---|
| Processing Rule | Standard or Custom #1. |
| Source Entity Type | Facility or Employee. Shown for the Standard rule; Custom #1 always uses a facility. |
| Source Facility | Facility whose visits are distributed. Shown when the source is a facility. |
| Source Employee Lookup | Employee whose visits are distributed. Type a name and click Search to open Search Employees, then pick the employee. Shown when the source is an employee. |
| Target Facility | Master facility whose chairs receive the visits. Only master facilities are offered. Shown for the Standard rule. |
| Service Code | Only visits with this service code are used. Shown when the source is an employee. |
| Visits From / To | Date range of the visits to distribute. |
Messages shown when something is missing include "Please select a valid date range", "End Date cannot be prior to Start Date", "Source Entity Type is required", "Source Facility is required", "Source Employee is required", "Target Facility is required" and "Service Code is required".
Search Employees
Opens from Search next to Source Employee Lookup. Type part of a name in Name, click Search, and click an employee in the list (name, AlayaCare number, city and groups are shown).
Visit Distribution Details
Opens from Edit on a session, or automatically after a new session is saved. The title has a back link to the list. Process Job runs the session; it is disabled once processing has started, so a session can be processed only once.
Tabs
| Tab | Purpose |
|---|---|
| Dates | The visit range and one row per day with the counts. |
| Visits | Every visit found for the session and what happened to it. |
Dates - Grid
The From and To boxes show the visit range (read-only).
| Column | Description |
|---|---|
| Date | Service date. |
| Recurring Visit Updates Passed | Recurring visits updated successfully. |
| Recurring Visit Updates Failed | Recurring visits that could not be updated. |
| Recurring Visit Count | Recurring visits found on the date. |
| Single Visit Updates Passed | Single visits updated successfully. |
| Single Visit Updates Failed | Single visits that could not be updated. |
| Single Visit Count | Single visits found on the date. |
Visits - Grid
| Column | Description |
|---|---|
| Start / End | Visit start and end, in the facility time zone. |
| Client Name | Client on the visit. |
| Employee Name | Employee on the visit. |
| Service Code | Service code of the visit. |
| Visit Status | Status of the visit in AlayaCare. |
| Approval Status | approved, not approved or cancelled. |
| New Facility ID | AlayaCare ID of the chair the visit was given to. |
| Facility Name | Name of that chair. |
| Status | Ok when AlayaCare accepted the change, Failed otherwise. |
| Message | Reason for a failure: "No Available Facility Found", "Visit Already Assigned", or the message returned by AlayaCare. |
Dependencies
The following tables must be configured for lookups on this view to work:
| Table | Description |
|---|---|
| Facilities | Source and target facilities, their chairs and time zones. |
| Service Codes | Service code choices when the source is an employee. |
Processing Overviews
This section describes what happens after you confirm a processing action.
Process Job
- A Distributing Visits progress panel opens and the action is recorded in the activity log. The job is marked as started, which disables Process Job.
- The session's date range is converted to whole days in the facility time zone (the target facility for Standard, the source facility for Custom #1). The following steps are repeated for each day.
- The visits for the day are read from AlayaCare, from the source facility or from the source employee. Unavailability entries are ignored.
- Each visit is opened in AlayaCare and a record of it is saved (client, employee, service code, times, status, approval status, current facility, and whether it is recurring or single). Which visits are kept depends on the rule:
- Standard with a facility source: every visit.
- Standard with an employee source: only visits with the chosen service code. A visit that is already on a facility that is not a master facility is kept but flagged Visit Already Assigned.
- Custom #1: only visits carrying an AM or PM tag (Night and Evening count as PM). With an employee source the service code and already-assigned checks above also apply.
- The chairs are lined up: for Standard, every chair of the target master facility; for Custom #1, four fixed chairs named "Palermo - Shift 1 - AM", "Palermo - Shift 2 - AM", "Palermo - Shift 3 - PM" and "Palermo - Shift 4 - PM" (AM visits use the AM chairs and PM visits the PM chairs). The chair's existing visits for the day are read from AlayaCare. Cancelled visits do not block a chair.
- Each saved visit that is not flagged as already assigned is given to the first chair with no overlapping visit. Under Custom #1, if no chair is free the visit is still given to the first chair of its AM or PM group. A visit with no free chair, or flagged as already assigned, is counted as failed.
- For every visit that received a chair, the visit is read again from AlayaCare. A single visit (or a recurring visit that was individually modified) is updated with the new facility, with all AlayaCare override checks switched on (overlapping visit, service instructions, reason code, locked visit, blocked employee, unavailable employee, blocked facility and authorization). A recurring visit is updated by changing the facility on its recurring schedule.
- Each visit is marked Ok, or Failed with the reason ("No Available Facility Found", "Visit Already Assigned" or the AlayaCare message), and the counts on the Dates tab are refreshed.
- When all days are done the processing end time and duration are saved and a message reports how many visits were assigned and how many failed.