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

# Discharge & Aftercare Planning — Admin Guide

> This guide covers administrative configuration for the Discharge & Aftercare Planning feature, including permission setup, compliance alignment, and data gover…

## Overview

This guide covers administrative configuration for the Discharge & Aftercare Planning feature, including permission setup, compliance alignment, and data governance.

***

## Permission Configuration

CL-29 uses 9 permission keys. Assign these via **Settings > Permissions** based on clinical role.

| Permission Key                 | Description               | Recommended Roles                      |
| ------------------------------ | ------------------------- | -------------------------------------- |
| `cl.aftercare-plans.view`      | View aftercare plans      | All clinical staff                     |
| `cl.aftercare-plans.create`    | Create aftercare plans    | Licensed clinicians, supervisors       |
| `cl.aftercare-plans.update`    | Edit aftercare plans      | Licensed clinicians, supervisors       |
| `cl.follow-up-contacts.view`   | View follow-up contacts   | All clinical staff                     |
| `cl.follow-up-contacts.create` | Record follow-up contacts | Clinical staff, care coordinators      |
| `cl.readmission-risk.view`     | View risk assessments     | All clinical staff                     |
| `cl.readmission-risk.create`   | Create risk assessments   | Licensed clinicians, supervisors       |
| `cl.warm-handoffs.view`        | View warm handoffs        | All clinical staff                     |
| `cl.warm-handoffs.create`      | Document warm handoffs    | Licensed clinicians, care coordinators |

### Role Mapping

| Role                       | Recommended Permissions                                 |
| -------------------------- | ------------------------------------------------------- |
| **Licensed Clinician**     | All 9 permissions                                       |
| **Provisionally Licensed** | All view + create (plans require co-sign per HR-19)     |
| **Care Coordinator**       | All view + follow-up create + handoff create            |
| **Nurse**                  | All view permissions                                    |
| **Peer Support**           | `cl.aftercare-plans.view`, `cl.follow-up-contacts.view` |

***

## Compliance Standards

### HEDIS FUH (Follow-Up After Hospitalization)

The follow-up contacts feature supports HEDIS FUH measure tracking:

* **7-Day Follow-Up**: Mental health follow-up within 7 days of discharge
* **30-Day Follow-Up**: Mental health follow-up within 30 days of discharge

Contact types map directly to HEDIS reporting periods. Outcomes track whether patients were reached and their clinical status.

### Joint Commission (CAMBHC)

Aftercare plans align with Joint Commission standards for discharge planning:

* Documented housing arrangements
* Medication continuation plans
* Recovery goals in patient's own words
* Community resource linkage
* Family/caregiver involvement

### AHCCCS Requirements

Arizona Medicaid (AHCCCS) requires:

* Discharge planning initiated at admission
* Aftercare plans with measurable goals
* Follow-up contact documentation
* Warm handoff documentation for care transitions

***

## Data Model

### Tables

| Table                        | Purpose                         | Soft Delete        |
| ---------------------------- | ------------------------------- | ------------------ |
| `cl_aftercare_plans`         | Discharge planning documents    | Yes (`deleted_at`) |
| `cl_follow_up_contacts`      | Post-discharge outreach records | Yes                |
| `cl_readmission_risk_scores` | Risk assessment scores          | Yes                |
| `cl_warm_handoffs`           | Provider handoff documentation  | Yes                |

### Custom Fields

The `custom_fields` JSONB column on `cl_aftercare_plans` stores:

* `step_down_plan` — Level of care step-down pathway
* `family_contact_name` — Primary family/caregiver name
* `family_contact_phone` — Family/caregiver phone
* `family_involvement_notes` — Family involvement in aftercare

Organizations can extend `custom_fields` via the Custom Fields platform feature (PF-16).

***

## Data Retention

All discharge-related records follow the organization's standard clinical data retention policy. Records use soft delete (`deleted_at` timestamp) — data is hidden from queries but preserved in the database.

Only `org_admin` role can perform hard deletes via RLS policy.

***

## Row-Level Security

All four tables enforce multi-tenant isolation:

* **SELECT**: Users can only view records within their organization
* **INSERT**: `organization_id` is enforced on all inserts
* **UPDATE**: Scoped to organization; `WITH CHECK` prevents cross-tenant data movement
* **DELETE**: Restricted to `org_admin` role

***

## Audit Considerations

* All tables include `created_by`, `updated_by`, `created_at`, `updated_at` columns
* The `update_updated_at_column()` trigger automatically maintains `updated_at`
* Aftercare plan finalization publishes the `Discharge.AftercarePlan.Finalized` domain event
* Warm handoff documentation creates an auditable record of care transfer responsibility

***

## Integration Points

| Integration                | Description                                                                                                                  |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| **CL-18 SDOH**             | SDOH screening data surfaces in the Discharge tab; aftercare plans can auto-populate community resources from SDOH referrals |
| **CL-12 Care Transitions** | Warm handoffs reference care transitions (when available)                                                                    |
| **HR Employees**           | Warm handoff caller/receiver fields use the platform Employee Selector                                                       |
| **PF Permissions**         | All UI elements are gated by permission keys                                                                                 |

***

## Monitoring

Track these metrics for quality assurance:

* **Aftercare plan completion rate** — % of discharged patients with aftercare plans
* **7-day follow-up rate** — HEDIS FUH compliance metric
* **30-day follow-up rate** — HEDIS FUH compliance metric
* **Average readmission risk score** — Population health indicator
* **Warm handoff documentation rate** — Care transition quality metric
