Relative Service
Component Detail
Service Layer
medium complexity
mobile
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Coordinates business logic for creating, editing, and retrieving relative contact records. Enforces relationship rules, applies role-based access checks, and bridges the Relative Form with the offline-first persistence layer.
relative-service
Sources & reasoning
Source explicitly designates Pårørende-database as Fase 1 MUST for Barnekreftforeningen (line 332 and matrix line 111). Registration of relatives as distinct contact subjects is the foundational capability that all downstream relative features depend on, so it must ship in MVP.
-
docs/source/likeperson.md · line 77Pårørende-database: 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) som egne kontaktsubjekter knyttet til samme
-
docs/source/likeperson.md · line 111Pårørende database | ✓ | - | - | - | ✓ | MUST (Barnekreft) | 1
Responsibilities
- Create, update, and fetch relative records as first-class entities
- Enforce role-based permissions for peer mentors and coordinators
- Normalize and validate relationship metadata before persistence
- Provide search and lookup operations for referencing relatives across features
- Coordinate offline queuing and conflict resolution with the Relative Store
Interfaces
createRelative(payload): Promise<RelativeRecord>
updateRelative(relativeId, payload): Promise<RelativeRecord>
getRelative(relativeId): Promise<RelativeRecord>
searchRelatives(query): Promise<RelativeRecord[]>