Relative Link Store
Component Detail
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.
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.
-
docs/source/likeperson.md · line 77Appen må støtte registrering av pårørende (foreldre, søsken, nærmeste omsorgsperson) som egne kontaktsubjekter knyttet til samme sak.
-
docs/source/likeperson.md · line 111På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