Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

The Significant Events screen at /rh/significant-events displays a filterable, real-time-updated list of significant events for the current organization and allows staff to report new events via a dialog.

Overview

The page loads significant events via useSignificantEvents, which queries the rh_significant_events table joined to rh_significant_event_types and a nested rh_episodesrh_residences + rh_resident_profiles join, filtered by organization_id and ordered by event_date descending. The hook also subscribes to all events on rh_significant_events via useRealtimeSubscription; any change triggers a refetch. Separately, useSignificantEventAlerts subscribes to INSERT events on rh_significant_events and fires a Sonner toast: destructive (toast.error, 10 s) for critical or major severity, warning (toast.warning, 6 s) for others. Filters available: free-text search (description.ilike / incident_summary.ilike), status (draft, submitted, under_review, closed), and severity (minor, moderate, major, critical). The Report Event button (shown to all users with rh.dashboard.view) opens SignificantEventDialog. The RealtimeConnectionBadge next to the heading reflects whether any real-time channels are active. Individual event rows navigate to /rh/significant-events/:id. Creating a new event through the wizard requires RH_PERMISSIONS.SIGNIFICANT_EVENTS_CREATE at /rh/significant-events/new.

Who it’s for

No route-level RequirePermission beyond the outer RHViewGuard (rh.dashboard.view) on /rh/significant-events. Creating events via the wizard at /rh/significant-events/new requires RH_PERMISSIONS.SIGNIFICANT_EVENTS_CREATE (rh.significant-events.create).

Before you start

  • Hold rh.dashboard.view to access the RH module and view the significant events list.
  • Hold rh.significant-events.create to access the new-event wizard at /rh/significant-events/new.
  • Understand the status lifecycle and severity classifications for your organization (confirm with SME).

Steps

1

Open Significant Events

Navigate to /rh/significant-events. The table loads all events ordered by most recent event date first.
2

Check real-time connection

The RealtimeConnectionBadge next to the heading shows whether live updates are active. New events trigger toast alerts automatically while the page is open.
3

Filter the list

Use the search input to match description or incident_summary text. Use the Status dropdown to filter by draft, submitted, under_review, or closed. Use the Severity dropdown to filter by minor, moderate, major, or critical.
4

Review an event

Click a row to navigate to /rh/significant-events/:id for the full event detail.
5

Report a new event (inline)

Click Report Event to open SignificantEventDialog. Complete the form and save. The table updates in real time.
6

Use the reporting wizard (if authorized)

Users with rh.significant-events.create may navigate to /rh/significant-events/new to use the SignificantEventReportingWizardPage for a guided submission flow.

Key concepts

useSignificantEvents subscribes to all events (INSERT, UPDATE, DELETE) on rh_significant_events and refetches on any change. useSignificantEventAlerts subscribes separately to INSERT events and fires toast notifications: 10-second destructive toasts for critical/major severity, 6-second warning toasts for others. Both subscriptions are scoped to organization_id via autoInjectOrgId.
Observable status values: draft, submitted, under_review, closed. The transition rules and authorization requirements for each step should be confirmed with a subject-matter expert.
Observable severity values: minor, moderate, major, critical. The operational and regulatory meaning of each level should be confirmed with a subject-matter expert.
Events reference rh_significant_event_types via event_type_id. The specific event type taxonomy is stored in that table; the values are not enumerated in the UI code reviewed.

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.
  • src/routes/rh.tsx
  • src/cores/rh/pages/SignificantEventsPage.tsx
  • src/cores/rh/hooks/useSignificantEvents.ts
  • src/cores/rh/hooks/useSignificantEventAlerts.ts
  • src/cores/rh/types/index.ts