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

# Co-Occurring Disorder (COD) Integrated Documentation — Admin Guide

> The seed migration assigns:

**Compliance:** AHCCCS AMPM Policy 320-O, CARF Behavioral Health Standards §§4.A–4.C, 42 CFR Part 2.
**Last Updated:** 2026-05-12

***

## 1. Permission setup

CL-31 introduces five permission keys (registered in `src/platform/permissions/constants.ts` and seeded into `pf_module_permissions`):

| Key                              | Purpose                                                                |
| -------------------------------- | ---------------------------------------------------------------------- |
| `cl.cod_assessments.create`      | Create new COD assessments (ASI-6, BASIS-32, GAIN-SS)                  |
| `cl.cod_assessments.view`        | Read COD assessment list and individual rows                           |
| `cl.cod_assessments.edit`        | Edit drafts and amend complete assessments                             |
| `cl.cod_treatment_plan.manage`   | Edit the COD extension on a CL-03 treatment plan                       |
| `cl.cod_progress_notes.view_sud` | Read SUD section content in a dual-diagnosis note (subject to consent) |

### Default role assignments

The seed migration assigns:

* **`licensed_clinician`** — all five permissions.
* **`clinical_admin`** — all five permissions.
* **`platform_admin`** — inherits via the platform admin override.

Custom roles must be granted these keys via `pf_role_permissions` per your tenant's role model.

## 2. Org-level configuration

There are no tenant-level COD settings in Phase 1+2. Phase 3 may add a "COD documentation enabled" feature flag in `cl_module_settings.custom_fields`.

## 3. Audit and oversight

* All access to `cl_cod_assessments` is governed by RLS (`pf_has_org_access`); cross-org reads return empty.
* Mutations are timestamped via `created_by` / `updated_by`. The `prevent_org_id_change` trigger blocks any attempt to move a row between organizations.
* SUD-content access is checked at every read via the `cl_check_sud_consent` RPC; default-deny applies on any failure or missing consent.
* Consent grants are recorded in CL-11 (`cl_consents`); redisclosure events are logged in `cl_consent_redisclosure_log` (CL-11-EN-22).

## 4. Compliance crosswalk

| Requirement                                              | CL-31 Implementation                                                                                    |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| AHCCCS AMPM 320-O — Integrated assessment & care for COD | `cl_cod_assessments` (ASI-6) + COD treatment plan extension                                             |
| CARF BH §4.A — Person-centered planning                  | Goal tagging (MH/SUD/Both) on CL-03 plans                                                               |
| CARF BH §4.B — Individualized service planning           | ASAM level + dimensions 5/6 capture                                                                     |
| CARF BH §4.C — Service delivery and integration          | Dual-diagnosis progress note with linked MOUD episode                                                   |
| 42 CFR Part 2 §2.13 / §2.31                              | Consent-gated SUD content via `redactSUDFields()` (default-deny)                                        |
| 42 CFR Part 2 §2.32 — Redisclosure notice                | Phase 3 export paths required to render the redisclosure notice (open condition from compliance review) |

## 5. Troubleshooting

**Consent gate stays in amber-banner state for an authorized clinician.**

* Verify the patient has an active `sud_counseling_notes` consent in CL-11.
* Check that the clinician's role has `cl.cod_progress_notes.view_sud`.
* Confirm `cl_check_sud_consent` RPC is deployed (one of the CL-11 conditions for go-live).

**COD indicator prompt never appears.**

* The prompt fires once per browser session per chart. Clear localStorage or use the manual toggle in the chart header.

**Assessment row missing from the COD tab.**

* Confirm RLS — the row's `organization_id` must match the user's active org.
* Filter chips may be applied; reset filters at the top of the tab.

**Migration failures referencing `cl_moud_enrollments`.**

* The `moud_episode_id` FK is nullable. If CL-21 is not deployed, the column remains unset; UI hides the MOUD callout.

## 6. Operational checklist before go-live

* [ ] CL-11 consent service deployed (RPC + tables) — required by compliance condition #1.
* [ ] Permission seed migration applied; verify with `SELECT * FROM pf_module_permissions WHERE permission_key LIKE 'cl.cod_%';`.
* [ ] RLS smoke tests pass: `npm run test:rls -- cl-31-cod`.
* [ ] Integration tests pass: `npm run test:integration -- cl-31-cod-workflow`.
* [ ] Legal review of `sud_counseling_notes` consent type completed (compliance condition #3).
* [ ] Tenant-specific COD documentation policy attached in GR.

## 7. Related references

* [Consent compliance admin guide](/cl/consent-compliance-admin-guide) (CL-11)
* [Electronic consent admin guide](/cl/electronic-consent-admin-guide)
* [Clinical audit & compliance dashboard admin guide](/cl/clinical-audit-compliance-dashboard-admin-guide)
* Spec: `specs/cl/specs/CL-31-co-occurring-disorder-integrated-documentation.md`
* Compliance sign-off: `specs/cl/reviews/CL-31-COMPLIANCE-SIGNOFF.md`
