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

# Program Scheduling Templates — Admin Guide

> Configuration and administration guide for Program Scheduling Templates.

> **Purpose:** Configuration and administration guide for CL-27 Program Scheduling Templates.

***

## Overview

This guide covers administrative tasks for program scheduling: template configuration, permission assignment, schedule definition schema, and billing code mapping.

***

## Configuration

### Program Type Minimums

| Program Type | Min Hours/Week | Min Days/Week | Common HCPCS        |
| ------------ | -------------- | ------------- | ------------------- |
| IOP          | 9              | 3             | H0015, H2036, S9480 |
| PHP          | 20             | 5             | H0035, H2017        |
| Residential  | 1              | 1             | H0018, H0019        |
| Outpatient   | 1              | 1             | H0038, 90837, 90847 |

### Schedule Definition Schema

The `schedule_definition` JSONB column stores the weekly template:

```json theme={null}
{
  "blocks": [
    {
      "day_of_week": 1,
      "start_time": "09:00",
      "end_time": "12:00",
      "service_type": "group",
      "description": "Morning IOP Group"
    }
  ],
  "exceptions": [
    { "date": "2026-07-04", "reason": "Holiday" }
  ]
}
```

* `day_of_week`: 0 = Sunday, 1 = Monday, … 6 = Saturday
* `service_type`: `group` | `individual` | `peer_support`
* `exceptions`: Dates to skip during session generation

### Permissions

Assign these permissions via the Admin → Permissions page:

| Permission Key                  | Recommended Roles          |
| ------------------------------- | -------------------------- |
| `cl.program_schedules.view`     | org\_admin, manager, staff |
| `cl.program_schedules.create`   | org\_admin, manager        |
| `cl.program_schedules.edit`     | org\_admin, manager        |
| `cl.program_enrollments.view`   | org\_admin, manager, staff |
| `cl.program_enrollments.create` | org\_admin, manager, staff |
| `cl.program_enrollments.edit`   | org\_admin, manager        |

### CL-14 Integration

Group session auto-creation inserts into `cl_group_sessions` with `custom_fields.program_schedule_id` linking back to the template. Generated sessions appear in the Group Sessions list.

***

## Troubleshooting

### Sessions Not Generated

* Verify the schedule has blocks with `service_type: "group"`
* Check that the target dates are not listed in `exceptions`
* Ensure the user has `cl.program_schedules.edit` permission

### Compliance Shows Incorrect Data

* Attendance summaries are computed from `cl_program_attendance_summaries`
* Verify the enrollment period dates match the reporting period

***

## Related Documentation

* **User Guide:** `docs/cl/cl-27-program-scheduling-templates-user-guide.md`
* **Specification:** `specs/cl/specs/CL-27-behavioral-health-program-scheduling-templates.md`
* **Integration:** `docs/architecture/integrations/CL-27-behavioral-health-program-scheduling-templates-INTEGRATION.md`

***

**Last Updated:** 2026-02-25
