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

# Outcomes

> Dashboard summarizing post-discharge outcome assessments, alumni engagement, and reports due for the Recovery Housing module.

The Outcomes dashboard lives at `/rh/outcomes` and provides a summary view of outcome assessments, alumni activity, and scheduled reports for the current organization.

## Overview

The dashboard fetches data from three hooks scoped to `currentOrganization.id`: `useOutcomeSummary` (reads `rh_outcome_assessments`), `useAlumniSummary`, and `useReportsDue`. Four summary cards display: Total Assessments with completion rate, Pending Assessments with missed count, Active Alumni with total engagements, and Reports Due. Below the cards are two rows of charts: Sobriety Trend, Outcome Success, and Alumni Engagement. A Quick Actions panel provides links to Assessments, Indicators, Alumni Directory, and Report Hub. Two action buttons in the header navigate to New Assessment (`/rh/outcomes/assessments/new`) and Create Report (`/rh/reports/new`). If any data hook returns an error, a destructive alert is displayed using `sanitizeErrorMessage`.

## Who it's for

Requires `RH_PERMISSIONS.DASHBOARD_VIEW` (`rh.dashboard.view`) via the parent `RHViewGuard`. No finer-grained permission gate is visible on this route in `rh.tsx`.

## Before you start

Hold the `rh.dashboard.view` permission. Outcome assessment records must exist for summary cards to show non-zero values.

## Steps

<Steps>
  <Step title="Navigate to Outcomes dashboard">Go to `/rh/outcomes`.</Step>
  <Step title="Review summary cards">Read the four summary cards for assessment counts, alumni activity, and reports due.</Step>
  <Step title="Review charts">Scroll to the chart section to view Sobriety Trend, Outcome Success, and Alumni Engagement charts.</Step>
  <Step title="Start a new assessment">Click "New Assessment" in the header to navigate to `/rh/outcomes/assessments/new`.</Step>
  <Step title="Create a report">Click "Create Report" in the header to navigate to `/rh/reports/new`.</Step>
</Steps>

## Key concepts

<AccordionGroup>
  <Accordion title="Error state">
    If any of the three data hooks (`useOutcomeSummary`, `useAlumniSummary`, `useReportsDue`) returns an error, the entire page is replaced with a destructive alert titled "Error loading outcomes data". The error message is sanitized via `sanitizeErrorMessage` before display.
  </Accordion>

  <Accordion title="Loading state">
    While data is loading, summary card values are replaced with `Skeleton` placeholders. Charts receive an `isLoading` prop to render their own loading states.
  </Accordion>
</AccordionGroup>

## Related

<Columns cols={2}>
  <Card title="Recovery Housing" icon="house" href="/rh/references">
    Recovery Housing references and overview.
  </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/rh.tsx
  * src/cores/rh/pages/OutcomesDashboardPage.tsx
  * src/cores/rh/hooks/useOutcomeSummary.ts
</Accordion>
