L
Leaphealth - OSDocs

Availability Calendar

How to define when a doctor is available for appointments using schedules, blocks, and overrides.

Availability Calendar

The availability calendar defines when a doctor can see patients. It uses three rule types — Schedule, Block, and Override — to handle recurring patterns, time off, and exceptions.

Prerequisites

You need a doctor profile with at least one centre assignment. See: Doctor Onboarding.

Three Rule Types

Every doctor's availability is built from three types of rules:

  • Schedule = "Dr. Smith works Mon-Fri 9am-5pm" — a recurring weekly pattern
  • Block = "Dr. Smith is on leave Dec 25-26" — blocks out dates, no appointments
  • Override = "Dr. Smith will also work this Saturday 10am-2pm" — a one-time exception

Priority Rule

Blocks always win over Schedules. If a doctor has a schedule for Monday but also a block for a specific Monday, the block takes precedence and no slots are generated for that day.

Creating a Schedule (Recurring Availability)

  1. Select the doctor.
  2. Optionally pick a specific centre (or leave empty for all centres).
  3. Set the rule type to Schedule.
  4. Choose which days of the week (e.g., Mon through Fri).
  5. Set the time windows (e.g., 9:00 AM - 1:00 PM and 2:00 PM - 5:00 PM).
  6. Optionally set effective dates (start and end).

Schedule Settings

Setting Name

What It Does

Default

Example

Doctor

Which doctor this schedule is for

(required)

"Dr. Smith"

Centre

Which centre (leave empty for all)

All centres

Leave empty for same hours everywhere

Days of Week

Which days this schedule repeats

(required)

Mon, Tue, Wed, Thu, Fri

Time Windows

Available hours for each day

(required)

"9:00 AM - 1:00 PM" and "2:00 PM - 5:00 PM"

Effective From

When this schedule starts

Immediately

Future date for upcoming changes

Effective Until

When this schedule stops

Indefinite

End date for temporary changes

Recurrence exceptions let you skip specific dates from a recurring schedule without creating a separate block. Imagine Dr. Patel works Monday through Friday, but January 26 (Republic Day) falls on a Wednesday this year. Instead of creating a block for that one date, you can add January 26 as an exception to the recurring schedule. The system skips that date automatically while keeping all other Wednesdays active.

Service restrictions on time windows let you limit specific time windows to specific services. For example, Dr. Patel does Cardiac Consultations in the morning (9 AM to 12 PM) and General Consultations in the afternoon (2 PM to 5 PM). You set up two time windows with service restrictions: the morning window is restricted to the Cardiac Consultation service, and the afternoon window is restricted to General Consultation. When a patient searches for a Cardiac Consultation with Dr. Patel, only morning slots appear.

Creating a Block (Time Off)

Blocks remove a doctor's availability for specific dates or time periods. When you create a block, no appointment slots will be generated for that doctor during the blocked time, regardless of their regular schedule.

Common uses for blocks include planned leave (annual vacation, personal days), holidays the doctor observes that may not be centre-wide holidays, conference attendance, training, or personal emergencies. The block can cover a full day or just specific hours. For example, if a doctor needs to leave early for a personal matter, you can block just the afternoon hours while keeping the morning available.

When creating a block, you provide the date, whether it covers the full day or specific hours, and optionally a reason and reason category. The system provides predefined reason categories to help you track why doctors are unavailable:

  • Leave — annual leave, sick leave, personal leave
  • Holiday — religious or personal holidays not covered by centre-wide holidays
  • Emergency — unexpected absence due to an emergency
  • Personal — personal matters, family events
  • Training — conferences, workshops, continuing medical education

Recording the reason and category is optional but recommended. It helps when reviewing availability patterns later — for example, if a doctor has been on emergency leave frequently, management can see the trend.

Blocks always win

A block takes priority over everything. If a doctor has a regular Monday schedule and you block a specific Monday, no slots are generated for that day. Existing appointments for that day are NOT automatically cancelled — you need to handle those separately.

Creating an Override (One-Time Exception)

Use overrides when a doctor works on a day they normally do not — for example, an extra Saturday clinic or extended evening hours for a specific date.

  1. Select the doctor.
  2. Set the rule type to Override.
  3. Choose the specific date.
  4. Set the time windows for that day.

How Rules Combine

For any given date, the system resolves availability in this order:

  1. Check for a Block — if found, that time is unavailable regardless of schedule.
  2. Check for an Override — if found, use the override hours instead of the regular schedule.
  3. Use the regular Schedule.
  4. Intersect the result with centre working hours to get the final available slots.

Overlap Validation

The system prevents conflicting schedules automatically. If Dr. Patel already has a schedule for Monday 9 AM to 1 PM at Centre A, and you try to create another schedule for Monday 10 AM to 2 PM at Centre B, the system will reject it with an error because the time windows overlap. A doctor cannot be in two places at once.

Blocks and overrides do not have this restriction because they intentionally modify the schedule. A block can cover any time regardless of existing schedules (that is the whole point — it removes availability). An override can add availability on a day that has no regular schedule.

What Happens Next?

Your doctors are set up and available. Now define the services your hospital offers. See: Services & Categories.

Last updated on

On this page