Open ckaayy opened 1 week ago
No details provided by team.
[The team marked this bug as a duplicate of the following bug]
Doctors can have 2 appointments at the same time, which does not follow real world logic
With reference to the image above, the doctor with ID 3 can have 2 appointments at the exact same time but with different patients. this can be due to user error when keying in the date and time. There should be error messages to inform the user that the doctor already has an appointment at that time slot instead of allowing the second appointment to be successfully created. this can lead to a lot of confusion when managing appointment data and can potentially cause great admin trouble for the clinic, greatly affecting user satisfaction. in the worse case scenario, 2 patient can turn up at the same time slot.
[original: nus-cs2103-AY2425S1/pe-interim#1643] [original labels: severity.Medium type.FeatureFlaw]
[This is the team's response to the above 'original' bug]
Hi! Thank you all for the bug report and the observation! We understand your concerns with regards to the supposedly clashing appointment timings. During the development process, our team did consider whether or not to restrict such appointment creation.
However, ultimately, considering the limits of this project, we arrived at the consensus that restricting such functionality would prove more detrimental to our target group (healthcare workers) within the context of the healthcare industry.
We believe that restricting "duplicate" appointments would fall under the scope of overzealous input validation.
The healthcare industry with regards to consultation, can have incredibly varied formats and purposes depending on the healthcare context. To provide maximum flexibility and functionality to our users, we have decided to allow such appointment creation.
Consider the following scenario, or as given in the above bug report:
Patient (ID: 2) along with Patient (ID: 4) has a consultation scheduled with Doctor (ID: 3) on the same day and the same time.
This is an entirely valid and plausible appointment that could happen in the real world. Not ALL doctors or healthcare staff may do them, but as long as SOME of them do, we believe that not restricting them is the right decision. The following are some examples:
- Chronic Disease Management: Patients with similar conditions (eg. diabetes, hypertension) may attend group sessions with a single doctor to discuss their treatment plans, lifestyle modifications and shared experiences.
- Pre or post-surgical counselling: Patients undergoing similar surgeries may attend group consultations to discuss details regarding their similar or same procedures, expectations and recovery process
- In mental health or addiction treatment, group therapy sessions are incredibly common and often involve healthcare professionals guiding patients in a group setting
Consider another scenario, where instead of multiple patients having an appointment with the same doctor, you have multiple doctors with an appointment with the same patient:
- Case Discussions / Rounds: Groups of doctors or trainees may consult on hospitalized patients together to provide learning opportunities and experience to medical staff
- Multiple doctors are consulting and trying to diagnose a patient together, each with their own sets of appointment remarks and notes
We understand your concerns with regards to ease of appointment scheduling, however, at most, we believe this could be addressed through perhaps a UI pop-up to verify / "double-confirm" with the user before adding or editing such "clashing" appointments. However, we believe that this would not be a priority for our development given the constraints and focus of this project, and that the appointment management system with regards to duplicate appointments would suffice and provide flexibility and functionality in its current "clash-able" state.
Items for the Tester to Verify
:question: Issue duplicate status
Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)
Reason for disagreement: This issue cannot be considered a duplicate of the previous error because the context and implications of the bug are distinct. The earlier error concerns double-booking of a single doctor with multiple patients in the same time slot, while this error involves a single patient being booked with multiple doctors simultaneously. The root causes, potential harms, and administrative challenges introduced by these two scenarios are fundamentally different, warranting this issue to be treated independently. Both highlight gaps in validation logic, but the impact on clinic operations and user experience varies significantly between the two cases.
addA z/4 z/5 x/2023-02-28 23:59 addA z/4 z/3 x/2023-02-28 23:59 execute the 2 commands consecutively, where ID 4 is a patient and ID 3 and 5 are doctors. both appointments are added successfully. this should not be a case and likely due to user error as a patient cannot have 2 appointments with different doctors simultaneously. An error message should be shown to warn users against such actions. this can lead to a lot of confusion when managing appointment data and can potentially cause great admin trouble for the clinic.
to verify, when view z/4 is called, there are indeed 2 appointments in the history