> ## 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.

# Governance Incidents

> Browse, report, and view organizational incidents — with category, severity, and status filters and a tabbed detail with investigation and corrective actions.

The Incidents page (`/gr/incidents`) renders `IncidentListPage`, which displays all incidents for the organization with stats, filters, and a table view. Incident reporting must be enabled in Governance Settings.

## Overview

`IncidentListPage` calls `useIncidentList` (with search and filter params) and `useIncidentStats` to display a four-card stats header (Total Incidents, Open, Critical, Overdue Actions) and a filterable table. Filters include category, severity, and status. Each row navigates to `/gr/incidents/:id`.

A **Report Incident** button is shown to users with `gr.incidents.report`; clicking it opens `ReportIncidentDialog`. Alternatively, users can navigate directly to `/gr/incidents/report` for the full wizard.

The page respects the `gr_incident_reporting_enabled` feature flag from `useGRModuleSettings` — if disabled, an empty state is shown instead of the list.

## Who it's for

Requires permission: `gr.incidents.view` (`GR_PERMISSIONS.INCIDENTS_VIEW`). The report-incident action additionally requires `gr.incidents.report`.

## Before you start

* Incident reporting must be enabled in Governance Settings (`gr_incident_reporting_enabled = true`).
* You need `gr.incidents.view` to access this page.
* To file a new incident, you also need `gr.incidents.report`.

## Finding an incident

1. Navigate to `/gr/incidents`. The page loads the incident list with stats.
2. Check the four stat cards: Total Incidents, Open, Critical, and Overdue Actions.
3. Use the search box to find incidents by title. Use the Category, Severity, and Status dropdowns to narrow results. Available categories come from `INCIDENT_CATEGORIES`; severities from `INCIDENT_SEVERITIES`; statuses from `INCIDENT_STATUSES`.
4. Click any table row to navigate to `/gr/incidents/:id` for full detail.
5. If you hold `gr.incidents.report`, click **Report Incident** to open the quick-report dialog, or navigate to `/gr/incidents/report` for the step-by-step wizard.

**INCIDENT\_CATEGORIES / INCIDENT\_SEVERITIES / INCIDENT\_STATUSES** — constant arrays from `src/cores/gr/types/incidents.ts` that drive the filter dropdowns.

**useIncidentStats** — hook returning `total`, `open`, `critical`, `overdue_actions` for the stats header.

**gr\_incident\_reporting\_enabled** — module settings flag; disabling it shows an empty state and prevents reporting.

## Viewing an incident

The Incident Details page (`/gr/incidents/:id`) renders `IncidentDetailPage`, a tabbed layout showing all information about a single incident including its timeline, investigations, corrective actions, and regulatory reporting obligations.

`IncidentDetailPage` loads a single incident via `useIncidentDetail(id)` and renders four tabs:

| Tab               | Content                                                                                                                                     |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **Overview**      | Incident details (category, description, location) and timeline (incident date, reported date, resolved date, resolution summary)           |
| **Investigation** | `InvestigationTab` — investigations and findings attached to the incident                                                                   |
| **Actions**       | `CorrectiveActionsTab` — corrective action items                                                                                            |
| **Regulatory**    | `RegulatoryReportsTab` — shown only to users with `gr.incident_regulatory_reports.view`; badge turns destructive when overdue reports exist |

Header actions:

* **Resolve** — available to `gr.incidents.close` when status is not `resolved` or `closed`; calls `resolveIncident`
* **Close Incident** — available to `gr.incidents.close` when status is `resolved`; calls `closeIncident`

The active tab is synced to the URL via `useTabUrlState` (`?tab=`).

Additional permissions used within this page:

* `gr.incidents.close` — to resolve or close the incident
* `gr.incident_regulatory_reports.view` — to see the Regulatory tab

1. Navigate to `/gr/incidents/:id` directly, or click a row in the Incidents list. The page header shows the incident title, reported date, location (if set), severity badge, and status badge.
2. Review the **Overview** tab: read the incident category, description, and location. The Timeline card shows incident date, reported date, and (if resolved) resolution date and summary.
3. Click the **Investigation** tab to see any investigation records and their findings.
4. Click the **Actions** tab; a badge shows the count of corrective action items.
5. Click the **Regulatory** tab (visible with `gr.incident_regulatory_reports.view`); a destructive badge indicates overdue reports.
6. If you hold `gr.incidents.close`: click **Resolve** to mark the incident resolved, or **Close Incident** if it is already in `resolved` status.

**useIncidentDetail** — hook fetching a single incident with its `investigations`, `findings`, and `corrective_actions` arrays.

**useIncidentRegulatoryReports** — hook fetching regulatory reports linked to the incident; exposes `is_overdue` per report.

**SeverityBadge / StatusBadge** — visual components from `src/cores/gr/components/incidents/`.

## Related

<Columns cols={2}>
  <Card title="Governance & Compliance" icon="scale-balanced" href="/gr/overview">
    Governance & Compliance core overview.
  </Card>

  <Card title="Governance & parity" icon="clipboard-check" href="/governance/index" />
</Columns>

<Note>
  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.
</Note>

<Accordion title="Documentation sources">
  * src/routes/gr.tsx
  * src/cores/gr/pages/IncidentListPage.tsx
  * src/cores/gr/pages/IncidentDetailPage.tsx
  * src/cores/gr/types/incidents.ts
  * src/cores/gr/hooks/useIncidentList.ts
  * src/cores/gr/hooks/useIncidentDetail.ts
  * src/cores/gr/hooks/useIncidentRegulatoryReports.ts
</Accordion>
