Saltar al contenido
Almendra
Esc
↑↓navegar↵abrir⌘Jvista previa

Get a patient's clinical history

The patient’s clinical history as filled in the dashboard or by the patient’s forms: allergies, food preferences, medical background, habits, objectives, diet record and the account’s custom fields. Answers tracked over time come with their history.

Requires the clinical:read permission.

GET/patients/{patient_id}/clinical-history
Autorización
AuthorizationToken Bearer (API Key) · headerobligatorio

Almendra API key, bound to one professional account. Send it as Authorization: Bearer YOUR_API_KEY.

Ámbitos:clinical:read
Parámetros de ruta
patient_idstringobligatorio

Patient ID

coincide con ^[0-9a-fA-F]{24}$
Respuestas
200

Clinical history

patientstringobligatorio

Patient ID

allergiesstring[]obligatorio
drugAllergiesstring[]obligatorio
favoriteFoodsstring[]obligatorio
dislikedFoodsstring[]obligatorio
alcoholTypesstring[]obligatorio
personalDiseaseBackgroundstring[]obligatorio
personalDiseaseBackgroundCommentsstring
familyDiseaseBackgroundstring[]obligatorio
familyDiseaseBackgroundCommentsstring
intestinalConditionCommentsstring
commentsstring

Free-text notes about the patient

objectivesobject[]obligatorio

Measurable goals (e.g. reach 68 kg)

Mostrar propiedades
Array de object
measurementstringobligatorio
targetnumberobligatorio
startDatestring<date-time>
dueDatestring<date-time>
answersobjectobligatorio

Clinical history answers that are tracked over time, keyed by question (generalObjective, currentDiseases, actualMedicineConsumption, sleepQuality, stressLevel, actualDietType, supplements, …): the latest value and the earlier ones.

dietRecordobject

What the patient usually eats (24 h recall)

Mostrar propiedades
summarystring
caloriesnumber
mealsobject[]obligatorio
Mostrar propiedades
Array de object
namestring
descriptionstring
timestring
birthobject

Birth data (baby patients)

Mostrar propiedades
weightnumber

As entered, in the account's weight unit (kg or lb, Settings > Units)

heightCmnumber
pregnancyWeeksnumber
commentsstring
physicalActivityobject

Activity assessment used for the physical activity level

Mostrar propiedades
palnumber

Physical activity level computed from the activities

activitiesobject[]obligatorio
Mostrar propiedades
Array de object
namestringobligatorio
daysstring[]obligatorio

Days as stored ('Lunes'…'Domingo', 'Todos los días')

minutesnumberobligatorio
foodFrequencyobject[]obligatorio
Mostrar propiedades
Array de object
categorystringobligatorio
frequencystringobligatorio
periodstringobligatorio
customFieldsobject[]obligatorio

The account's own clinical history fields

Mostrar propiedades
Array de object
namestringobligatorio
valueany | null
400

Invalid path parameter, query parameter or request body

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

401

Missing or invalid API key

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

403

The account behind the API key has no active paid plan, or the key lacks the permission this operation needs

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

404

Patient not found

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

429

Rate limit exceeded (600 requests per 60 seconds); retry after Retry-After seconds

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

500

Unexpected server error

successbooleanobligatorio
Valores permitidos:false
messagestringobligatorio

Same as error.message.

errorobjectobligatorio
Mostrar propiedades
statusintegerobligatorio

HTTP status code of the response.

codestringobligatorio

Machine-readable error code, stable across versions; branch on this rather than on message.

Valores permitidos:bad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictpayload_too_largeunsupported_media_typeunprocessable_entityrate_limitedinternal_errornot_implementedbad_gatewayservice_unavailablegateway_timeout
messagestringobligatorio

Human-readable explanation of what went wrong.

Pruébalo
Servidor
Autorización
Parámetros
Solicitud
curl -X GET 'https://api.almendra.io/openapi/v1/patients/507f1f77bcf86cd799439011/clinical-history' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Respuesta
{
  "patient": "string",
  "allergies": [
    "string"
  ],
  "drugAllergies": [
    "string"
  ],
  "favoriteFoods": [
    "string"
  ],
  "dislikedFoods": [
    "string"
  ],
  "alcoholTypes": [
    "string"
  ],
  "personalDiseaseBackground": [
    "string"
  ],
  "personalDiseaseBackgroundComments": "string",
  "familyDiseaseBackground": [
    "string"
  ],
  "familyDiseaseBackgroundComments": "string",
  "intestinalConditionComments": "string",
  "comments": "string",
  "objectives": [
    {
      "measurement": "weight",
      "target": 68,
      "startDate": "2019-08-24T14:15:22Z",
      "dueDate": "2019-08-24T14:15:22Z"
    }
  ],
  "answers": {
    "generalObjective": {
      "value": "Bajar de peso",
      "recordedAt": "2026-09-01T15:00:00.000Z",
      "history": []
    }
  },
  "dietRecord": {
    "summary": "string",
    "calories": 0,
    "meals": [
      {
        "name": "string",
        "description": "string",
        "time": "string"
      }
    ]
  },
  "birth": {
    "weight": 0,
    "heightCm": 0,
    "pregnancyWeeks": 0,
    "comments": "string"
  },
  "physicalActivity": {
    "pal": 0,
    "activities": [
      {
        "name": "string",
        "days": [
          "string"
        ],
        "minutes": 0
      }
    ]
  },
  "foodFrequency": [
    {
      "category": "string",
      "frequency": "string",
      "period": "string"
    }
  ],
  "customFields": [
    {
      "name": "string",
      "value": null
    }
  ]
}

¿No encuentras lo que buscas?

Nuestro equipo responde en menos de 1 día hábil, de lunes a viernes de 9:30 a 18:00 (GMT-5).

Escríbenos

¿Te ha resultado útil esta página?