WP-07 Diagnostic orders and results
Load AGENTS.md, contracts.md, and this file. Tech specs: api/diagnostics.md, app/diagnostics.md, exchange/diagnostics.md. Implement only when the user asks and WP-01 plus WP-02 have landed.
Group G2. May run beside WP-05.
Owns
afia-api/src/main/java/health/afia/app/diagnostics/afia-api/src/test/java/health/afia/app/diagnostics/afia-app/lib/presentation/diagnostics/afia-app/lib/data/diagnostics/afia-app/lib/domain/diagnostics/
Features: F-11 receive imaging orders, F-12 read imaging exams, F-13 track lab analyses, F-14 publish lab results, F-20 create diagnostic order.
Reserved paths: /api/v1/afia/orders, /api/v1/afia/worklists.
Must not write
EndpointUri.java,api_config.dart,docs/api-map.mdhealth.afia.app.patient.results- Appointment or encounter persistence
- Two public APIs for imaging and lab
Depends on
WP-01 and WP-02. An order has patientId. encounterId is optional.
Done when
DiagnosticOrderandDiagnosticResultmatch contracts.md.kindisIMAGINGorLAB. That is the only write-API split.POST /api/v1/afia/orderscreates an order. F-20 is inferred. Keep the body topatientId,kind, and optionalencounterId.GET /api/v1/afia/worklists?kind=returns orders for the caller role.POST /api/v1/afia/orders/{id}/resultsstores one result. A patient caller is rejected.- Tests cover both kinds on the same types.
cd afia-api && mvn testpasses.cd afia-app && flutter testpasses.
Do not invent screens
Landing copy is receive, consult, analyses, and results. Do not name PACS viewers or analyzer panels. One worklist UI with a kind filter is enough until WP-10.