Actions
Bug #821
open
AV
FM
Schedule slot shorter than the appointment duration can be saved (11:00–11:02 with 15 min appointments)
Bug #821:
Schedule slot shorter than the appointment duration can be saved (11:00–11:02 with 15 min appointments)
Start date:
11/12/2026
Due date:
% Done:
0%
Estimated time:
Resolved By:
Description
A Consultation/Telemedicine slot can be created or edited so that it is shorter than one appointment, so it can never hold a booking. Only duration > 0 and buffer >= 0 are validated; slot length is not compared to the appointment duration.
Steps to Reproduce:
- Open OPD > My Schedule and select a doctor.
- Click Add Slot (or click an existing block to edit it).
- Set Type = Consultation (OPD), Start = 11:00 AM, End = 11:02 AM, Appointment Duration = 15 min.
- Click Create Slot / Save changes.
Expected Result: Error such as "Slot must be at least as long as one appointment (15 min)"; the slot is not saved.
Actual Result: The slot is saved. The grid shows an 11:00–11:02 row labelled "OPD · 15 min slots" with no booked/total count (capacity is floor(2/15) = 0), and no appointment can ever be booked in it.
Notes:
- Backend: ValidateScheduleTypeRules in DoctorScheduleService.cs has no (end - start) >= duration (+ buffer) check.
- Frontend: Add Slot and Edit Slot dialogs in the OPD schedule page have no such check either.
- Related but different: #799 (end time before start time for non-consultation types).
Files
AV Updated by Alminta V. about 18 hours ago
AV Updated by Alminta V. about 18 hours ago
- Assignee set to Fiza M.
Actions