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

# Curriculum Library

> Manage group therapy curricula — create, edit, and soft-delete curriculum records with topics and program type for your organization.

The Curriculum Library screen displays and manages group therapy curriculum records for the current organization at route `/cl/group-sessions/curricula`.

## Overview

The Curriculum Library renders a card grid of curriculum records from the `cl_group_curricula` table, scoped to the current organization and ordered alphabetically by name. Soft-deleted records (`deleted_at IS NOT NULL`) are excluded. Each card displays the curriculum name, program type label (from `PROGRAM_TYPE_OPTIONS`), an optional language badge, and a topics count. Users with the `cl.group_curricula.manage` permission see Edit (pencil) and Delete (trash) icon buttons on each card, and a "New Curriculum" button in the page header. The `CurriculumFormDialog` handles both create and edit; the `AlertDialog` confirms deletions. The wrapper component `CurriculumListPageWrapper` re-exports `CurriculumListPage` without additional logic.

## Who it's for

Requires permission `cl.group_curricula.view`.

## Before you start

You must hold the `cl.group_curricula.view` permission to access this screen. Creating, editing, or deleting curricula requires the additional `cl.group_curricula.manage` permission.

## Steps

<Steps>
  <Step title="Open the Curriculum Library">
    Navigate to `/cl/group-sessions/curricula`. The page loads all active (non-deleted) curricula for your organization, sorted alphabetically by name.
  </Step>

  <Step title="Review curriculum cards">
    Each card shows the curriculum name, program type, language badge (if set), and the number of topics defined.
  </Step>

  <Step title="Create a curriculum (if permitted)">
    Click "New Curriculum" (requires `cl.group_curricula.manage`). The `CurriculumFormDialog` opens with blank fields. Fill in the required fields and save.
  </Step>

  <Step title="Edit a curriculum (if permitted)">
    Click the pencil icon on any card (requires `cl.group_curricula.manage`). The `CurriculumFormDialog` opens pre-populated with the existing values. Update and save.
  </Step>

  <Step title="Delete a curriculum (if permitted)">
    Click the trash icon on any card (requires `cl.group_curricula.manage`). A confirmation dialog appears. Confirming performs a soft delete (sets `deleted_at`). The curriculum is removed from the list on success.
  </Step>
</Steps>

## Key concepts

<AccordionGroup>
  <Accordion title="Program type">
    Each curriculum has an optional `program_type` field. The display label is resolved from `PROGRAM_TYPE_OPTIONS` (from `src/cores/cl/types/group-therapy.ts`). If no match is found, the raw value is shown; if null, a dash is rendered.
  </Accordion>

  <Accordion title="Topics">
    The `topics` field is an array. The card shows the count (e.g., "3 topics") or "No topics defined" if the array is empty. Topic content is not displayed on this list view.
  </Accordion>

  <Accordion title="Soft delete behavior">
    Deletion sets `deleted_at` on the `cl_group_curricula` row. The list query filters `deleted_at IS NULL` so the record disappears from the list immediately after confirmation. The code comment in the delete dialog states that linked sessions are not affected.
  </Accordion>

  <Accordion title="Empty state">
    If no active curricula exist, a centered empty state shows a `BookOpen` icon, the text "No curricula yet", and a "Create Curriculum" button (gated by `cl.group_curricula.manage`).
  </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/CurriculumListPageWrapper.tsx
  * src/cores/cl/components/group-therapy/CurriculumListPage.tsx
  * src/cores/cl/hooks/useGroupCurricula.ts
  * src/cores/cl/types/group-therapy.ts
</Accordion>
