medium complexity extracted Contacts Confidence: 100%
7
Components
4
Shared
0
User Stories
Yes
Analyzed

Description

This feature enables peer mentors and coordinators to record and manage caregiver and next-of-kin relationships linked directly to a contact record. A CaregiverSectionWidget embedded in the contact detail screen captures the caregiver's name, relationship type, phone, and email as structured fields. This is essential for organisations such as Barnekreftforeningen, whose peer mentors work with families around a child with cancer and must track parents, siblings, or primary guardians as the practical counterparts in every interaction, without navigating to a separate module.

Sources & reasoning

Line 121 establishes Barnekreftforeningen's need to track caregivers and next-of-kin linked to the same contact case, directly motivating this feature within the Contacts area. Line 467 canonically places Caregiver & Next-of-Kin in the Contacts area taxonomy. The blueprint marks it MVP, consistent with Barnekreftforeningen's Phase 1 MUST requirement for family-linked contact tracking noted in the priority matrix (line 161).

  • docs/source/likeperson.md · line 121
    Barnekreftforeningen jobber primært med familier rundt barn med kreft, ikke kun med de berørte selv. Appen må støtte registrering av pårørende (foreldre, søsken, nærmeste omsorgsperson)
  • docs/source/likeperson.md · line 467
    | contacts | Contacts | Contact List & Search, Contact Detail & Edit, Caregiver & Next-of-Kin |

Analysis

Business Value

Peer mentoring frequently involves not just the primary contact but their immediate support network, particularly for family-centred organisations. Without structured caregiver records linked in context, coordinators and peer mentors must rely on informal notes or separate spreadsheets, creating data inconsistencies and increasing the risk of missed follow-up. Embedding caregiver data within the contacts workflow ensures the information is accessible in context with minimal navigation overhead, supporting the platform's low-cognitive-load design principle. Barnekreftforeningen's Phase 1 MUST classification makes this a launch-blocking capability that cannot be deferred without leaving core family-centred workflows unsupported.

Implementation Notes

Implemented as a CaregiverSectionWidget rendered as a collapsible section within ContactDetailScreen, backed by CaregiverService and CaregiverRepository operating on the caregivers table (foreign key to contacts, organisation-scoped). Create, edit, and delete actions use the standard mutation outbox for offline-safe persistence with automatic rollback on failure. The caregiver model stores name, relationship type (enum: parent, sibling, guardian, next-of-kin, other), phone, and email as structured fields. Field labels can be overridden via the organisation labels system. The section is conditionally mounted based on the enabled module set returned by the bootstrap response, and integration tests cover the full CRUD lifecycle.

User Stories

No user stories have been generated for this feature yet.