v2.2.1 hotfix#3562
Merged
thomasleese merged 9 commits intoreleasefrom May 16, 2025
Merged
Conversation
This adds a new column on consents which records when the consent was submitted, which in most cases is the same as when the consent was created, but in the case of manually matching a consent form with a patient, it'll be when the consent form was first submitted.
When creating a consent (either by automatic matching with a consent form, manual matching with a consent form, or when recording a verbal consent), this ensures that the `submitted_at` column is set approriately.
This changes how we determine the most recent consent response from the `created_at` to the `submitted_at`. In most cases these values will be the same, but it's possible for a consent to be matched with a patient manually which can occur some period of time after the consent was submitted. In particular, it's possible to manually match multiple consents in a different order to when they were submitted, which can lead to bugs where the patient is given the wrong consent status.
This is a more accurate representation of when the consent was submitted rather than using the `created_at`.
Otherwise we always build from using the workflow ref, but tag using the deploy sha.
This allows us to GET `/sha` to see which version of the code is deployed to an env.
This gets used when checking out the terraform code in "deploy-application", without it the workflow sha is always used.
This changes how we determine the most recent consent response from the `created_at` to the `submitted_at`. In most cases these values will be the same, but it's possible for a consent to be matched with a patient manually which can occur some period of time after the consent was submitted. In particular, it's possible to manually match multiple consents in a different order to when they were submitted, which can lead to bugs where the patient is given the wrong consent status. This has been implemented by storing a `submitted_at` column on consent responses, which has been done to ensure we don't hit performance issues when filtering or ordering consents where we need to fetch the related consent form. [Jira Issue](https://nhsd-jira.digital.nhs.uk/browse/MAV-1196)
|
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
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.



No description provided.