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

# Care Coordination & Transitions — Integration

> Feature ID: CL-12 Status: ✅ Implemented Spec Reference: CL-12-care-coordination-transitions.md Last Updated: 2026-02-21 Last Verified: 2026-02-21

**Feature ID:** CL-12\
**Status:** ✅ Implemented\
**Spec Reference:** [CL-12-care-coordination-transitions.md](../../../specs/cl/specs/CL-12-care-coordination-transitions.md)\
**Last Updated:** 2026-02-21\
**Last Verified:** 2026-02-21

***

## Overview

CL-12 defines care team management, transition tracking (admission/transfer/discharge), discharge planning with checklist, ADT notification generation/consumption, HEDIS FUH 7/30-day follow-up, and C-CDA 2.1 transition summary. It depends on PF-01, PF-02, PF-10, PF-11, CL-01, CL-03, CL-05; integrates with CL-07, CL-16, and PM-06 (referrals). Cross-core: PM-06 (referral\_accepted event → cl\_transitions); CL-16 (C-CDA/ADT format and transport).

***

## Quick Reference

| Item             | Value                                                                                                                  |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------- |
| Core tables      | `cl_care_teams`, `cl_transitions`, `cl_discharge_checklists` (E-1)                                                     |
| RLS helper       | `cl_has_org_access(organization_id, auth.uid())` — two-argument form (E-2)                                             |
| Permission keys  | `cl.care-team.view`, `cl.care-team.manage`, `cl.transitions.view`, `cl.transitions.manage`                             |
| Referral linkage | `cl_transitions.referral_id` → PM-06 via Platform Integration Layer (E-3); see [CL-PM Referrals](./CL-PM-REFERRALS.md) |

***

## Integration Points (from Spec)

| Dependency                    | Pattern         | Purpose                                                                                                   |
| ----------------------------- | --------------- | --------------------------------------------------------------------------------------------------------- |
| CL-01 (Patient Chart)         | Internal / Data | Care team and transitions on patient chart                                                                |
| CL-03 (Treatment Planning)    | Internal        | Treatment plan updates at transitions                                                                     |
| CL-05 (Medication Management) | Internal / Data | Medication reconciliation at every transition (`cl_transitions.medication_reconciliation_id`)             |
| CL-07 (Safety Planning)       | Internal        | Safety plan update at transitions                                                                         |
| CL-16 (FHIR Interoperability) | Event / API     | C-CDA 2.1 transition summaries; ADT notification format and transport                                     |
| PM-06 (Referral Management)   | Event / Data    | Referral coordination; `cl_transitions.referral_id`; consume `referral_accepted` (see CL-PM-REFERRALS.md) |

***

## Event / API Contracts (Placeholders)

### Consumed: `referral_accepted` (PM-06 → CL-12)

**Documentation:** [CL-PM-REFERRALS.md](./CL-PM-REFERRALS.md)

When a referral is accepted, CL-12 may create a `cl_transitions` record (type = `referral`), link `referral_id`, and trigger discharge checklist / medication reconciliation / C-CDA generation as applicable.

### ADT Notifications

**Owner:** CL-16 (FHIR Interoperability). CL-12 generates/consumes ADT events per contract defined in [CL-16 Integration](./fhir-interoperability-data-exchange-integration.md). Format and transport to be specified there.

### C-CDA 2.1 Transition Summary

**Owner:** CL-16. CL-12 records `discharge_summary_id` on `cl_transitions`; implementation may link to platform documents or CL-16 artifact. No direct FK to avoid cross-schema coupling.

***

## RLS & Security

* All three tables: RLS via `cl_has_org_access(organization_id, auth.uid())`; UPDATE policies MUST include USING and WITH CHECK (constitution §5.2.4). No policy may query RLS-protected tables directly (§5.7).
* Permission-gated UI: seed `cl.care-team.view`, `cl.care-team.manage`, `cl.transitions.view`, `cl.transitions.manage` per PF-30.

***

## References

* **Spec:** [CL-12-care-coordination-transitions.md](../../../specs/cl/specs/CL-12-care-coordination-transitions.md)
* **CL-PM Referrals:** [CL-PM-REFERRALS.md](./CL-PM-REFERRALS.md)
* **CL-16:** [CL-16-fhir-interoperability-data-exchange-INTEGRATION.md](./fhir-interoperability-data-exchange-integration.md)
