Open Yaladah opened 1 year ago
There might be two ways of understanding this issue.
Upcoming
appointmentFrom 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.
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.
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:
data
folder.patient add --n Alice --p 98765432 --d 2001-03-19 --b B+ --a cat fur --a pollen --v covax
patient add --n John Doe --p 98765432 --d 2001-03-19 --b B+ --a cat fur --a pollen --v covax
patient add --n John Doe --p 98765432 --d 2001-03-19 --b B+ --a cat fur --a pollen --v covax
patient add --n Billllllll --p 98765432 --d 2001-03-19 --b B+ --a cat fur --a pollen --v covax
patient add --n Me --p 98765432 --d 2001-03-19 --b B+ --a cat fur --a pollen --v covax
appointment add --p 11 --v 1 --s 2023-5-1 0700 --e 2023-5-1 0800
patient delete 8
patient edit 11 --a <EMPTY> --v Dose 1 (Moderna) --set true
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.
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.
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.
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.
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.