Caregiver Store
Component Detail
Data Layer
medium complexity
backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Persistence layer responsible for storing caregiver and next-of-kin records and their relationships to parent contacts. Provides query access by caregiver id and by parent contact id.
caregiver-store
Sources & reasoning
Blueprint lists Caregiver & Next-of-Kin under the Contacts area as a distinct feature. It is the per-contact carer attachment (distinct from the Relatives Database area). Not in mobile MVP screens list, so target_release defaults to Core Product per resolution rule 3.
-
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
-
docs/source/likeperson.md · line 353contacts | Contacts | Contact List & Search, Contact Detail & Edit, Caregiver & Next-of-Kin
-
docs/source/likeperson.md · line 111Pårørende database | ✓ | - | - | - | ✓ | MUST (Barnekreft) | 1
Responsibilities
- Persist caregiver records with relationship and consent fields
- Maintain foreign key linkage to parent contact and case
- Query caregivers by parent contact id
- Support soft-delete or hard-delete per data retention policy
- Enforce unique constraints to prevent duplicate caregiver entries per contact
Interfaces
insert(caregiver): Promise<Caregiver>
update(caregiverId, fields): Promise<Caregiver>
delete(caregiverId): Promise<void>
findById(caregiverId): Promise<Caregiver | null>
findByParentContact(parentContactId): Promise<Caregiver[]>