gavinsoh / pe

0 stars 0 forks source link

When adding a new patient into MedDict, the index of the patient does not change accordingly to the number of patients in the list. Adding a new patient to a list with one patient only should assign the new patient index 2. #3

Open gavinsoh opened 3 days ago

gavinsoh commented 3 days ago

Here, I have deleted all, except one patient, in MedDict:

Screenshot 2024-11-15 at 16.23.43.png

But upon using the create patient command, the index of the patient added is at index 20, instead of at index 2

Screenshot 2024-11-15 at 16.24.15.png

Adding patients after also assigns them the index of 22, leaving indexes 2-18 empty: Screenshot 2024-11-15 at 16.25.19.png

Adding a new patient to a list with one patient only should assign the new patient index 2.

nus-pe-bot commented 3 hours ago

[IMPORTANT!: Please do not edit or reply to this comment using the GitHub UI. You can respond to it using CATcher during the next phase of the PE]

Team's Response

Thank you very much for pointing out the issue and we really appreciate your valuable feedback. However, this is how our application has been designed. The only assertion or requirement for IDs that we have established (within the user guide, and demonstrated in the application) is that a patient will have an even-numbered ID while a doctor will have an odd-numbered ID and that all IDs are unique. There is no fixed rule that the ID of the next patient/doctor must be +2 of the current ID.

It is designed in such a way that in the future if we were to implement undo delete command, those deleted patients will be restored with the exact ID without creating an issue of duplicate IDs or having to perform a lot of changes to achieve the functionality.

Furthermore, we have ensured that the ID of each person is displayed clearly on his contact card corresponds with the ID of the person in the system. There is no discrepancy with how the ID is stored and rendered to the UI. Thus, the team believes that the logic of how an ID is assigned shouldn't be considered as a bug as it doesn't affect any normal operation of the user and adheres to all per-established restrictions and requirements of ID generation.

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: [replace this with your reason]