At the moment there is a gap in coverage related to MMR(V) that I think we need to address, which is likely to involve refactoring how MMR(V) is handled in the code.
Specifically, we're missing any tests that record a vaccination for MMRV (tracked here #1066) because it's not easy to generate a patient with a specific date of birth.
Similarly, if we use random dates of birth, we end up with patients who are sometimes eligible for MMR and sometimes for MMRV, but none of the helpers method (for example record_parent_given_consent) is able to handle that distinction, and requires the caller to know to pass in mmrv_eligibility. This is an issue that came up while refactoring the self-consent tests: #1080
Another related issue is around the fact that the programme name for MMR(V) is MMR(V), but on the service it will display as MMR or MMRV as appropriate, meaning we have code like this in lots of places:
|
expected_outcome = ( |
|
"MMR" |
|
if vaccination_record.programme is Programme.MMR |
|
else str(vaccination_record.programme) |
|
) |
I suggest we do something like what we did in Mavis itself and introduce a concept of programme variants.
At the moment there is a gap in coverage related to MMR(V) that I think we need to address, which is likely to involve refactoring how MMR(V) is handled in the code.
Specifically, we're missing any tests that record a vaccination for MMRV (tracked here #1066) because it's not easy to generate a patient with a specific date of birth.
Similarly, if we use random dates of birth, we end up with patients who are sometimes eligible for MMR and sometimes for MMRV, but none of the helpers method (for example
record_parent_given_consent) is able to handle that distinction, and requires the caller to know to pass inmmrv_eligibility. This is an issue that came up while refactoring the self-consent tests: #1080Another related issue is around the fact that the programme name for MMR(V) is
MMR(V), but on the service it will display asMMRorMMRVas appropriate, meaning we have code like this in lots of places:manage-vaccinations-in-schools-testing/mavis/test/pages/record_vaccination_wizard_page.py
Lines 186 to 190 in f5196fe
I suggest we do something like what we did in Mavis itself and introduce a concept of programme variants.