Skip to content

Conversation

thomasleese
Copy link
Contributor

This ensures that if a consent form has already been matched, the automated process doesn't run and match consents with patients which might result in duplicate consents.

This is necessary as we've moved this job to Sidekiq where it will continue to retry if it fails. For example, it might fail due to a bad request from PDS, and continue to do this for the next 21 days. In that time, the consent form may have been matched manually and therefore we would never want the automatic job to succeed.

As part of building this I've also fixed a data model association between consents and consent forms that doesn't quite work as intended.

Jira Issue - MAV-1897

@thomasleese thomasleese added this to the v4.3.0 milestone Sep 18, 2025
@thomasleese thomasleese requested a review from a team as a code owner September 18, 2025 14:23
@thomasleese thomasleese added the operations Improving live support label Sep 18, 2025
@thomasleese thomasleese changed the title Consent job skip if matched Discard ConsentFormMatchingJob once matched Sep 18, 2025
At the moment the association is described as many consent forms have
the same consent. Whereas in reality it should be one consent form has
many consents (one per programme).

Jira-Issue: MAV-1897
This ensures that if a consent form has already been matched, the
automated process doesn't run and match consents with patients which
might result in duplicate consents.

This is necessary as we've moved this job to Sidekiq where it will
continue to retry if it fails. For example, it might fail due to a bad
request from PDS, and continue to do this for the next 21 days. In that
time, the consent form may have been matched manually and therefore we
would never want the automatic job to succeed.
@thomasleese thomasleese force-pushed the consent-job-skip-if-matched branch from 97a1bc3 to c87bf6a Compare September 19, 2025 11:31
Copy link

@thomasleese thomasleese merged commit b8f6c34 into next Sep 19, 2025
13 checks passed
@thomasleese thomasleese deleted the consent-job-skip-if-matched branch September 19, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
operations Improving live support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants