> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decodahealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Blocks, Shifts & Shift Management

> Block provider time, define working shifts, manage schedules across locations, and handle shift conflicts.

<Info>
  **Where to find this:** While blocks and shifts can be managed directly on the calendar, they are primarily managed in the **Shift Management** page (found under **Check-In > Shift Management**). This page provides a dedicated graphical view of all providers across all locations, making it easier to plan weekly schedules.
</Info>

## Assistant changes to shifts and blocks

If your clinic uses Decoda Assistant to help manage settings, it can now help update the same shifts and blocks that appear on the **Shift Management** page. It can create, edit, or archive one-time shifts, repeating shift series, provider blocks, bookable blocks, and global blocks when you ask for those schedule changes. Decoda only shows or changes shifts and blocks that the signed-in staff member is allowed to manage. Review the proposed change before approving it, because shift and block changes can affect provider availability and patient booking times.

## Create a Block

Blocks prevent appointments from being booked during specific time periods. Use them for lunch breaks, meetings, training, personal time, or any period a provider is unavailable.

While you can create blocks on the main calendar, the **Shift Management** page is the recommended place for managing provider availability.

<Steps>
  <Step title="Open the Creator">
    In **Shift Management**, click the **Add** button and select **Create new Block**. Alternatively, on the main calendar, click **Create Event** in the sidebar and select **Block**.
  </Step>

  <Step title="Set Title">
    Enter a descriptive title (e.g., "Lunch", "Staff Meeting"). If you skip the title, it auto-generates as "Block - \[Provider Name]".
  </Step>

  <Step title="Set Date and Time">
    Pick the start and end times for the block. The minimum duration is 30 minutes by default.
  </Step>

  <Step title="Select Providers">
    Choose one or more providers to block. You can select multiple providers to block the same time for everyone at once.
  </Step>

  <Step title="Select Services (Optional)">
    Optionally restrict the block to specific services. If no services are selected, the block applies to all services for the selected providers.
  </Step>

  <Step title="Select Locations (Optional)">
    Choose one or more locations the block applies to. Leave this empty to block the time at **every** location. Pick specific locations to block the time only there — the provider stays bookable at your other locations. For room or equipment blocks, choosing locations reduces that resource's availability only at those locations.
  </Step>

  <Step title="Set Recurrence (Optional)">
    Make the block repeat daily, weekly, on weekdays, monthly, yearly, or on a custom schedule.
  </Step>

  <Step title="Mark as a business hour block (Optional)">
    Tick **Business hour block** for closures that shouldn't count against provider utilization — training, admin closures, or all-staff meetings. These are treated as time when the provider wasn't expected to be seeing patients, so they're excluded from the utilization percentage on the [Provider Performance](/modules/analytics/providers) dashboard. Regular blocks stay counted, since the provider was on the schedule but unavailable.
  </Step>

  <Step title="Save">
    Click **Create**. The block appears on the calendar as a gray event.
  </Step>
</Steps>

### Limit a block to certain locations

If your clinic has more than one location, you can decide where a block takes effect:

* **Leave locations empty** to block the time everywhere. This is how all existing blocks behave, so nothing changes for blocks you have already created.
* **Choose one or more locations** to block the time only at those locations. A provider blocked at one location is still available for booking at your other locations.
* **For room or equipment blocks**, choosing locations lowers that resource's available capacity only at the locations you pick. A block left without a location lowers it everywhere.

When you edit a block, it applies to one location at a time. Clear the location selection to return the block to all locations.

### Edit or Delete a Block

Click the block on any calendar view to open the editor. Make changes and click **Save**, or click **Delete** to remove it. For recurring blocks, you are asked whether to apply the change to this occurrence only, this and future occurrences, or the entire series.

### View Block History

Every block keeps its own timeline of changes. Open the block editor and expand **View History** at the bottom of the form to see who created, edited, or rescheduled it and when.

The history records the following actions for blocks:

| Entry               | What it means                                                                                                        |
| ------------------- | -------------------------------------------------------------------------------------------------------------------- |
| **Created**         | The block was first added to the calendar.                                                                           |
| **Rescheduled**     | The start or end time was changed. Shows the old and new start and end times, with the value that moved highlighted. |
| **Service Added**   | A service was added to the block's restriction list. Shows the service name.                                         |
| **Service Removed** | A service was removed from the block's restriction list. Shows the service name.                                     |
| **Cancelled**       | The block was cancelled or deleted. Includes the reason if one was provided.                                         |

Each entry shows who made the change and when.

## Add a Shift

Shifts define when a provider is available to see patients. When the "Show Working Hours" toggle is enabled, time outside of shifts is visually marked with diagonal stripes.

**Important:** Shifts should be managed on the **Shift Management** page, which provides a comprehensive view of provider schedules by day and location.

<Steps>
  <Step title="Open the Shift Creator">
    In **Shift Management**, click the **Add** button and select **Create new Shift**. Or, in the calendar header area (Day view), click the provider's shift picker.
  </Step>

  <Step title="Set Date and Time">
    Choose the start and end times for the shift.
  </Step>

  <Step title="Select Provider">
    Choose the provider or AI assistant for this shift. If only one provider exists, they are auto-selected.
  </Step>

  <Step title="Select Location">
    Choose the clinic location for the shift. Location is required for providers but optional for AI assistants.
  </Step>

  <Step title="Set Capacity (Optional)">
    Turn on **This shift can do more than 1 appointment at a time** to set a custom **Capacity** for the shift. The capacity field only appears once the switch is on; leave the switch off to use the provider's default capacity. The switch starts off when you create a new shift, and on for existing shifts that already have a capacity above 1.
  </Step>

  <Step title="Set Recurrence (Optional)">
    Make the shift repeat on a schedule (daily, weekly, weekdays, monthly, yearly, or custom).
  </Step>

  <Step title="Save">
    Click **Create**. The shift appears as a background highlight on the provider's calendar column and as a colored bar in Shift Management.
  </Step>
</Steps>

### Edit or Delete a Shift

Click an existing shift on the calendar to open the editor. Modify the time, provider, location, capacity, or recurrence and click **Save**. Click **Delete** to remove the shift. For recurring shifts, you choose the scope: this occurrence, this and future, or all.

### Shift Conflicts

The Shift Management page automatically detects overlapping shifts for the same provider. When conflicts are found, a warning banner appears at the top of the page showing which providers have overlapping shifts and on which dates. Expand the banner to see the specific conflicting shift times and locations. To resolve a conflict, click on one of the overlapping shift bars and either edit its time or delete it.

## Capacity Management

Control how many patients a provider can see simultaneously during a shift.

* **Shift-level capacity:** Set the maximum number of concurrent appointments when creating or editing a shift.
* **Service-level double booking:** Enable "Allow Double Booking" on a service to permit overlapping appointments for that service.
* **Bookable resources:** Assign rooms or equipment to services to prevent resource conflicts. When a bookable is reserved for one appointment, it cannot be double-booked. While you create or edit an event that uses a room or piece of equipment, the calendar preview shows the times that resource is already taken — both by other appointments and by blocks that set the room or equipment aside — so you can see at a glance when it is unavailable.

## Quick Notes (Memos)

Attach short notes to any appointment. Click the **memo icon** on an appointment, or use the **Add Memo** button in the patient sidebar. Quick notes appear:

* On the appointment card in Schedule view
* In the patient sidebar
* In the schedule export (PDF/CSV)

Notes can be edited or added at any time, even after the appointment is complete.
