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

# Group Outcomes

> Dashboard showing attendance and completion rate metrics across group therapy sessions at route /cl/group-sessions/outcomes.

The Group Outcomes screen (`/cl/group-sessions/outcomes`) displays aggregated metrics for group therapy sessions including completion rates, attendance rates, and a breakdown by group type.

## Overview

The page renders via `GroupOutcomeDashboard` (re-exported by `GroupOutcomeDashboardPage.tsx`) using the `useGroupOutcomeMetrics` hook. The hook queries `cl_group_sessions` and `cl_group_attendance` for the current organization, with optional date range filters. Four summary stat cards display: Total Sessions, Completion Rate (%), Attendance Rate (%), and Average Participants. When a **By Group Type** breakdown is available, a table lists each `group_type` with session count, completed sessions, total attendance records, present count, and calculated rate. Date range inputs (`From` / `To`) are rendered above the stat cards; changing either value re-runs the query with updated filters.

## Who it's for

Requires permission `cl.group_sessions.view`.

## Before you start

* You must hold `cl.group_sessions.view`.
* An organization must be selected; `useGroupOutcomeMetrics` returns empty metrics without `organization_id`.

## Steps

<Steps>
  <Step title="Open Group Outcomes">
    Navigate to `/cl/group-sessions/outcomes`. All-time metrics for the organization load immediately.
  </Step>

  <Step title="Apply a date range filter">
    Enter a **From** date, a **To** date, or both using the date inputs above the stat cards. The hook re-fetches automatically when either value changes.
  </Step>

  <Step title="Read the summary stat cards">
    The four cards show: **Total Sessions** (count from `cl_group_sessions`), **Completion Rate** (completed sessions / total × 100), **Attendance Rate** (present-equivalent records / total attendance records × 100), and **Avg Participants** (total attendance records / total sessions, rounded).
  </Step>

  <Step title="Review the By Group Type table">
    When `byGroupType` has entries, a breakdown table appears showing each group type with columns: Type, Sessions, Completed, Attendance, Present, Rate. Types are capitalized and underscores replaced with spaces.
  </Step>
</Steps>

## Key concepts

<AccordionGroup>
  <Accordion title="Present-equivalent attendance">
    The hook counts `attendance_status` values of `present`, `late`, and `early_departure` as present when computing attendance rate and the group-type present count.
  </Accordion>

  <Accordion title="Empty / zero state">
    When no sessions exist for the selected date range, the hook returns zero values for all metrics and an empty `byGroupType` object. The stat cards render `0` and `0%`; the By Group Type table is hidden.
  </Accordion>

  <Accordion title="Error state">
    On query failure, a sanitized error message is displayed with an AlertCircle icon and a **Retry** link (page reload).
  </Accordion>

  <Accordion title="Loading state">
    Four skeleton cards replace the stat cards while the query is in flight.
  </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/GroupOutcomeDashboardPage.tsx
  * src/cores/cl/components/group-therapy/GroupOutcomeDashboard.tsx
  * src/cores/cl/hooks/useGroupOutcomeMetrics.ts
</Accordion>
