Service Layer low complexity mobile
1
Dependencies
1
Dependents
1
Entities
0
Integrations

Description

Business logic layer for caregiver CRUD operations. Orchestrates calls to the Caregivers Repository, enforces valid relationship type values, and maps repository results to domain CaregiverModel objects. Propagates structured domain exceptions on API or validation failure.

Feature: Caregiver & Next-of-Kin

caregiver-service

Responsibilities

  • Orchestrate CRUD operations for caregiver records via the Caregivers Repository
  • Enforce valid relationship type enum (spouse, parent, child, sibling, carer, other)
  • Map repository responses to typed CaregiverModel domain objects
  • Propagate structured domain exceptions for error handling in the BLoC

Interfaces

getCaregiversForContact(String contactId): Future<List<CaregiverModel>>
addCaregiver(String contactId, CaregiverData data): Future<CaregiverModel>
updateCaregiver(String caregiverId, CaregiverData data): Future<CaregiverModel>
deleteCaregiver(String caregiverId): Future<void>

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component