Smart availability engine

Qlynic computes conflict‑free, patient‑ready slots by blending doctor shifts, blackouts, and existing appointments — all in clinic time. It also respects duration + gaps and filters reasons with AI scope hints.

What the engine considers

Every slot you see is derived from clinic‑time calculations and safe constraints. No double bookings. No blocked time. Nothing in the past.

Doctor shifts

Base working windows per day from DoctorWorkingShifts define the axis of availability.

Blackouts & exceptions

Vacation/Week, Full/Half day, or specific slots from DoctorBlackouts subtract from shifts to produce true free ranges.

Existing appointments

Booked/confirmed appointments remove overlapping times. Admin and public views both enforce this.

Duration + gap stepping

Slots are created by stepping duration + gap across free ranges. Past times are filtered out.

Clinic time & TZ

UTC <→> clinic time conversions ensure consistent labels and validation in admin and public pages.

AI scope hints

Optional AI scope per doctor helps filter reasons and suggest the right provider to patients.

See it in motion

Toggle shifts and blackouts, set duration + gap, and watch free intervals appear. This mirrors what Book.aspx and Appointments timeline do.

09:00
11:00
13:00
15:00
17:00
The simulation demonstrates the same union/subtraction approach used in Appointments (admin timeline) and Book (patient slots).

Why clinics love it

Safer scheduling for admins. Clear and fair choices for patients. Built for precision and speed.

No conflicts

Selection clamps to free time; server validation rechecks overlaps before insert.

Fast

Slots computed quickly with simple stepping logic and efficient SQL queries.

TZ‑correct

Clinic timezone respected in UI labels and validations (UTC conversions handled).

Patient‑friendly

Only valid, up‑to‑date times are shown; race conditions are guarded on save.

Tip: Keep doctor durations and gaps realistic; they directly influence the rhythm of available times.