WP-12 Flutter spec
Client side of the new fields and projections. Decision: ADR 0012. Wire: exchange/api-enrichment.md.
Usage
Role screens call CareGateway for home, dashboard, worklist summary, and notifications. They keep calling the owner repositories for visits, profiles, orders, and admin users. Those models gain the new fields.
Domain
PatientHome,ClinicianDashboard,AdminDashboard,WorklistSummary, andAfiaNotificationatlib/domain/care/.CareGatewayatlib/domain/care/care_gateway.dartgainspatientHome,clinicianDashboard,adminDashboard,worklistSummary(kind),notifications, andmarkNotificationsSeen.- Owner domain types in
lib/domain/booking/,patient/profile/,clinician/profile/,admin/, anddiagnostics/gain the fields in api/api-enrichment.md.
Models
PatientHomeModel,ClinicianDashboardModel,AdminDashboardModel,WorklistSummaryModel, andNotificationModelatlib/data/care/.fromJsonkeys match the wire.- Owner models add the new keys. A missing key parses to null so older servers still work.
Data sources
CareRemoteatlib/data/care/care_remote.dart.
patientHome() -> PatientHome
clinicianDashboard() -> ClinicianDashboard
adminDashboard() -> AdminDashboard
worklistSummary(kind) -> WorklistSummary
notifications() -> AfiaNotification[]
markNotificationsSeen() -> void
Owner data sources add rateVisit(id, stars), agendaRange(from, to), scheduleOrder(id, scheduledAt), and setUserStatus(id, status).
Uses ApiConfig constants that a WP-00 follow-up adds.
Repositories
CareGatewayis the repository for projections.BookingRepository, profile repositories,AdminRepository, and the diagnostics repository keep their names.
Does not do
Screens. Theme. A second HTTP client. Local caches of health data.