Project

General

Profile

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)

Added by Alminta V. about 19 hours ago. Updated about 18 hours ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
-
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:

  1. Open OPD > My Schedule and select a doctor.
  2. Click Add Slot (or click an existing block to edit it).
  3. Set Type = Consultation (OPD), Start = 11:00 AM, End = 11:02 AM, Appointment Duration = 15 min.
  4. 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

Actions

Also available in: PDF Atom