WP-12 API enrichment for Stitch parity
Load AGENTS.md, contracts.md, ADR 0012, and this file. Tech specs: api/api-enrichment.md, app/api-enrichment.md, exchange/api-enrichment.md. Implement only when the user asks and WP-04, WP-05, and WP-07 have landed.
Group G4. May run beside WP-11.
Owns
Write:
afia-api/src/main/java/health/afia/app/notifications/afia-api/src/test/java/health/afia/app/notifications/afia-api/src/main/resources/db/changelog/modules/stitch-parity.yamlafia-app/lib/domain/care/afia-app/lib/data/care/
Edit (add fields and endpoints only, in the owner package):
health.afia.app.patient.appointmentandhealth.afia.app.clinician.agendahealth.afia.app.patient.profileandhealth.afia.app.clinician.profilehealth.afia.app.patient.billingandhealth.afia.app.patient.monitoringhealth.afia.app.adminhealth.afia.app.diagnosticshealth.afia.app.identityforlastSeenAtonly- The matching test folders
afia-app/lib/domain/andafia-app/lib/data/folders for the same packagesdb.changelog-master.yamlto includestitch-parity.yaml
Features: F-22 dashboard and notification projections.
Reserved paths: /api/v1/afia/notifications, /api/v1/afia/patient/home, /api/v1/afia/clinician/dashboard.
Must not write
EndpointUri.java,api_config.dart. A WP-00 follow-up adds the three new constants.- Any presentation folder
- A second table for a type another package owns
health.afia.app.patient.resultsstorage. Results stay a projection fromdiagnostics.
Depends on
WP-04, WP-05, and WP-07. The fields extend their types. A WP-00 follow-up reserves the three new prefixes before the first controller lands.
Done when
- Visits gain
reason,mode(VIDEOorCABINET),priority(ROUTINEorURGENT),clinicName, andspecialty. GET /api/v1/afia/clinician/agendaacceptsfromandto.daystill works.POST /api/v1/afia/appointments/{id}/ratingstores 1 to 5 stars for an ended visit. Only the visit patient may rate.- Clinician search cards gain
displayName,clinicName,fee, andnextSlot. GET /api/v1/afia/clinician/dashboard,GET /api/v1/afia/patient/home,GET /api/v1/afia/admin/dashboard, andGET /api/v1/afia/worklists/summary?kind=return counts and short lists for the caller role.GET /api/v1/afia/notificationsprojects visits, results, invoices, and alerts.POST /api/v1/afia/notifications/seensetslastSeenAton the account.- Vitals gain
unit,measuredAt, andstatus(NORMAL,HIGH,LOW). Invoices gaincreatedAt,currency(MRU),reference, andclinicianName. - Work items gain
examName,requestedAt,orderedBy, andstructureName. Orders gainscheduledAt.PATCH /api/v1/afia/orders/{id}/schedulesets it. - Patient profile gains
firstName,lastName,birthDate,email,address,city,bloodGroup,allergies, andhistory. Clinician profile gainsdisplayName,clinicName, andbio. - Admin users gain
displayName,status(ACTIVEorSUSPENDED), andcreatedAt.PATCH /api/v1/afia/admin/users/{id}/statussets status. - Every new column is in
stitch-parity.yaml. Every new endpoint has a controller test. cd afia-api && mvn testpasses.cd afia-app && flutter testpasses.
Do not invent screens
This package adds fields that in-scope Stitch screens show. Do not add a field that no in-scope screen.png shows. Do not add charts, AI, or video control fields. NNI belongs to ADR 0013 / AFIA-38 on the patient profile, not to this WP’s enrichment cut.