Relative Case Linking
Feature Detail
Description
Relative Case Linking manages explicit associations between registered relatives and active cases or primary contacts. A single relative may be connected to multiple cases simultaneously - for example when two siblings in the same family are separate contacts. The feature provides a UI flow for linking and unlinking relatives to contacts, surfaced on both the contact detail page and the relative detail page for bidirectional navigation. Links carry metadata including the date established and optional contextual notes for each case association.
Sources & reasoning
The phrase 'knyttet til samme sak' (linked to the same case) in ยง3.4 motivates a dedicated linking mechanism distinct from registration itself. The blueprint models this as a separate relative_case_links junction table, confirming it is a distinct feature. MVP target follows the Fase 1 MUST classification of the parent area confirmed in ยง7.
No source references โ this artifact was included based on reasoning alone (see above).
Analysis
In family-centered support models, a single relative is frequently connected to more than one case - for instance when multiple children in the same family are receiving support. Without explicit case linking, coordinators would duplicate relative records or rely on free-text notes, leading to data fragmentation and missed follow-ups. Explicit case links enable the platform to generate family-level insights and help coordinators understand the full scope of care provided to a family unit. The junction-table pattern is reusable for any organization whose contacts are embedded in wider social networks.
Case linking is modeled via a relative_case_links junction table with columns relative_id, contact_id, linked_at, and notes. The Case Link Service exposes endpoints for creating and removing links with authorization checks preventing cross-organization associations. On mobile the link flow is accessible from both the Relative and Contact detail screens, presenting a searchable relative list scoped to the current organization. The junction table is replicated in Drift with the mutation outbox pattern. Riverpod providers manage link state per entity with reactive bidirectional updates on both screens.
Components (46)
Shared Components
These components are reused across multiple features
Service Layer (11)
Data Layer (23)
Infrastructure (7)
User Stories
No user stories have been generated for this feature yet.