-
Notifications
You must be signed in to change notification settings - Fork 9
Refactor how consent forms are modelled per programme #3669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78c5a60
to
03806b0
Compare
03806b0
to
ea2dde9
Compare
ea2dde9
to
5a6c15e
Compare
5a6c15e
to
7a5454c
Compare
7a5454c
to
c91ce92
Compare
c91ce92
to
662d944
Compare
662d944
to
efa5f59
Compare
efa5f59
to
c290f1c
Compare
373360f
to
531d6da
Compare
c290f1c
to
1750686
Compare
jhenderson
approved these changes
Jun 6, 2025
1750686
to
0f773b2
Compare
0f773b2
to
e77b6d2
Compare
e77b6d2
to
025f61e
Compare
025f61e
to
826fb64
Compare
bbc6a1b
to
400875c
Compare
400875c
to
eb14122
Compare
eb14122
to
a98037f
Compare
a98037f
to
8770c64
Compare
This refactors how consents forms model the information related to giving consent to multiple programmes in the same form. This change isn't strictly related to Flu, but future work will build upon it. The main change is to move whether a programme has been given consent for or not out of the `ConsentForm` model and in to the individual `ConsentFormProgramme` models. At the moment we only support up to two programmes in a single consent form, but this would open the door to allowing more than two programmes in a single consent form. Where before the model looked something like: - `ConsentForm` with many programmes - `response` one of `given`, `given_one` or `refused` - `chosen_vaccines` either `nil` or `hpv`, `menacwy`, `td_ipv` The model now looks something like: - `ConsentForm` with many programmes - Each programme - `response` one of either `given` or `refused` I've made this change in preparation for Flu where we will also need to store the preferred vaccine method or methods and the `ConsentFormProgramme` seemed like the right place for it. Although this could be done without this refactor, there was a mismatch between where we were storing the consent response and where we were storing preferences specific to the programme. Jira-Issue: MAV-1230
8770c64
to
bf19acc
Compare
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This refactors how consents forms model the information related to giving consent to multiple programmes in the same form. This change isn't strictly related to Flu, but future work will build upon it.
The main change is to move whether a programme has been given consent for or not out of the
ConsentForm
model and in to the individualConsentFormProgramme
models. At the moment we only support up to two programmes in a single consent form, but this would open the door to allowing more than two programmes in a single consent form.Where before the model looked something like:
ConsentForm
with many programmesresponse
one ofgiven
,given_one
orrefused
chosen_vaccines
eithernil
orhpv
,menacwy
,td_ipv
The model now looks something like:
ConsentForm
with many programmesresponse
one of eithergiven
orrefused
I've made this change in preparation for Flu where we will also need to store the preferred vaccine method or methods and the
ConsentFormProgramme
seemed like the right place for it. Although this could be done without this refactor, there was a mismatch between where we were storing the consent response and where we were storing preferences specific to the programme.Jira Issue