Bug 810 - No error shown when create patient with invalid DOB and cannot create patient
Summary: No error shown when create patient with invalid DOB and cannot create patient
Status: RESOLVED FIXED
Alias: None
Product: 2023 CS3343 Group 20 System
Classification: Unclassified
Component: Patient (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- critical
Assignee: mhlee64-c
URL:
Depends on:
Blocks:
 
Reported: 2023-12-06 22:20 HKT by mhlee64-c
Modified: 2023-12-09 14:03 HKT (History)
1 user (show)

See Also:


Attachments
Test case for creating patient with invalid DOB (36.98 KB, image/png)
2023-12-06 22:20 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:20:48 HKT
Created attachment 159 [details]
Test case for creating patient with invalid DOB

In create patient function, when the user input an invalid date of birth, error should be prompted to warn the user and ask the user to input the date of birth again, but when user input invalid date of birth, no error is shown and patient creation fail.
--------------------------------------------------------------------------------
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: 0
======================================== Patient Mangement =========================================
0.	View Patient
1.	Create Patient
2.	Edit Patient
Please select a function: 1
========================================== Create Patient ==========================================
Please enter the patient's details below
Name: 1
HKID: Y1234567
Date of Birth (YYYY-MM-DD): 1
============================================ 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: 0
======================================== Patient Mangement =========================================
0.	View Patient
1.	Create Patient
2.	Edit Patient
Please select a function: 0
=========================================== View Patient ===========================================
Please enter the patient's HKID: Y1234567
============================================== ERROR ===============================================
exceptions.PatientNotFoundException: Patient(HKID: Y1234567) not found!