Skip to main content

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.

Audience: Clinical administrators, compliance officers, security/privacy officers. Spec: CL-31 — Co-Occurring Disorder Integrated Documentation 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):
KeyPurpose
cl.cod_assessments.createCreate new COD assessments (ASI-6, BASIS-32, GAIN-SS)
cl.cod_assessments.viewRead COD assessment list and individual rows
cl.cod_assessments.editEdit drafts and amend complete assessments
cl.cod_treatment_plan.manageEdit the COD extension on a CL-03 treatment plan
cl.cod_progress_notes.view_sudRead 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

RequirementCL-31 Implementation
AHCCCS AMPM 320-O — Integrated assessment & care for CODcl_cod_assessments (ASI-6) + COD treatment plan extension
CARF BH §4.A — Person-centered planningGoal tagging (MH/SUD/Both) on CL-03 plans
CARF BH §4.B — Individualized service planningASAM level + dimensions 5/6 capture
CARF BH §4.C — Service delivery and integrationDual-diagnosis progress note with linked MOUD episode
42 CFR Part 2 §2.13 / §2.31Consent-gated SUD content via redactSUDFields() (default-deny)
42 CFR Part 2 §2.32 — Redisclosure noticePhase 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.