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.