| Summary: | Cannot show the patient information by input the id "SID555" | ||
|---|---|---|---|
| Product: | Group 15 | Reporter: | Chan Chung Kam <ckchan599-c> |
| Component: | Coronavirus Tracker | Assignee: | Chan Chung Kam <ckchan599-c> |
| Status: | CONFIRMED --- | ||
| Severity: | enhancement | CC: | aidanyip2-c |
| Priority: | High | ||
| Version: | 1.0 | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Deadline: | 2020-12-01 | ||
|
Description
Chan Chung Kam
2020-12-07 09:52:07 HKT
I used your demo data to create patient information and I can reproduce the bug you mentioned. After my investigation, I found that this situation is a normal flow because in the ShowPatientCommand.java --> showPatientById() Line 149, this line of code is int id = Integer.parseInt(line);. It means that our system only accepts the integer value like 1 to 1000+. As you mention, you input the patient id "SID555" which referred to the paper-print patient report. Please be careful that the format of the patient ID "555" in our system is not same as paper-print the format of the patient ID "SID555" in the patient report. On the other side, you haven't input the patient record with patient ID "555". To avoid this problem occurs again we completed some enhancement for the system. Firstly, we enhanced error handling by displaying the error message "Please input the valid patient ID format in integer. E.g.) 1,2,3,100,1000,...." and the printstacktrace for this NumberFormatException. Secondly, we changed the code to allow users to input the patient id again when they have this exception. |