Skip to content

Handle follow_up_requested as a distinct consent status#6339

Merged
murugapl merged 2 commits intonextfrom
follow-up-nurse-facing
Mar 30, 2026
Merged

Handle follow_up_requested as a distinct consent status#6339
murugapl merged 2 commits intonextfrom
follow-up-nurse-facing

Conversation

@murugapl
Copy link
Copy Markdown
Contributor

@murugapl murugapl commented Mar 17, 2026

Implements the previously stubbed should_be_needs_consent_follow_up_requested? In StatusGenerator::Programme so patients land in the "Needs consent / Follow-up requested" group rather than "Has a refusal".

Updates conflicting consent detection so that follow_up_requested is treated as the overall outcome when there are multiple consent responses only if that follow-up could change the overall outcome to :given. If there are other refusals, then we keep it as :conflicts.

Jira Issue - MAV-526

Screenshots

screencapture-127-0-0-1-4000-sessions-session-7-patients-481-td-ipv-2026-03-17-09_44_25 Screenshot 2026-03-17 at 09 44 34 Screenshot 2026-03-17 at 09 56 59

...

@murugapl murugapl added this to the v7.6.0 milestone Mar 17, 2026
@murugapl murugapl added the feature New functionality label Mar 17, 2026
@murugapl murugapl marked this pull request as ready for review March 17, 2026 10:59
@murugapl murugapl requested a review from a team as a code owner March 17, 2026 10:59
@murugapl murugapl force-pushed the follow-up-parent-journey branch from d4d7cd5 to 58c0f92 Compare March 17, 2026 12:05
@murugapl murugapl force-pushed the follow-up-nurse-facing branch 3 times, most recently from 0678b09 to 84b3e73 Compare March 17, 2026 15:15
@murugapl murugapl marked this pull request as draft March 17, 2026 15:20
@murugapl murugapl force-pushed the follow-up-nurse-facing branch from 84b3e73 to 0773282 Compare March 17, 2026 15:53
@murugapl murugapl force-pushed the follow-up-parent-journey branch 2 times, most recently from 6571fdd to 6a36bfe Compare March 19, 2026 10:35
@murugapl murugapl force-pushed the follow-up-nurse-facing branch from 0773282 to 160f00e Compare March 19, 2026 10:43
@murugapl murugapl force-pushed the follow-up-parent-journey branch from 6a36bfe to ebe9dc9 Compare March 19, 2026 11:03
@murugapl murugapl force-pushed the follow-up-nurse-facing branch from 160f00e to ace75e0 Compare March 19, 2026 11:04
@murugapl murugapl marked this pull request as ready for review March 19, 2026 11:22
@murugapl murugapl force-pushed the follow-up-nurse-facing branch from ace75e0 to ee1215f Compare March 19, 2026 13:39
@murugapl murugapl modified the milestones: v7.6.0, v7.7.0 Mar 19, 2026
@murugapl murugapl force-pushed the follow-up-nurse-facing branch from ee1215f to 4acbae9 Compare March 23, 2026 09:11
@murugapl murugapl force-pushed the follow-up-parent-journey branch 2 times, most recently from ca066e8 to 9f3f8f7 Compare March 25, 2026 11:12
@murugapl murugapl force-pushed the follow-up-nurse-facing branch 2 times, most recently from a16fe2f to 5ade230 Compare March 25, 2026 11:15
@murugapl murugapl force-pushed the follow-up-parent-journey branch from 9f3f8f7 to 63d4262 Compare March 25, 2026 15:24
@murugapl murugapl force-pushed the follow-up-nurse-facing branch from 5ade230 to 50be206 Compare March 25, 2026 15:24
@murugapl murugapl force-pushed the follow-up-parent-journey branch from 63d4262 to bb8ae98 Compare March 26, 2026 10:42
@murugapl murugapl force-pushed the follow-up-nurse-facing branch from 50be206 to 57758ec Compare March 26, 2026 10:42
@murugapl murugapl force-pushed the follow-up-parent-journey branch from bb8ae98 to ebe170e Compare March 27, 2026 14:47
@murugapl murugapl force-pushed the follow-up-nurse-facing branch from 57758ec to 30cf026 Compare March 27, 2026 14:47
Base automatically changed from follow-up-parent-journey to next March 29, 2026 22:15
@murugapl murugapl enabled auto-merge March 29, 2026 22:16
@murugapl murugapl disabled auto-merge March 30, 2026 08:42
A consent recorded as `follow_up_requested` is semantically a refusal with the parent still open to discussion - not a definitive no. This means it needs its own consent status rather than being grouped with refused, and it affects conflict detection.

Implements the previously stubbed `should_be_needs_consent_follow_up_requested?` In `StatusGenerator::Programme` so patients land in the "Needs consent / Follow-up requested" group rather than "Has a refusal".

Updates conflict detection so that `follow_up_requested` is treated as the overall outcome when there are multiple consent responses only if that follow-up could change the overall outcome to `:given`. If there are other refusals, then we keep it as `:conflicts`
The raw enum value "follow_up_requested" was interpolated directly into the timeline title, producing "Consent follow_up_requested". Use Consent.human_enum_name to resolve the I18n translation instead, which yields the correct human-readable label for all response types ("Consent given", "Consent refused",  "Follow-up requested").
@murugapl murugapl force-pushed the follow-up-nurse-facing branch from 30cf026 to 1c208eb Compare March 30, 2026 09:17
@murugapl murugapl merged commit 3e1bceb into next Mar 30, 2026
13 checks passed
@murugapl murugapl deleted the follow-up-nurse-facing branch March 30, 2026 09:52
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