nus-cs2103-AY2425S1 / pe-dev-response

0 stars 0 forks source link

Duplicate check for patients could be improved to check beyond just matching NRICs #2666

Open nus-pe-bot opened 2 days ago

nus-pe-bot commented 2 days ago

Steps to reproduce:

duplicate only checks nric.png

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]

yadobler commented 1 day ago

Team's Response

2372 and #2666 address the same core problem: the lack of comprehensive duplicate detection for patient records.

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 status (if any):

Duplicate of #2372