Open nus-pe-bot opened 1 year ago
This is not an infinite loop as the patient can still take the vaccination "VACX" IF they have not taken any vaccination that has a "VACX" group. So a patient that has not taken any vaccinations can still take that vaccination.
Note too that the names of the vaccination and the groups of the vaccination are different things. While checking if the patient can take the vacicnation based on its vaccination history, VMS checks the groups of the vaccinations that the patient has taken. This has been explained clearly here (pg 23):
The meanings of each types are also explained in detail here (pg 12):
However, if your intened version of "infinite loop" is something like this instead:
It would still not be an "infinite loop" as a patient that has not taken a vaccination that contains the "VACX" group can take the vaccination.
This can be demonstrated with the following command:
patient clear --force true
and vaccination clear --force true
vaccination add VACX --g VACX --h NONE::VACX
patient add --n NONE--p 445 --d 0001-1-1 --b A+
appointment add --p 1 --v 1 --s 2024-1-1 --e 2024-1-2
The appointment will be scheduled.
If "infinite loop" concerns other requriement types as well, for example a case like this:
This would just mean that the patient will have to take a vaccination that has the group "VACX" before being able to take this vaccination. Vaccination groups are not unique as well as demonstrated in the start up sample data with multiple vaccination containing the "DOSE 1", "DOSE 2", etc groups.
If the issue then is about intersecting requirements concerning the NONE type, this has been state in the planned enhancement section:
--
Able to add a vaccine as its own requirement
[original: nus-cs2103-AY2223S2/pe-interim#2242] [original labels: severity.Low type.FunctionalityBug]