The Training screen atDocumentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
/rh/staff-operations/training displays a list of staff training records for the current organization, with filters for training type and expiration window, an expiring-soon alert, and the ability to add new training records.
Overview
The page loads training records viauseStaffTrainings, which queries the rh_staff_trainings table scoped to organization_id, ordered by expiry_date ascending (nulls last). The hook computes a days_until_expiry field client-side using differenceInDays from date-fns. On mount, the page also queries trainings expiring within 30 days and with is_current = true; if any are found, a destructive Alert banner is shown with the count.
Filters: training type (narr, slh, safety, other), expiring-within window (7, 30, 60, 90 days), and a “Current Only” toggle (is_current). The Add Training Record button is gated by PermissionGate with rh.staff-operations.create and opens StaffTrainingDialog. Filters are applied both server-side (training type, isCurrent) and client-side (expiring-within-days).
Who it’s for
No route-levelRequirePermission beyond the outer RHViewGuard (rh.dashboard.view). The Add Training Record button uses an inline PermissionGate requiring rh.staff-operations.create. Viewing records requires only rh.dashboard.view.
Before you start
- Hold
rh.dashboard.viewto access the RH module and view training records. - Hold
rh.staff-operations.createto add new training records. - Understand the training type taxonomy used by your organization (confirm with SME).
Steps
Open Training
Navigate to
/rh/staff-operations/training. The table loads all training records ordered by expiry date ascending.Review the expiring-soon alert
If any current training records expire within the next 30 days, a destructive alert banner appears at the top of the page showing the count.
Filter by training type
Use the Training Type dropdown to filter by
NARR, SLH, Safety, or Other. Select “All Types” to clear the filter.Filter by expiration window
Use the Expiring Within dropdown to show only records expiring within 7, 30, 60, or 90 days. Select “All Trainings” to clear.
Show only current records
Toggle Current Only to limit the table to records where
is_current = true.Key concepts
Training types
Training types
Observable values:
narr, slh, safety, other. The regulatory significance of each type (e.g., accreditation standards, licensing requirements) should be confirmed with a subject-matter expert.Expiry calculation
Expiry calculation
days_until_expiry is computed client-side by useStaffTrainings using differenceInDays(parseISO(expiry_date), today). Records with a null expiry_date have a null days_until_expiry.Expiring-soon banner
Expiring-soon banner
Current-only filter
Current-only filter
is_current is a boolean column on rh_staff_trainings applied as a server-side filter. Its definition (e.g., whether it reflects a manual flag or computed state) should be confirmed with a subject-matter expert.Related
Recovery Housing
Recovery Housing references and overview.
Governance & parity
Documentation coverage and governance.
This page documents shipped product behavior. It is not medical, legal, or
billing advice. Verify against your organization’s policies and applicable
regulations before using it for clinical, compliance, or billing decisions.
Protected health information (PHI) shown in the product is governed by your
tenant’s access controls and is never exposed in this documentation.
Documentation sources
Documentation sources
- src/routes/rh.tsx
- src/cores/rh/pages/StaffTrainingsPage.tsx
- src/cores/rh/hooks/useStaffTrainings.ts
- src/cores/rh/types/index.ts