Bug 811 - Appointment duration can be set to negative number
Summary: Appointment duration can be set to negative number
Status: RESOLVED FIXED
Alias: None
Product: 2023 CS3343 Group 20 System
Classification: Unclassified
Component: Appointment (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- critical
Assignee: hfwong56-c
URL:
Depends on:
Blocks:
 
Reported: 2023-12-06 22:42 HKT by mhlee64-c
Modified: 2023-12-09 14:01 HKT (History)
0 users

See Also:


Attachments
Test case for negative duration appointment (56.69 KB, image/png)
2023-12-06 22:42 HKT, mhlee64-c
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mhlee64-c 2023-12-06 22:42:57 HKT
Created attachment 160 [details]
Test case for negative duration appointment

An appointment is the section where the patient is going to meet the doctor, for such section, it is impossible to have a duration with negative number of minutes. However, when creating an appointment in the system, an appointment duration with negative number of minutes can be created.
--------------------------------------------------------------------------------
Welcome to CMS!
============================================== Login ===============================================
Please enter your staff ID: n
Please enter your password: n
============================================ Main Menu =============================================
Login as [Nurse] dummy Nurse | n | 
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
4.	Earliest next Appointment
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): 01/01/2023
Please enter the time (HH:MM:SS): 10:10:10
Please enter the duration in minutes: -1
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 2023-01-01T10:10:10 for -1 minutes (Y/y: confirm)? Y
Appointment Created. 
============================================ Main Menu =============================================
Login as [Nurse] dummy Nurse | n | 
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
4.	Earliest next Appointment
Please select a function: 0
===================================== View Appointment History =====================================
[Appointment] SCHEDULED | 2023-01-01T10:10:10 | -1mins | [Patient] Dummy patient | M | a123456 | 2020-06-29 |  -> [Doctor] Dr. dummer dr one | d |