Skip to main content

WP-08 API spec

The module is in afia-api. Reads DiagnosticResult from diagnostics. Wire: exchange/patient-results.md.

Usage​

GET /api/v1/afia/results returns the current patient's results. This package does not persist DiagnosticResult. A patient cannot submit a result here.

Domain​

No new contract type. Use DiagnosticResult and DiagnosticKind from diagnostics. A local read model may wrap summary and kind for the patient face. It must not become a second store.

Persistence​

None. Call DiagnosticsService.resultsForPatient. Do not insert result rows.

HTTP DTOs​

  • PatientResultResponseDto outbound. summary, kind, orderId, optional artifactUri.

Mappers​

PatientResultMapper.toResponse(DiagnosticResult) -> PatientResultResponseDto

Services​

PatientResultsService
listForCurrentPatient(session) -> DiagnosticResult[]

Controllers​

  • PatientResultsController on reserved /api/v1/afia/results. GET only.

Does not do​

health.afia.app.diagnostics persistence. A patient-owned copy of result rows. Booking or profile packages. Flutter types. Invented results timelines.