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

# Clinical Compliance Dashboard

> Summary dashboard of clinical report definitions, report run history, and incident counts with drill-down navigation to detail screens.

The Compliance Dashboard provides a summary of clinical reporting and incident data for the current organization, accessible at route `/cl/compliance-dashboard`.

## Overview

The page fetches data from three hooks in parallel: `useReportDefinitionList` (queries `cl_report_definitions`), `useReportRunList` (queries `cl_report_runs`), and `useIncidentList` (queries `cl_incidents`). Four summary metric cards are computed client-side: Report Definitions (total count from `cl_report_definitions`), Report Runs (count where `status = 'completed'` and count where `status = 'failed'`), Total Incidents (total count from `cl_incidents`), and Pending State Reports (count of incidents where `reported_to_state_at` is null). Each metric card is clickable and navigates to the corresponding detail screen (`/cl/report-definitions`, `/cl/report-runs`, or `/cl/incidents`). Below the metric cards, two informational text cards describe the Compliance Reports and AZDHS Incident Reporting sections. A loading skeleton of four cards is shown while data loads.

## Who it's for

Requires permission `cl.report_definitions.view` (enforced by `RequirePermission` in the route at `/cl/compliance-dashboard`).

## Before you start

* You must hold the `cl.report_definitions.view` permission.
* Report definitions, runs, and incidents are all scoped to the current organization.

## Steps

<Steps>
  <Step title="Open the Compliance Dashboard">
    Navigate to `/cl/compliance-dashboard`. A 4-card skeleton loads while data is fetched from `cl_report_definitions`, `cl_report_runs`, and `cl_incidents`.
  </Step>

  <Step title="Review summary metric cards">
    The four cards show: total report definitions configured, completed and failed report runs, total incidents, and incidents pending state reporting (no `reported_to_state_at` date).
  </Step>

  <Step title="Drill into Report Definitions">
    Click the "Report Definitions" card to navigate to `/cl/report-definitions`.
  </Step>

  <Step title="Drill into Report Runs">
    Click the "Report Runs" card to navigate to `/cl/report-runs`.
  </Step>

  <Step title="Drill into Incidents">
    Click either the "Total Incidents" or "Pending State Reports" card to navigate to `/cl/incidents`.
  </Step>
</Steps>

## Key concepts

<AccordionGroup>
  <Accordion title="Metric card values">
    All four metric values are computed from data already loaded by the three hooks — no additional queries are made. The "completed" and "failed" counts are derived from `cl_report_runs.status`. "Critical/high" incidents are filtered by `severity === 'critical' || severity === 'high'`.
  </Accordion>

  <Accordion title="Stub behavior noted in UI">
    The Compliance Reports card text states HEDIS/CARF reports require CL-10 (Outcomes Tracking) data (currently a stub) and PDF/CSV/Excel generation requires PF-12 (Report Engine) (currently placeholder data).
  </Accordion>

  <Accordion title="Incident immutability">
    The AZDHS card text states: "Once reported to the state, incidents become immutable for audit integrity." This is stated in the component's rendered text.
  </Accordion>
</AccordionGroup>

## Related

<Columns cols={2}>
  <Card title="Clinical" icon="stethoscope" href="/cl/overview">
    Overview of the Clinical core.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index">
    Documentation coverage and governance.
  </Card>
</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/cl.tsx
  * src/cores/cl/pages/ComplianceDashboardPage.tsx
  * src/cores/cl/hooks/useReportDefinitions.ts
  * src/cores/cl/hooks/useReportRuns.ts
  * src/cores/cl/hooks/useIncidents.ts
</Accordion>
