- Add full CRUD operations for results (index, show, update, delete)
- Implement result validation with reference range checking (L/H flags)
- Add cumulative patient results retrieval across all orders
- Create ReportController for HTML lab report generation
- Add lab report view with patient info, order details, and test results
- Implement soft delete for results with transaction safety
- Update API routes with /api/results/* endpoints for CRUD
- Add /api/reports/{orderID} endpoint for report viewing
- Update OpenAPI docs with results and reports schemas/paths
- Add documentation for manual result entry and MVP plan
34 lines
1015 B
YAML
34 lines
1015 B
YAML
/api/reports/{orderID}:
|
|
get:
|
|
tags: [Reports]
|
|
summary: Generate lab report
|
|
description: Generate an HTML lab report for a specific order. Returns HTML content that can be viewed in browser or printed to PDF.
|
|
security:
|
|
- bearerAuth: []
|
|
parameters:
|
|
- name: orderID
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
description: Internal Order ID
|
|
responses:
|
|
'200':
|
|
description: HTML lab report
|
|
content:
|
|
text/html:
|
|
schema:
|
|
type: string
|
|
description: HTML content of the lab report
|
|
'404':
|
|
description: Order or patient not found
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '../components/schemas/common.yaml#/ErrorResponse'
|
|
'500':
|
|
description: Failed to generate report
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '../components/schemas/common.yaml#/ErrorResponse' |