Explorar documentación

MedicationStatement y Adherencia del Paciente

Registrar qué medicamentos está tomando un paciente

Configurá el cliente de servidor del SDK para usar los ejemplos con esus. Los ejemplos REST usan un token de sesión. Si los ejecutás con la misma clave API que el SDK, enviá X-API-Key en lugar de Authorization.

¿Qué es MedicationStatement?

Mientras MedicationRequest representa una orden, MedicationStatement registra lo que el paciente realmente toma o tomó. Es importante para:

  • Uso de medicación reportado por el paciente
  • Conciliación al ingreso o al alta
  • Seguimiento de adherencia

Crear un MedicationStatement

REST
curl -X POST https://api.esus.health/fhir/MedicationStatement \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/fhir+json" \
  -d '{
    "status": "active",
    "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "effectiveDateTime": "2026-01-01",
    "dateAsserted": "2026-04-21",
    "informationSource": {
      "reference": "Patient/3fa85f64-5717-4562-b3fc-2c963f66afa6"
    },
    "medicationCodeableConcept": {
      "coding": [{
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "197361",
        "display": "Amoxicillin 500mg"
      }]
    },
    "dosage": [{
      "text": "Tomar 1 cápsula 3 veces al día",
      "timing": {
        "repeat": { "frequency": 3, "period": 1, "periodUnit": "d" }
      }
    }]
  }'
SDK
const created = await esus.fhir.create("MedicationStatement", {
  "status": "active",
  "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "effectiveDateTime": "2026-01-01",
  "dateAsserted": "2026-04-21",
  "informationSource": {
    "reference": "Patient/3fa85f64-5717-4562-b3fc-2c963f66afa6"
  },
  "medicationCodeableConcept": {
    "coding": [
      {
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "197361",
        "display": "Amoxicillin 500mg"
      }
    ]
  },
  "dosage": [
    {
      "text": "Tomar 1 cápsula 3 veces al día",
      "timing": {
        "repeat": {
          "frequency": 3,
          "period": 1,
          "periodUnit": "d"
        }
      }
    }
  ]
});
  • subjectId (el UUID del paciente) es el único campo obligatorio; status por defecto es active.
  • informationSource es una referencia FHIR normal porque puede apuntar a distintos tipos de recurso (Patient, Practitioner, RelatedPerson, etc.).
  • También se aceptan: medicationReference, reasonCode[], note[] y, solo al crear, identifier[], basedOn[] / partOf[] (una actualización los ignora).

La API responde 201 Created con el recurso; subjectId vuelve como subject: { "reference": "Patient/<uuid>" }.

Valores de Status

StatusSignificado
activeEl paciente toma este medicamento actualmente (por defecto)
completedEl tratamiento terminó
intendedPlanificado pero no iniciado
stoppedEl paciente dejó de tomarlo
on-holdSuspendido temporalmente
not-takenEl paciente no lo está tomando
entered-in-errorEl registro es incorrecto
unknownEstado desconocido

Conciliación de Medicación

Al ingreso, traé todas las medicaciones activas del paciente:

REST
curl "https://api.esus.health/fhir/MedicationStatement?patient=3fa85f64-5717-4562-b3fc-2c963f66afa6&status=active" \
  -H "Authorization: Bearer YOUR_TOKEN"
SDK
const { resources, total } = await esus.fhir.search("MedicationStatement", {
  "patient": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "active"
});

La búsqueda de MedicationStatement solo soporta patient (id exacto) y status (código exacto); los demás parámetros se ignoran. Si necesitás filtrar por medicamento, hacelo del lado del cliente sobre el Bundle devuelto.