Caregiver Service
Component Detail
Service Layer
medium complexity
backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Business logic layer that orchestrates caregiver record creation, retrieval, update, and deletion. Enforces consent rules and links caregivers to their parent contact and case.
caregiver-service
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
- Create, update, and delete caregiver records tied to a parent contact
- Validate relationship type and consent status against business rules
- Fetch caregivers by parent contact for display in the contact detail view
- Coordinate persistence through the Caregiver Store
- Emit domain events when caregiver consent status changes
Interfaces
createCaregiver(parentContactId, data): Promise<Caregiver>
updateCaregiver(caregiverId, data): Promise<Caregiver>
deleteCaregiver(caregiverId): Promise<void>
listCaregiversForContact(parentContactId): Promise<Caregiver[]>
getCaregiver(caregiverId): Promise<Caregiver>