Vavinan / pe

0 stars 0 forks source link

Deleting the text file from dailymed folder allows the user to take medicine again #3

Open Vavinan opened 2 months ago

Vavinan commented 2 months ago

image.png

After taking a medicine If the text file is deleted/ renamed and if the user give the take command second time it allows the user to take medicine again, which might cause overdosage.

soc-se-bot commented 2 months ago

Team's Response

This is to be expected as part of the implementation. During the start up of MediTracker, it first checks for today's text file to import the daily medication list. if not found, a new daily medication list will be created based on the medication data that is loaded separately.

So in this situation shown in the issue, when MediTracker cannot find a text file with today's date as the file name, it will create a new text file and import the relevant data from a separate medication list.

Unfortunately, when the new text file is created, it will not have memory of the old medication's status as being "taken", hence why the take command is able to perform once again.

When you delete the text file, any data regarding whether it has been taken or not is gone. There is no way for our program to know whether it has been taken before without a valid text file. We will re-load the data based on data from a separate medication list, which will allow you to take it again.

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: Your reasoning states that the deleting the text file will let the user to take medicine again. If the program allows the user to take medicine again after deleting the data file, it will lead to over dosage. If the user take medicine and the data file was deleted accidentally, and after an hour or later if he/check the daily dosage left, the program will say he/she still haven't take their medicine yet, which falsely states that the user has to take the medicine again. This will cause overdosage and depending on the medicine type the it might be serious issue.