Service Layer medium complexity mobile
1
Dependencies
1
Dependents
2
Entities
0
Integrations

Description

Fetches the full contact record including all related data needed to populate the Contact Detail Screen: personal profile, caregiver entries, assigned peer mentor, and summary counts for activities, notes, assignments, and expenses. Caches the result in the Contact Store and provides a refresh mechanism. Coordinates with the terminology service to resolve organisation-specific field labels before passing data to the UI.

Feature: Contact Detail & Edit

contact-detail-service

Responsibilities

  • Fetch full contact profile from GET /api/v1/contacts/:id with all related record summaries
  • Resolve organisation-specific field labels via the terminology service
  • Persist fetched contact to Contact Store for offline read access
  • Expose refresh and cache-invalidation methods for pull-to-refresh scenarios

Interfaces

fetchContact(contactId: String)
refreshContact(contactId: String)
getCachedContact(contactId: String): Contact?
invalidateCache(contactId: String)
resolveFieldLabels(contact: Contact, orgId: String): LabelledContact

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component

Related Data Entities (2)

Data entities managed by this component