Explorar documentación

Explicación de Beneficios

Guardar y consultar explicaciones detalladas de beneficios

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 ExplanationOfBenefit?

ExplanationOfBenefit (EOB) es el estado por paciente de cómo se adjudicó un claim. Combina detalles del claim, adjudicación, cobertura y pago en un único registro que pueden usar los consumidores downstream (portal del paciente, sistemas del pagador, contabilidad).

Convención de la API: el paciente es un id plano (patientId) y el claim de origen es un id plano (claimId); las respuestas los devuelven como referencias patient y claim. insurer, provider, claimResponse, careTeam[].provider e insurance[].coverage usan la forma FHIR estándar. Todos los ids son UUIDs.

Crear un EOB

Campos obligatorios: type, use, patientId, insurer, provider y outcome. status por defecto es active. created lo setea el server (si mandás created en el body, se ignora).

REST
curl -X POST https://api.esus.health/fhir/ExplanationOfBenefit \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/fhir+json" \
  -d '{
    "status": "active",
    "type": {
      "coding": [{
        "system": "http://terminology.hl7.org/CodeSystem/claim-type",
        "code": "institutional"
      }]
    },
    "use": "claim",
    "patientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "insurer": {
      "reference": "Organization/9a8b7c6d-5e4f-3210-9876-543210fedcba"
    },
    "provider": {
      "reference": "Practitioner/a7b1c2d3-e4f5-6789-abcd-ef0123456789"
    },
    "claimId": "aa11bb22-cc33-dd44-ee55-ff6677889900",
    "outcome": "complete",
    "insurance": [{
      "focal": true,
      "coverage": { "reference": "Coverage/c1a2e3d4-5b6f-7890-abcd-ef1234567890" }
    }],
    "diagnosis": [{
      "sequence": 1,
      "diagnosisCodeableConcept": {
        "coding": [{ "system": "http://hl7.org/fhir/sid/icd-10", "code": "J06.9" }]
      }
    }],
    "item": [{
      "sequence": 1,
      "productOrService": {
        "coding": [{ "system": "http://www.ama-assn.org/go/cpt", "code": "99213" }]
      },
      "adjudication": [
        { "category": { "coding": [{ "code": "submitted" }] }, "amount": { "value": 150.00, "currency": "USD" } },
        { "category": { "coding": [{ "code": "benefit" }] },   "amount": { "value": 96.00,  "currency": "USD" } }
      ]
    }],
    "total": [
      { "category": { "coding": [{ "code": "submitted" }] }, "amount": { "value": 150.00, "currency": "USD" } },
      { "category": { "coding": [{ "code": "benefit" }] },   "amount": { "value": 96.00,  "currency": "USD" } }
    ],
    "payment": {
      "date": "2026-04-25",
      "amount": { "value": 96.00, "currency": "USD" }
    }
  }'
SDK
const created = await esus.fhir.create("ExplanationOfBenefit", {
  "status": "active",
  "type": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/claim-type",
        "code": "institutional"
      }
    ]
  },
  "use": "claim",
  "patientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "insurer": {
    "reference": "Organization/9a8b7c6d-5e4f-3210-9876-543210fedcba"
  },
  "provider": {
    "reference": "Practitioner/a7b1c2d3-e4f5-6789-abcd-ef0123456789"
  },
  "claimId": "aa11bb22-cc33-dd44-ee55-ff6677889900",
  "outcome": "complete",
  "insurance": [
    {
      "focal": true,
      "coverage": {
        "reference": "Coverage/c1a2e3d4-5b6f-7890-abcd-ef1234567890"
      }
    }
  ],
  "diagnosis": [
    {
      "sequence": 1,
      "diagnosisCodeableConcept": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/sid/icd-10",
            "code": "J06.9"
          }
        ]
      }
    }
  ],
  "item": [
    {
      "sequence": 1,
      "productOrService": {
        "coding": [
          {
            "system": "http://www.ama-assn.org/go/cpt",
            "code": "99213"
          }
        ]
      },
      "adjudication": [
        {
          "category": {
            "coding": [
              {
                "code": "submitted"
              }
            ]
          },
          "amount": {
            "value": 150.0,
            "currency": "USD"
          }
        },
        {
          "category": {
            "coding": [
              {
                "code": "benefit"
              }
            ]
          },
          "amount": {
            "value": 96.0,
            "currency": "USD"
          }
        }
      ]
    }
  ],
  "total": [
    {
      "category": {
        "coding": [
          {
            "code": "submitted"
          }
        ]
      },
      "amount": {
        "value": 150.0,
        "currency": "USD"
      }
    },
    {
      "category": {
        "coding": [
          {
            "code": "benefit"
          }
        ]
      },
      "amount": {
        "value": 96.0,
        "currency": "USD"
      }
    }
  ],
  "payment": {
    "date": "2026-04-25",
    "amount": {
      "value": 96.0,
      "currency": "USD"
    }
  }
});

Outcome vs Status

CampoValoresSignificado
statusdraft, active, cancelled, entered-in-errorCiclo de vida del registro
outcomequeued, complete, partial, errorResultado de la adjudicación reflejado en este EOB
useclaim, preauthorization, predeterminationQué explica este EOB

Totales Típicos

CategoríaSignificado
submittedTotal facturado
eligibleTotal permitido por el pagador
benefitTotal pagado por el pagador
deductible, copayPartes de la responsabilidad del paciente

Consultar los EOBs de un Paciente

La búsqueda de ExplanationOfBenefit soporta solo patient y status (exactos). Para acotar por fecha, filtrá por created del lado del cliente.

# Todos los EOBs de un paciente
curl "https://api.esus.health/fhir/ExplanationOfBenefit?patient=3fa85f64-5717-4562-b3fc-2c963f66afa6" \
  -H "Authorization: Bearer YOUR_TOKEN"

# Los EOBs activos de un paciente
curl "https://api.esus.health/fhir/ExplanationOfBenefit?patient=3fa85f64-5717-4562-b3fc-2c963f66afa6&status=active" \
  -H "Authorization: Bearer YOUR_TOKEN"

Versión Legible para el Paciente

Esus no tiene una operación para renderizar un EOB para pacientes. Renderizá el recurso estructurado (por ejemplo a PDF) en tu aplicación, subilo con POST /files/upload y registralo como un DocumentReference del paciente.