Yaladah / pe

0 stars 0 forks source link

Vaccinations in list do not link to vaccinations in a patient's details. #9

Open Yaladah opened 1 year ago

Yaladah commented 1 year ago

When creating a patient, I am able to add any name of vaccine under the --v tag.

This makes linking the already taken vaccinations hard to keep track off, as the user needs to follow the exact naming convention of the vaccines provided. This convention is also not easily found and leads to difficulty in setting new appointments for vaccines with prior requirements.

image.png

In the image above, I manually added Dose 1 (Moderna) under vaccines, but the app did not detect that the patient had taken the correct jab, and prevented me from scheduling a second appointment.

soc-pe-bot commented 1 year ago

Team's Response

There might be two ways of understanding this issue.

Patient cannot schedule a second appointment if they already have one Upcoming appointment

From the description (and screenshot) given, an attempt is being made to schedule another appointment for the same patient (No. 11).

This is stated in the UG that it is not allowed as it is a planned feature:

The patient referred to by PATIENT_ID must not have any upcoming appointments that are not yet completed.

image.png

taken from UG pg 32

When attempting to add an appointment to this patient, this error message will show:

This patient already has an upcoming appointment

However this was not reflected in the screenshot given which lead us to our next way of interpreting.

Patient cannot take vaccination

The most recent error message given in the screenshot:

Patient cannot take the vaccination

will only show if the patient cannot take the vaccination AND the patient does not have any appointments that is not complete.

From the screenshot, patient 11 already has an upcoming appointment.

We suspect that you might have accidentally typed 1 instead of 11 for the patient argument while adding the appointment.

Here is the procedure we did (which you can verify) to reproduce your screenshot:

  1. Close VMS if it is open and delete the data folder.
  2. Launch VMS.
  3. Add patient 7 "Alice": patient add --n Alice --p 98765432 --d 2001-03-19 --b B+ --a cat fur --a pollen --v covax
  4. Add patient 9 "John Doe": patient add --n John Doe --p 98765432 --d 2001-03-19 --b B+ --a cat fur --a pollen --v covax
  5. Add patient 10 "John Doe" (again): patient add --n John Doe --p 98765432 --d 2001-03-19 --b B+ --a cat fur --a pollen --v covax
  6. Add patient 10 "Billllllll": patient add --n Billllllll --p 98765432 --d 2001-03-19 --b B+ --a cat fur --a pollen --v covax
  7. Add patient 11 "Me": patient add --n Me --p 98765432 --d 2001-03-19 --b B+ --a cat fur --a pollen --v covax
  8. Schedule appointment for patient 11 "Me": appointment add --p 11 --v 1 --s 2023-5-1 0700 --e 2023-5-1 0800
  9. Delete patient 8: patient delete 8
  10. Edit patient 11 to manually add "Dose 1 (Moderna)" (to remove allergies as well): patient edit 11 --a <EMPTY> --v Dose 1 (Moderna) --set true
  11. Attempting to schedule an appointment for patient 11 by typing 1 instead of 11 in the patient argument: appointment add --p 1 --v 1 --s 2023-5-1 0700 --e 2023-5-1 0800

This will show the most recent error message in the screenshot.

Patient 1 (from start up sample data) cannot take the vaccination as he has taken "Dose 1 (Moderna)" which has the vaccination group of "DOSE 1". That vaccination also has the requirement that prevents patients from taking it if they have already taken a vaccination that has the "DOSE 1" group which "Dose 1 (Moderna)" has.

image.png


As we were unable to determine the exact intentions of the issue, we have marked it as IssueUnclear. On top of that on both cases, the behaviour is as expected.

Items for the Tester to Verify

:question: Issue response

Team chose [response.IssueUnclear]

Reason for disagreement: Let me clarify.

As the vaccine field under a patient is manually typed in, one might be likely to accidentally type in an incorrectly formatted vaccine. For example, Dose 1 (Moderna) vs Dose 1(Moderna), these 2 are separated by a difference of a space. The former would be recognized as a vaccine taken and would be allowed to schedule an appointment for Dose 2 (Moderna). However, the latter would cause the same scheduler to fail, as it was not recognized as the prerequisite vaccine. This can be linked to issue #8, where the error is not specified. As such, the small typo of missing one space would cause a chain reaction of bug fixing on the user's end, as they have to look through the patient's details and the vaccine details to figure out what went wrong and is also quite likely to miss out on the one missing space.

A small suggestion would be to link the patient to vaccines using the vaccine index instead, similar to appointments linking to patients using the patient's index.