shittake / pe

0 stars 0 forks source link

Duplicate drugs of the same name are able to be added due to case insensitivity #7

Open shittake opened 1 year ago

shittake commented 1 year ago

Lack of case sensitivity allows me to add the same drug with the exact same active ingredient and all other parameters. Without any prompting to the user, this could allow the user to unknowingly add multiple drugs that are already inside the database. Then, when updating the storage of a particular drug, this would result in only the entry with the exact name being updated with the new storage details, which may be problematic (i.e. storage for panadol changed but not Panadol even though all other entries for these two are identical)

image.png

nus-se-bot commented 1 year ago

Team's Response

No details provided by team.

The 'Original' Bug

[The team marked this bug as a duplicate of the following bug]

Finding drugs using the find command results in two drugs of different capitalization that are treated as different entities both being treated the same now

There is some inconsistency with how these drug entries are perceived - originally, the system sees two drugs with identical entries but different capitalizations to be different drugs. Currently, the d find Panadol command now treats the drugs to be the same entry. Although this activity is specified, this is inconsistent and could be confusing to the user.

image.png


[original: nus-cs2103-AY2223S2/pe-interim#50] [original labels: severity.VeryLow type.FeatureFlaw]

Their Response to the 'Original' Bug

[This is the team's response to the above 'original' bug]

Thanks for bringing this up

Items for the Tester to Verify

:question: Issue duplicate status

Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)

Reason for disagreement: These two issues were flagged by me for different reasons although they may both appear to be about the capitalization issue.

The first is that the ability to add duplicate drugs of the same name that are treated as different entities could affect usage since it is possible to deplete the storage of one drug while still appearing to have "remaining storage" for the exact same drug with different capitalization. This could be detrimental in stocktakes in the real world where knowing the exact remaining quantity of a drug is important to the healthcare personnel. There is also no warning provided.

The second issue is that the ability to find two drugs that were previously treated as different entities to now be considered as the same entity using the find command. This inconsistency between the previous add command and current find command is not documented and would be confusing to the user, as it would affect how each user now preceives the product. For example, if the user treats "Panadol" and "panadol" to be different products using the add command (which is the apparent expected feature designed by the team), this same user would not expect the find command to show both "Panadol" and "panadol" to now appear - he would expect the exact product that he is searching for to come up, specifically that if he wants "Panadol" to appear instead of "panadol", the application should do precisely this since this has been the intended feature by the team.

Therefore, these two issues are not duplicate issues as they stem from different reasons.


## :question: Issue severity Team chose [`severity.VeryLow`] Originally [`severity.Low`] - [x] I disagree **Reason for disagreement:** This has been previously mentioned in great detail, and I would like to explain why this should not just be "VeryLow" in severity. The first is that the ability to **add duplicate drugs of the same name that are treated as _different entities_** could affect usage since it is possible to deplete the storage of one drug while still appearing to have "remaining storage" for the exact same drug with different capitalization. This could be detrimental in stocktakes in the real world where knowing the exact remaining quantity of a drug is important to the healthcare personnel. There is also no warning provided. The second issue is that the ability to **find two drugs that were previously treated as _different entities_ to now be considered as the _same entity_ using the `find` command**. This inconsistency between the previous `add` command and current `find` command is not documented and would be confusing to the user, as it would affect how each user now preceives the product. For example, if the user treats "Panadol" and "panadol" to be different products using the `add` command (which is the apparent expected feature designed by the team), this same user would not expect the `find` command to show both "Panadol" and "panadol" to now appear - he would expect the exact product that he is searching for to come up, specifically that if he wants "Panadol" to appear instead of "panadol", the application should do precisely this since this has been the intended feature by the team. This could be detrimental because if these two are indeed different drugs, then if both appear now after using the `find` command, the wrong drug could be selected by the healthcare personnel. Hence, this contradiction could result in grave errors in the real-world setting especially since this inconsistency is quite prevalent (in the pie chart feature as well).