GET Buscar Última Pré-consulta do Paciente
Retorna a pré-consulta mais recente (por createdAt) de um paciente, em qualquer status. Um paciente pode ter várias pré-consultas em aberto; esta rota devolve só a última.
Autenticação necessária
Envie o header Authorization: Bearer {accessToken} (token de usuário) ou x-api-key: {apiKey} (integrações). Veja Autenticação.
Permissão necessária
Exige a permissão read_preconsultations.
Endpoint
GET https://api-dev.imagemais.com.br/api/pre-consultations/patient/{patientId}/last
Path Parameter
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
patientId | number | ✅ | ID do paciente |
Requisição
curl -X 'GET' \
'https://api-dev.imagemais.com.br/api/pre-consultations/patient/53/last' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {accessToken}'
Respostas
200 Sucesso
{
"id": 29,
"accountId": 1,
"patientId": 53,
"bloodPressure": "120/80",
"heartRate": "72",
"temperature": "36.5",
"weight": "70",
"height": "175",
"consultationReason": "Dor de cabeça há 3 dias",
"glucose": "90",
"status": "OPEN",
"createdAt": "2026-09-29T22:53:41.313Z",
"updatedAt": "2026-09-29T22:53:41.453Z",
"deletedAt": null
}
200 Paciente sem pré-consulta
Quando o paciente não tem nenhuma pré-consulta (ou o patientId não existe na conta), a resposta é 200 com corpo vazio — não há 404.
400 ID inválido
Retornado quando patientId não é numérico.
{
"message": "Validation failed (numeric string is expected)",
"error": "Bad Request",
"statusCode": 400
}