Open nus-pe-bot opened 2 days ago
Both issues indicate that the application needs a more robust duplicate detection mechanism that goes beyond just checking NRICs, incorporating other key attributes to prevent unintentional duplicate records. Thus, #2666 is effectively a duplicate of #2372, as they both propose a similar enhancement to improve data integrity and prevent user errors.
Duplicate of #2372
Steps to reproduce:
add n/John Doe i/S9999999A d/2000-01-01 g/M p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25
add n/John Doe i/S9999999B d/2000-01-01 g/M p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25
Expected Output: Although it has been mentioned in the UG that duplicates will only be flagged if an existing patient has the same NRIC, it is unreasonable to expect two patients with exact matching details except for having different NRICs. Hence, I would expect the app to throw an error alerting the user that they may be adding a duplicate patient
Actual Output: Both commands were executed and two patients with almost identical details were added to the address book
Potentially problematic behaviour: There is a good chance that the user keying in the details had just made an error when entering the NRIC. This could lead to the user accidentally adding duplicate patients without being aware. It would be beneficial to add further checks to see if all other key information like their phone number, email address and residential addresses match as well to warn the user.
[original: nus-cs2103-AY2425S1/pe-interim#1143] [original labels: severity.Medium type.FeatureFlaw]