Bug 810

Summary: No error shown when create patient with invalid DOB and cannot create patient
Product: 2023 CS3343 Group 20 System Reporter: mhlee64-c
Component: PatientAssignee: mhlee64-c
Status: RESOLVED FIXED    
Severity: critical CC: hfwong56-c
Priority: ---    
Version: unspecified   
Hardware: PC   
OS: Windows   
Attachments: Test case for creating patient with invalid DOB

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!