Bug 796

Summary: Overlapping Appointments
Product: 2023 CS3343 Group 20 System Reporter: hfwong56-c
Component: AppointmentAssignee: hfwong56-c
Status: RESOLVED FIXED    
Severity: major    
Priority: ---    
Version: unspecified   
Hardware: PC   
OS: Windows   
Attachments: They have the same doctor, same patient, and same time, but both is created successfully.

Description hfwong56-c 2023-11-28 22:15:29 HKT
Created attachment 155 [details]
They have the same doctor, same patient, and same time, but both is created successfully.

It is possible to schedule appointments for the same patient or the same doctor during the same time. Either starting at different time but duration overlapped, or even starting at the same time, both allowed but it should not.
Comment 1 hfwong56-c 2023-12-09 13:13:45 HKT
Welcome to CMS!
============================================== Login ===============================================
Please enter your staff ID: d
Please enter your password: d
============================================ Main Menu =============================================
Login as [Doctor] Dr. dummer dr one | d | 
0.      Patient Mangement     
1.      Appointment Management
2.      MedRecord Management
3.      Medicine Management
4.      Admin
5.      Logoff
Please select a function: 1
====================================== Appointment Mangement =======================================
0.      View Appointment History
1.      View Pending Appointment
2.      Create Appointment
3.      Update Appointment Status
Please select a function: 2
========================================== Select Patient ==========================================
Please input patient's HKID: a123456
[Patient] Dummy patient | M | a123456 | 2020-06-29 | 
======================================== Create appointment ========================================
Please enter the date (DD/MM/YYYY): 23/12/2022
Please enter the time (HH:MM:SS): 11:00:00
0.      [Doctor] Dr. dummer dr one | d | 
1.      [Doctor] Dr. dummer dr two | dd |
Please select a doctor: 0
Do you confirm an appointment for Dummy patient with dummer dr one at 2022-12-23T11:00 (Y/y: confirm)? y
Appointment Created. 
============================================ Main Menu =============================================
Login as [Doctor] Dr. dummer dr one | d |
0.      Patient Mangement
1.      Appointment Management
2.      MedRecord Management
3.      Medicine Management
4.      Admin
5.      Logoff
Please select a function: 1
====================================== Appointment Mangement =======================================
0.      View Appointment History
1.      View Pending Appointment
2.      Create Appointment
3.      Update Appointment Status
Please select a function: 2
========================================== Select Patient ==========================================
Please input patient's HKID: a123456
[Patient] Dummy patient | M | a123456 | 2020-06-29 | 
======================================== Create appointment ========================================
Please enter the date (DD/MM/YYYY): 23/12/2022
Please enter the time (HH:MM:SS): 11:00:00
0.      [Doctor] Dr. dummer dr one | d |
1.      [Doctor] Dr. dummer dr two | dd |
Please select a doctor: 0
Do you confirm an appointment for Dummy patient with dummer dr one at 2022-12-23T11:00 (Y/y: confirm)? y
Appointment Created.