> ## 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 Therapy Documentation — Integration

> Feature ID: CL-14 Status: 📝 Planned Spec Reference: CL-14-group-therapy-documentation.md Last Updated: 2026-02-21

**Feature ID:** CL-14\
**Status:** 📝 Planned\
**Spec Reference:** [CL-14-group-therapy-documentation.md](../../../specs/cl/specs/CL-14-group-therapy-documentation.md)\
**Last Updated:** 2026-02-21

***

## Overview

CL-14 defines group therapy session creation, attendance tracking, and individual member documentation (individual response, goal progress). It depends on CL-01 (patient chart), CL-03 (treatment goals), CL-11 (42 CFR Part 2 consent for SUD groups), PM-04 (group session scheduling), and PM-07 (group billing / HQ modifier at charge capture). Integration with PM-04 and PM-07 is documented in [CL-PM-GROUP-SESSIONS](./CL-PM-GROUP-SESSIONS.md). Part 2 consent integration is documented in [CL-11-consent-management-42cfr-part2-INTEGRATION.md](./consent-management-42cfr-part2-integration.md).

***

## Integration Points (from Spec)

| Dependency                 | Pattern        | Purpose                                                                                                                                                                                  |
| -------------------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CL-01 (Patient Chart)      | Internal       | Group attendance surfaced on patient chart                                                                                                                                               |
| CL-03 (Treatment Planning) | Internal       | Goal progress from group participation                                                                                                                                                   |
| CL-11 (Part 2 Consent)     | Platform / API | SUD groups: verify consent before displaying/documenting SUD content; `cl_check_sud_consent(chart_id, 'group_attendance', auth.uid())` (3-argument SECURITY DEFINER)                     |
| PM-04 (Group Scheduling)   | Platform Layer | Group session scheduling; `cl_group_sessions.schedule_id` links to PM-04 via Platform Integration Layer. See [CL-PM-GROUP-SESSIONS](./CL-PM-GROUP-SESSIONS.md).                          |
| PM-07 (Billing)            | Event / Data   | `cl_group_session_documented` event published on session completion; HQ modifier calculated at charge capture from participant count; no billing columns in CL-14 (see spec Errata E-1). |

***

## API / Data Contracts

* **CL-11 consent check:** Before displaying SUD group lists/details or opening individual documentation, call backend helper (e.g. SECURITY DEFINER `cl_check_sud_consent(chart_id, auth.uid())`) to verify active Part 2 consent or exception. Failure: hide/omit SUD groups or surface "consent required" / block save per CL-11 contract.
* **PM-04 / schedule\_id:** Read-only reference from `cl_group_sessions.schedule_id` to PM-04 group schedule via Platform Integration Layer; no direct FK. See [CL-PM-GROUP-SESSIONS](./CL-PM-GROUP-SESSIONS.md) for ownership and field mapping.

***

## Event Contracts

* **Event:** `cl_group_session_documented` — published by CL-14 when session status transitions to `completed`. Consumed by PM-07 for charge capture with HQ modifier. Payload defined in [CL-PM-GROUP-SESSIONS](./CL-PM-GROUP-SESSIONS.md). Registered in `src/platform/events/types.ts` and seeded in `fw_workflow_events`.

***

## Security and RLS

* All CL-14 tables use `organization_id`; RLS via SECURITY DEFINER helpers; UPDATE policies include WITH CHECK (§5.2.4). PHI columns (`individual_response`, `goal_progress_notes`) restricted by org and role; SUD groups enforce Part 2 consent via application layer and CL-11.

***

## Related Docs

* [CL-PM-GROUP-SESSIONS](./CL-PM-GROUP-SESSIONS.md) — PM-04 / CL-14 ownership and schedule\_id linkage
* [CL-11-consent-management-42cfr-part2-INTEGRATION.md](./consent-management-42cfr-part2-integration.md) — Part 2 consent verification for SUD groups
* [CROSS\_CORE\_INTEGRATIONS.md](./CROSS_CORE_INTEGRATIONS.md) — Integration matrix
