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

# Clinical Settings

> Admin configuration page for the Clinical module: assessments, treatment plans, security, AI documentation, and ambient settings.

The Clinical Settings screen is the admin configuration hub for the Clinical (CL) module, accessible at `/cl/settings`.

## Overview

The page loads settings from the `cl_module_settings` table for the current organization via the `useClModuleSettings` hook and renders a tabbed form (`CLSettingsForm`). The tabs cover assessment windows (`assessment_completion_hours`, `suicide_screening_min_age`, `assessment_expiry_alert_days`), treatment plan review cycles (`treatment_plan_review_days`, `cosignature_deadline_days`), security settings (`break_glass_duration_minutes`, `part2_consent_required`), outcomes/NOMs configuration, population health and care gap engine settings, and reporting/incidents thresholds. Additional card sections below the main form provide AI Documentation settings, ambient recording settings, Policy 940 settings, and DDI alert suppression settings — each permission-gated internally. A guided tour is available via the `HelpButton` (or by appending `?tour=cl-settings-tour` to the URL).

## Who it's for

Requires permission: `cl.admin`

## Before you start

* You must hold the `cl.admin` permission.
* Changes apply organization-wide; coordinate with clinical and compliance staff before modifying assessment windows, security timeouts, or care gap thresholds.

## Steps

<Steps>
  <Step title="Navigate to Clinical Settings">
    Go to `/cl/settings`. The page loads current settings from the `cl_module_settings` table.
  </Step>

  <Step title="Configure Module Settings">
    Use the tabbed `CLSettingsForm` to update assessment windows, treatment plan review cycles, security settings (including break-glass duration), outcomes/NOMs dimensions, population health parameters, and reporting thresholds.
  </Step>

  <Step title="Review sub-section cards">
    Scroll below the main form to review the AI Documentation Settings card, Ambient Settings section, Policy 940 Settings card, and DDI Alert Suppression Settings — each is permission-gated independently.
  </Step>

  <Step title="Save changes">
    Submit the form. On error, a toast notification is shown: "Failed to save Clinical settings" with a sanitized error description. On success the form reflects the saved values.
  </Step>
</Steps>

## Key concepts

<AccordionGroup>
  <Accordion title="Loading and error states">
    While settings load, a `SettingsLoadingSkeleton` (4 rows) is shown. If the query fails, a `SettingsErrorState` component is displayed with a "Failed to load Clinical settings" title and a retry button.
  </Accordion>

  <Accordion title="Guided tour">
    Appending `?tour=cl-settings-tour` to the URL auto-starts the `clSettingsTour`. The `HelpButton` also triggers it manually.
  </Accordion>

  <Accordion title="Forward-compatible fields">
    Several form fields (e.g., most assessment and treatment plan fields) are noted in code as "forward-compatible — columns planned." They are no-ops until database migrations add the corresponding columns.
  </Accordion>
</AccordionGroup>

## Related

<Columns cols={2}>
  <Card title="Clinical" icon="stethoscope" href="/cl/overview">
    Overview of the Clinical core.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index">
    Documentation coverage and governance.
  </Card>
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/cl.tsx
  * src/cores/cl/pages/CLSettingsPage.tsx
  * src/cores/cl/components/CLSettingsForm.tsx
  * src/cores/cl/hooks/useClModuleSettings.ts
  * src/cores/cl/hooks/useClModuleSettingsUpsert.ts
</Accordion>
