ACI Documentation

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

  1. Choose a date range and click Refresh List to find earlier sessions, or click Start A New Session.
  2. Choose the Processing Rule, the source, the target facility and the Visits From / To dates, then click Save and confirm the date range.
  3. The session opens. Click Process Job and wait for the progress panel to finish.
  4. Review the Dates and Visits tabs. Visits marked Failed show the reason in Message.
  5. 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:

AttributeWhat It Controls
ViewOpen 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.

ColumnDescription
IDSession number (numbered by year).
Source Entity TypeFacility or Employee.
Source AC IDAlayaCare ID of the source facility or employee.
Source NameName of the source facility or employee.
Target Facility IDShows the same AlayaCare ID as Source AC ID, not the ID of the target facility.
Target NameName of the target master facility.
RuleProcessing rule: Standard, Custom #1, or AutoTask for sessions created by the Visit Distribution Task Scheduler.
From DateFirst day of the visit range.
To DateLast day of the visit range.
PassedNumber of visit updates that succeeded.
FailedNumber of visit updates that failed.
Processing StartWhen processing began.
Processing EndWhen processing finished.
AddedWhen the session was created.
Added ByUser who created the session.
Manage RecordsEdit icon that opens the session.

Main Grid Filters

FilterPurpose
Choose a RangeDate range used to list sessions. It starts as today to today.

Click Refresh List to reload the sessions for the chosen range.

Actions

ButtonDescription
Start A New SessionOpens the Visit Distribution dialog.
Export SelectedExports the one selected session to Excel (see below). Nothing happens unless exactly one row is selected.
Refresh ListReloads 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.

FieldPurpose
Processing RuleStandard or Custom #1.
Source Entity TypeFacility or Employee. Shown for the Standard rule; Custom #1 always uses a facility.
Source FacilityFacility whose visits are distributed. Shown when the source is a facility.
Source Employee LookupEmployee 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 FacilityMaster facility whose chairs receive the visits. Only master facilities are offered. Shown for the Standard rule.
Service CodeOnly visits with this service code are used. Shown when the source is an employee.
Visits From / ToDate 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

TabPurpose
DatesThe visit range and one row per day with the counts.
VisitsEvery visit found for the session and what happened to it.
Dates - Grid

The From and To boxes show the visit range (read-only).

ColumnDescription
DateService date.
Recurring Visit Updates PassedRecurring visits updated successfully.
Recurring Visit Updates FailedRecurring visits that could not be updated.
Recurring Visit CountRecurring visits found on the date.
Single Visit Updates PassedSingle visits updated successfully.
Single Visit Updates FailedSingle visits that could not be updated.
Single Visit CountSingle visits found on the date.
Visits - Grid
ColumnDescription
Start / EndVisit start and end, in the facility time zone.
Client NameClient on the visit.
Employee NameEmployee on the visit.
Service CodeService code of the visit.
Visit StatusStatus of the visit in AlayaCare.
Approval Statusapproved, not approved or cancelled.
New Facility IDAlayaCare ID of the chair the visit was given to.
Facility NameName of that chair.
StatusOk when AlayaCare accepted the change, Failed otherwise.
MessageReason 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:

TableDescription
FacilitiesSource and target facilities, their chairs and time zones.
Service CodesService code choices when the source is an employee.

Processing Overviews

This section describes what happens after you confirm a processing action.

Process Job

  1. 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.
  2. 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.
  3. The visits for the day are read from AlayaCare, from the source facility or from the source employee. Unavailability entries are ignored.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.