larainezo / pe

0 stars 0 forks source link

Unable to identify "Deleted Patient" in appointment list when patient list is emptied #2

Open larainezo opened 6 months ago

larainezo commented 6 months ago

Steps to reproduce Step 1: Empty patient list image.png Step 2: Run java -jar "[CS2103-F08-2][CogniCare].jar"

The output shows appointments with names "deleted patient". This becomes unusable for the user because we cannot recover or identify who the appointments initially belonged to. Therefore, I feel that this bug has a high severity level.

Expected All appointments should be deleted as well.

Actual Appointments have the name "deleted patient".

Screenshots image.png

nus-se-script commented 6 months ago

Team's Response

This is the intended functionality. Also note that this will only occur when you manually delete patients from the patientList.json file. If you delete patients normally, their associated appointments will also be deleted.

There are a few reasons why we are rejecting this

  1. This is the intended functionality. We added "Deleted Patient" to indicate that the patient that the appointment is linked to is no longer in the database so as to clear up any misunderstandings. Otherwise, the default behaviour would just be to show the names of the deleted patients. Furthermore, this feature is to enforce data protection so that when you delete patients from the system, there is no way to recover their data
  2. Deleting manually from the JSON file, while supported, is not typical user behaviour
  3. This is not a critical bug because if the patients have been deleted, then it is expected to no longer need to reference it.

    Items for the Tester to Verify

    :question: Issue response

Team chose [response.Rejected]

Reason for disagreement: While I agree that this is a good way to enforce data protection, I feel that allowing it to remain in the application hinders the usability of the application. In such cases, it seems that the user will need to manually delete all the appointments, which I foresee to be a scalability issue. Therefore, one suggestion I have would be to automatically delete the appointments that a deleted patient is in.


## :question: Issue severity Team chose [`severity.Low`] Originally [`severity.High`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]