Explore documentation

Claim Responses

Understanding payer responses to claims

Set up the SDK server client to run the examples using esus. The REST examples use a session token. To run them with the SDK’s API key, send X-API-Key instead of Authorization.

ClaimResponse

When a payer processes a claim, it returns adjudication details — what was paid, denied, or adjusted. You store that result in Esus as a ClaimResponse.

API convention: the patient is a flat id (patientId) and the originating claim is a flat id (claimId); responses return them as patient and request references. insurer and requestor use the standard FHIR reference shape. All ids are UUIDs.

Create a ClaimResponse

Required fields: type, patientId, created, insurer, and outcome. status defaults to active and use defaults to claim. If you send claimId, it must be an existing Claim.

REST
curl -X POST https://api.esus.health/fhir/ClaimResponse \
  -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",
    "created": "2026-04-22T10:00:00Z",
    "insurer": {
      "reference": "Organization/9a8b7c6d-5e4f-3210-9876-543210fedcba"
    },
    "claimId": "aa11bb22-cc33-dd44-ee55-ff6677889900",
    "outcome": "complete",
    "total": [{
      "category": {
        "coding": [{
          "system": "http://terminology.hl7.org/CodeSystem/adjudication",
          "code": "benefit",
          "display": "Benefit Amount"
        }]
      },
      "amount": { "value": 96.00, "currency": "USD" }
    }],
    "item": [{
      "itemSequence": 1,
      "adjudication": [
        { "category": { "coding": [{ "code": "submitted" }] }, "amount": { "value": 150.00, "currency": "USD" } },
        { "category": { "coding": [{ "code": "eligible" }] },  "amount": { "value": 120.00, "currency": "USD" } },
        { "category": { "coding": [{ "code": "benefit" }] },   "amount": { "value": 96.00,  "currency": "USD" } },
        { "category": { "coding": [{ "code": "copay" }] },     "amount": { "value": 24.00,  "currency": "USD" } }
      ]
    }]
  }'
SDK
const created = await esus.fhir.create("ClaimResponse", {
  "status": "active",
  "type": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/claim-type",
        "code": "institutional"
      }
    ]
  },
  "use": "claim",
  "patientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "created": "2026-04-22T10:00:00Z",
  "insurer": {
    "reference": "Organization/9a8b7c6d-5e4f-3210-9876-543210fedcba"
  },
  "claimId": "aa11bb22-cc33-dd44-ee55-ff6677889900",
  "outcome": "complete",
  "total": [
    {
      "category": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/adjudication",
            "code": "benefit",
            "display": "Benefit Amount"
          }
        ]
      },
      "amount": {
        "value": 96.0,
        "currency": "USD"
      }
    }
  ],
  "item": [
    {
      "itemSequence": 1,
      "adjudication": [
        {
          "category": {
            "coding": [
              {
                "code": "submitted"
              }
            ]
          },
          "amount": {
            "value": 150.0,
            "currency": "USD"
          }
        },
        {
          "category": {
            "coding": [
              {
                "code": "eligible"
              }
            ]
          },
          "amount": {
            "value": 120.0,
            "currency": "USD"
          }
        },
        {
          "category": {
            "coding": [
              {
                "code": "benefit"
              }
            ]
          },
          "amount": {
            "value": 96.0,
            "currency": "USD"
          }
        },
        {
          "category": {
            "coding": [
              {
                "code": "copay"
              }
            ]
          },
          "amount": {
            "value": 24.0,
            "currency": "USD"
          }
        }
      ]
    }
  ]
});

item, adjudication, total, payment, processNote, and error are stored as you send them, so use the standard FHIR shapes.

Outcome vs Status

FieldValuesMeaning
statusdraft, active, cancelled, entered-in-errorLifecycle of the response record
outcomequeued, complete, partial, errorAdjudication result returned by the payer
useclaim, preauthorization, predeterminationWhat kind of response this is

Common Adjudication Categories

CategoryMeaning
submittedAmount submitted on the claim
eligibleMaximum amount allowed by the payer
benefitAmount paid by the payer
deductibleAmount applied to deductible
copayPatient copay amount

Search and Handle Denials

ClaimResponse search supports patient, status, use (exact), and request (the Claim id, as <uuid> or Claim/<uuid>).

REST
# Responses for a given claim
curl "https://api.esus.health/fhir/ClaimResponse?request=aa11bb22-cc33-dd44-ee55-ff6677889900" \
  -H "Authorization: Bearer YOUR_TOKEN"
SDK
const { resources, total } = await esus.fhir.search("ClaimResponse", {
  "request": "aa11bb22-cc33-dd44-ee55-ff6677889900"
});

There is no outcome search parameter: to isolate denials, filter the returned responses on outcome: "error" client-side.

Denial reasons live in error[] with the payer’s codes; the human-readable explanation lives in disposition or processNote[]. To resubmit, create a new Claim (the Esus Claim has no related field, so keep the link to the original claim in identifier or in your own system).