Skip to content

Implement logic to determine needs_consent_request_failed status#6509

Open
jhenderson wants to merge 2 commits intoneeds-consent-sub-statuses-scheduled-not-scheduledfrom
needs-consent-sub-statuses-request-failed
Open

Implement logic to determine needs_consent_request_failed status#6509
jhenderson wants to merge 2 commits intoneeds-consent-sub-statuses-scheduled-not-scheduledfrom
needs-consent-sub-statuses-request-failed

Conversation

@jhenderson
Copy link
Copy Markdown
Contributor

@jhenderson jhenderson commented Apr 2, 2026

This is another attempt after #6443, but this time focusing on “Request failed”.

This adds the logic to Patient::ProgrammeStatus#status where if Mavis has attempted to send one or more consent requests for a child and ALL attempts to ALL contacts have failed, then the programme status becomes
needs_consent_request_failed.

Jira Issue - MAV-5895

Children search Patient page Patient programme page Session patient page
Screenshot 2026-04-07 at 11 27 49 Screenshot 2026-04-07 at 11 29 52 Screenshot 2026-04-07 at 11 30 20 Screenshot 2026-04-07 at 11 30 53

@jhenderson jhenderson force-pushed the needs-consent-sub-statuses-request-failed branch from 821092b to b9bdc1c Compare April 2, 2026 14:06
@jhenderson jhenderson force-pushed the needs-consent-sub-statuses-scheduled-not-scheduled branch from 28a1d34 to 11b185d Compare April 2, 2026 16:10
@jhenderson jhenderson force-pushed the needs-consent-sub-statuses-request-failed branch from b9bdc1c to 2ccc0bd Compare April 2, 2026 16:11
This adds the logic where if a child is eligible for the programme and
hasn't been sent any consent requests and has parent contact details:
- If part of a session where consent requests are scheduled to go out in
  the future, the programme status becomes `needs_consent_request_scheduled`.
- If not assigned to a session with a request scheduled, the programme
  status becomes `needs_consent_request_not_scheduled`.

Jira-Issue: MAV-5882
@jhenderson jhenderson force-pushed the needs-consent-sub-statuses-scheduled-not-scheduled branch from 11b185d to eaff2fe Compare April 7, 2026 08:10
This adds the logic to `Patient::ProgrammeStatus#status` where if Mavis
has attempted to send one or more consent requests for a child and ALL
attempts to ALL contacts have failed, then the programme status becomes
`needs_consent_request_failed`.
@jhenderson jhenderson force-pushed the needs-consent-sub-statuses-request-failed branch from 2ccc0bd to a34eb66 Compare April 7, 2026 08:11
@jhenderson jhenderson marked this pull request as ready for review April 7, 2026 11:25
@jhenderson jhenderson requested a review from a team as a code owner April 7, 2026 11:25
@jhenderson jhenderson added this to the v7.10.0 milestone Apr 7, 2026
@jhenderson jhenderson added the feature New functionality label Apr 7, 2026
@jhenderson jhenderson force-pushed the needs-consent-sub-statuses-scheduled-not-scheduled branch 4 times, most recently from 0b82498 to c3332e8 Compare April 10, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants