Tests
Test types define catalog entries; tests hold orders and results.
The tests model
Properties
- Name
id- Type
- string
- Description
Test order UUID.
- Name
patientId- Type
- string
- Description
Patient under test.
- Name
testTypeId- Type
- string
- Description
Catalog test type.
GET/api/tests
List tests
Filter by patient or status.
Request
GET
/api/testscurl -X GET http://localhost:3000/api/tests \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"patientId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"testTypeId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"status": "PENDING",
"orderedAt": "2026-10-05T06:30:00.000Z"
}
]
}
POST/api/tests
Create test
Order a new test for a patient.
Request
POST
/api/testscurl -X POST http://localhost:3000/api/tests \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"patientId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"status": "PENDING"
}
POST/api/tests/:id/results
Submit results
Attach structured or file results.
Request
POST
/api/tests/:id/resultscurl -X POST http://localhost:3000/api/tests/:id/results \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "COMPLETED",
"resultedAt": "2026-10-05T06:30:00.000Z"
}
GET/api/test-types
Test types
Catalog of available test types.
Request
GET
/api/test-typescurl -X GET http://localhost:3000/api/test-types \
-H "Authorization: Bearer YOUR_JWT"
Response
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Full blood count",
"code": "FBC"
}
]
}