Travel Premiums
Executive Summary
Travel Premiums calculates travel distance and travel time premiums on employee visits using a selected travel premium rule. Supervisors run a job for a branch and date range, optionally limited to groups or one employee, in either Report Only or Report And Process mode. Each job keeps its own messages and an Excel workbook that can be downloaded and reviewed.
Key Features
- Start a new job in Report Only or Report And Process mode for a branch and date range
- Limit a job to one or more groups, or to a single employee
- Choose which travel premium rule to apply
- Review each job's header details and processing messages
- Download the Excel workbook for a completed job
- Cancel a job while it is running
- Configure the travel time unit and address comparison in page settings
Typical Workflow
- Select a branch
- Click Start A New Report
- Choose the processing mode, date range, groups or employee, and the premium rule
- Click Ok and wait for processing to finish; the Excel workbook downloads automatically
- Open the job (Edit) to review messages, or use Download Excel on the row to download the workbook again
Report Output
Each completed job produces an Excel workbook named Travelpremiums_ followed by the date and time. It downloads automatically when processing finishes and is saved on the job so it can be downloaded again from the grid. A job that was cancelled does not produce a workbook.
Report Contents
| Sheet | Contents |
|---|---|
| Report | The selection used for the job: date from, date to, groups, employee and premium rule. |
| Details | One row per visit, plus rows for the start point, end point and return-home stops when the rule uses them. Includes employee and client identifiers and names, visit date, time, service code, visit ID, approval status, cancel code and hold code, client groups flagged for travel premiums, the location address and coordinates, travel distance and travel time, the first, middle and last visit premium results and messages, the return allowance messages, actual duration, visit end, and employee address, branch, designation, roles, groups and job title. |
| Messages | The same messages shown on the job: employee ID and name, service date, type, message, visit ID, client UID and client name. |
Configurable Settings
Open View Settings or Edit Settings from this screen (when permitted) to change these options.
| Group | Setting | Type | Purpose |
|---|---|---|---|
| General | Travel Time Unit | Dropdown | Whether travel time is recorded in Minutes or Hours. Hours are rounded to 2 decimals. |
| General | Address Comparison Method (blank=none) | Dropdown | How a visit is compared with the prior visit to decide whether it is at the same address: blank (none), Latitude/Longitude, or Address 1,City,Postal Code. |
Available Permissions
The following permissions are available to be assigned to AlayaCare Roles:
| Attribute | What It Controls |
|---|---|
| View | Open the page, start jobs, review jobs and download results |
| All Branches | Choose any branch rather than only your own |
| Settings View | Open the settings in read-only mode |
| Settings Edit | Change the page settings |
Main Grid
The grid lists travel premium jobs for the selected branch, 14 rows per page. The first two columns stay in view when scrolling sideways.
| Column | Description |
|---|---|
| ID | Job identifier. |
| Rule | Travel premium rule used. |
| Branch | Branch the job belongs to. |
| Processing Mode | Report Only or Report And Process. |
| Groups | Groups included, when set. |
| Employee | Employee included, when set. |
| From Date | Start of the visit date range. |
| To Date | End of the visit date range. |
| Added | When the job was created. |
| Added By | User who started the job. |
| Processing Start | When processing began. |
| Processing End | When processing finished. |
| Duration | Elapsed processing time in minutes. |
| Visits Checked | Number of visits examined. |
| Visits Skipped | Number of visits that were checked but not included. |
| Visits Included | Number of visits the premiums were calculated for. |
| Errors | Error count; shown only when there are errors. |
| Cancelled | When the job was cancelled, if applicable. |
| Manage Records | Edit icon to open the job, and a Download Excel icon (works only when the job has a workbook). |
Right-click a row for a menu with Edit, column auto-fit and page navigation options.
Main Grid Filters
| Filter | Purpose |
|---|---|
| Branch | Limits the job list to the selected branch. Choosing other branches requires the All Branches permission. |
Actions
| Button | Description |
|---|---|
| Start A New Report | Opens the new-job dialog. |
| View Settings | Opens page settings read-only (requires Settings View). |
| Edit Settings | Opens page settings for editing (requires Settings Edit). |
| Edit (row icon or right-click menu) | Opens the job detail dialog. |
| Download Excel (row icon) | Downloads the workbook for a completed job. |
Dialog Components
Start A New Report Dialog
Opens when you click Start A New Report. Select one or more groups, a specific employee, or leave both blank for all employees. Ok creates the job and starts processing.
| Field | Purpose |
|---|---|
| Branch | Branch used for the job. |
| Processing Mode | Report Only or Report And Process. Defaults to Report Only. |
| Choose a Range | Visit date range. |
| Groups | Optional; limits the job to employees in the selected groups. |
| Employee | Optional; a single employee. Disabled when groups are selected. |
| Premium Rule | Travel premium rule to apply. Selected automatically when only one rule exists. |
Ok shows a message and stops if any of these are missing or invalid:
- "Please select a valid branch"
- "Please select a valid premium rule"
- "Please select a valid date range"
- "Login To Alaya Failed"
While the job runs, a progress panel is shown with a Cancel option.
Job Detail Dialog
Opens from Edit on a job row. It is titled "Travel Premium Job" followed by the job ID and closes with Close. All values are read-only.
Tabs
| Tab | Purpose |
|---|---|
| General | From date, to date, branch, employee, processing mode, groups, travel premium rule, error count, visits checked, visits skipped and visits included. |
| Messages | Processing messages for employees, clients and visits. |
Messages — Grid
12 rows per page.
| Column | Description |
|---|---|
| Employee | Employee the message relates to. |
| Service Date | Visit service date. |
| Type | Message type. |
| Message | Processing message. |
| Client | Client name. |
| Visit ID | AlayaCare visit ID. |
| Client UID | AlayaCare client UID. |
Dependencies
The following tables must be configured for lookups on this view to work:
| Table | Description |
|---|---|
| Branches | Branch list used to filter jobs and start a report. |
| Groups | Optional employee-group filter on the new-job dialog. |
| Travel Premium Rules | Rules selectable when starting a job, including their rule settings. Also covers its travel premium rule service codes: service codes each rule includes. |
| Common Locations | Office locations by type, used when a rule starts, ends or returns at the nearest office. |
| Cancel Codes | Cancel reasons a rule may include for cancelled visits. |
| Premium Codes | Premium codes written to visits. |
Processing Overviews
Start A New Report
After Ok, a job is created and travel premiums are calculated. The job stores the branch, processing mode, date range, groups or employee, premium rule, when processing started and finished, the visit counts, and any messages.
- Switches to the selected branch in AlayaCare and loads the premium rule and its included service codes. If the rule cannot be found, a warning is shown and the job ends.
- Loads visits from AlayaCare for the date range. With groups selected, only employees in those groups are included; with one employee selected, only that employee; with neither, all employees except the vacant employee. Only visits that have both a client and an employee are kept. Employee, client, service and existing premium details are loaded ahead of time to speed up processing.
- Works one employee and one service day at a time, in visit start-time order. An employee who cannot be loaded produces an error message.
- Skips visits and records the reason: same address as the prior visit (per Address Comparison Method), service location missing, client location missing, service code not included, visit cancelled, cancelled with a reason that is not included, on hold, approved, completed, or scheduled when the rule excludes that status. A visit with no service produces an error message.
- Builds the route for each day. Depending on the rule, it includes travel to the first visit from the employee address or the nearest office, travel from the last visit to the employee address or the nearest office, and a return-home stop when the gap to the next visit meets the rule's qualifying minutes. Driving distance (km, 2 decimals) and time (minutes) come from a mapping service. When the rule uses a fixed amount for travel time, that amount is used instead of the calculated time. Routes that cannot be calculated produce error messages that name the unreachable stop.
- Applies the premiums for first, middle and last visits, for both distance and time, using the rule's thresholds. Return-home stops are included in the route only; no separate premium is written for them.
- Report Only: records messages such as "Premium would be added", "Premium already exists" or "Premium exists with different value". Nothing is written to AlayaCare.
- Report And Process: adds any missing premium ("Premium was added" or "Adding Premium failed"). If a premium exists with a different quantity it is updated ("Premium updated" or "Premium update failed"); if the same, "Premium already exists". Premium descriptions are Travel KM and Travel Time, with "(FV)" for first visit and "(LV)" for last visit.
- Writes the Excel workbook, saves the visit counts, duration and messages on the job, downloads the workbook and marks the job completed.
- If cancelled, the cancel time is stored, the message "Job Has Been Cancelled" is recorded and no workbook is produced.