Data Layer medium complexity backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations

Description

Data access component backing the dedicated join table that persists case-to-relative links. Provides CRUD operations and lookup queries used by the Case Link Service and other features that respect family unit boundaries.

Feature: Relative Case Linking

relative-link-store

Sources & reasoning

Source line 77 explicitly states relatives must be linked 'til samme sak' (to the same case). Case linking is the structural mechanism that fulfills this requirement and is part of the Pårørende-database Fase 1 MUST scope per the matrix at line 111.

  • Appen mĂĄ støtte registrering av pĂĄrørende (foreldre, søsken, nærmeste omsorgsperson) som egne kontaktsubjekter knyttet til samme sak.
  • PĂĄrørende database | âś“ | - | - | - | âś“ | MUST (Barnekreft) | 1

Responsibilities

  • Persist case-to-relative link records in the join table
  • Enforce uniqueness on case and relative pairs
  • Query links by case id or relative id
  • Delete links when a case or relative is removed
  • Expose read access for search, activity logging, and notes

Interfaces

insertLink(caseId, relativeId): LinkRecord
deleteLink(linkId): void
findLinksByCase(caseId): LinkRecord[]
findLinkByRelative(relativeId): LinkRecord