Creates a new exam record in the system. Only healthcare professionals (superusers) can create exams.
Authentication
This endpoint requires authentication with a valid JWT token. The user must be a healthcare professional (superuser).
Request Body
The ID of the patient for whom the exam is being created.
The ID of the medical record associated with this exam.
The date of the exam in ISO format (YYYY-MM-DD).Example: 2025-04-28
The type of exam to be performed. Must be one of:
Hemograma
Raio-X
Ultrassom
Tomografia
Ressonância
Eletrocardiograma
Glicemia
Colesterol
The current status of the exam. Must be one of:
Aguardando - Waiting to be performed
Realizado - Performed
Concluído - Completed
Cancelado - Cancelled
The result of the exam. Can be null if the exam hasn’t been completed yet.
Additional observations or notes about the exam.
Response
The unique identifier of the created exam.
The date of the exam in ISO format.
The current status of the exam.
The result of the exam (may be null).
Additional observations about the exam (may be null).
curl -X POST https://api.vidaplus.com/exames/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"paciente_id": 1,
"prontuario_id": 1,
"data": "2025-04-28",
"tipo": "Eletrocardiograma",
"status": "Aguardando",
"resultado": null,
"observacao": "Exame de rotina"
}'
{
"id": 1,
"paciente_id": 1,
"data": "2025-04-28",
"tipo": "Eletrocardiograma",
"status": "Aguardando",
"resultado": null,
"observacao": "Exame de rotina"
}
Error Responses
- 201 Created - Exam successfully created
- 403 Forbidden - User is not a healthcare professional
- 404 Not Found - Patient or medical record not found
- 409 Conflict - An exam already exists for this patient on the same date