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

# Referral Outcomes

> Track and report on referral status across community partners with summary metrics and CSV export.

The Referral Outcomes screen displays the current status of all referrals for the organization, with summary metrics, status filtering, a history panel, and CSV export, accessible at `/cl/referral-outcomes`.

## Overview

The page fetches referral current-status records from `cl_referral_current_status` scoped to the current organization. Four metric cards summarize Total Referrals, Connected, Declined, and Pending counts. A status drop-down filters the table by referral status. Clicking a referral ID row-button in the table selects that referral and reveals a status history panel (`ReferralStatusHistoryTable`). Users with `cl.referral_status.manage` can open an "Update Status" dialog for the selected referral. Users with `cl.referral_directory.search` can open a provider directory search sheet. When data is present, an "Export CSV" button downloads a file named `referral-outcomes-<date>.csv` containing Referral ID, Status, Patient Connected, Connected At, Source, Notes, and Date columns.

## Who it's for

Requires permission: `cl.referral_status.view`

Additional permissions that unlock actions:

* `cl.referral_status.manage` — enables "Update Status" for a selected referral
* `cl.referral_directory.search` — enables "Find Providers" directory search

## Before you start

* Your account must have the `cl.referral_status.view` permission.
* Referral records must exist in the system; the screen shows an empty state otherwise.

## Steps

<Steps>
  <Step title="Open Referral Outcomes">
    Navigate to `/cl/referral-outcomes`. The four summary metric cards and the referral table load automatically.
  </Step>

  <Step title="Filter by status">
    Use the "Filter by status" drop-down to narrow the table. Available statuses: Sent, Accepted, Declined, Patient Connected, Patient Did Not Connect, Closed, or All Statuses.
  </Step>

  <Step title="Select a referral">
    Click the truncated referral ID button below the table to select a referral. A "Status History" panel appears showing the full status history for that referral.
  </Step>

  <Step title="Update a referral status (manage permission required)">
    With a referral selected and `cl.referral_status.manage` permission, click "Update Status" to open the `ReferralStatusUpdateDialog` and record a new status.
  </Step>

  <Step title="Export data">
    Click "Export CSV" to download the currently visible referral outcome records as a CSV file.
  </Step>
</Steps>

## Key concepts

<AccordionGroup>
  <Accordion title="Referral statuses">
    Statuses from code: **sent** (Sent), **accepted** (Accepted), **declined** (Declined), **patient\_connected** (Patient Connected), **patient\_did\_not\_connect** (Patient Did Not Connect), **closed** (Closed).
  </Accordion>

  <Accordion title="Summary metrics">
    **Pending** counts referrals with status `sent` or `accepted`. **Connected** counts rows where `patient_connected` is true.
  </Accordion>

  <Accordion title="Empty state">
    When no referral outcome records exist the table shows: "No Referral Outcomes — Referral status updates will appear here once recorded."
  </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/ReferralOutcomeReportPage.tsx
</Accordion>
