Updates an existing exam record. Only healthcare professionals (superusers) can update exams.
Authentication
This endpoint requires authentication with a valid JWT token. The user must be a healthcare professional (superuser).
Path Parameters
The unique identifier of the exam to update.
Request Body
The ID of the patient for whom the exam is being updated.
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. 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 updated 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 PUT https://api.vidaplus.com/exames/1 \
-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": "ConcluÃdo",
"resultado": "ECG normal, sem alterações significativas",
"observacao": "Exame realizado com sucesso"
}'
{
"id": 1,
"paciente_id": 1,
"data": "2025-04-28",
"tipo": "Eletrocardiograma",
"status": "ConcluÃdo",
"resultado": "ECG normal, sem alterações significativas",
"observacao": "Exame realizado com sucesso"
}
Error Responses
- 200 OK - Exam successfully updated
- 403 Forbidden - User is not a healthcare professional
- 404 Not Found - Exam, patient, or medical record not found
- All fields in the request body are required, even if they are not being changed
- Only healthcare professionals (superusers) can update exams
- Both the patient and medical record must exist in the system