Explore documentation

Claim Submission

Creating and submitting insurance 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.

What is a Claim?

The Claim resource is a request for payment for healthcare services provided to a patient. It includes the services billed, diagnoses, and the insurance to bill against.

API convention: the patient is a flat id (patientId) and the billing provider is a flat Organization id (providerId); responses return them as patient and provider references. insurer, enterer, facility, careTeam[].provider, and insurance[].coverage use the standard FHIR reference shape. All ids are UUIDs.

Create a Claim

Required fields: type, use, and patientId. status defaults to active. created is set by the server to the creation time (a created value in the body is ignored).

REST
curl -X POST https://api.esus.health/fhir/Claim \
  -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",
        "display": "Institutional"
      }]
    },
    "use": "claim",
    "patientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "providerId": "9a8b7c6d-5e4f-3210-9876-543210fedcba",
    "billablePeriod": {
      "start": "2026-04-21T09:00:00Z",
      "end": "2026-04-21T10:00:00Z"
    },
    "careTeam": [{
      "sequence": 1,
      "provider": {
        "reference": "Practitioner/a7b1c2d3-e4f5-6789-abcd-ef0123456789"
      }
    }],
    "diagnosis": [{
      "sequence": 1,
      "diagnosisCodeableConcept": {
        "coding": [{
          "system": "http://hl7.org/fhir/sid/icd-10",
          "code": "J06.9",
          "display": "Acute upper respiratory infection"
        }]
      }
    }],
    "insurance": [{
      "sequence": 1,
      "focal": true,
      "coverage": {
        "reference": "Coverage/c1a2e3d4-5b6f-7890-abcd-ef1234567890"
      }
    }],
    "item": [{
      "sequence": 1,
      "productOrService": {
        "coding": [{
          "system": "http://www.ama-assn.org/go/cpt",
          "code": "99213",
          "display": "Office visit, established patient"
        }]
      },
      "quantity": { "value": 1 },
      "unitPrice": { "value": 150.00, "currency": "USD" }
    }],
    "total": { "value": 150.00, "currency": "USD" }
  }'
SDK
const created = await esus.fhir.create("Claim", {
  "status": "active",
  "type": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/claim-type",
        "code": "institutional",
        "display": "Institutional"
      }
    ]
  },
  "use": "claim",
  "patientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "providerId": "9a8b7c6d-5e4f-3210-9876-543210fedcba",
  "billablePeriod": {
    "start": "2026-04-21T09:00:00Z",
    "end": "2026-04-21T10:00:00Z"
  },
  "careTeam": [
    {
      "sequence": 1,
      "provider": {
        "reference": "Practitioner/a7b1c2d3-e4f5-6789-abcd-ef0123456789"
      }
    }
  ],
  "diagnosis": [
    {
      "sequence": 1,
      "diagnosisCodeableConcept": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/sid/icd-10",
            "code": "J06.9",
            "display": "Acute upper respiratory infection"
          }
        ]
      }
    }
  ],
  "insurance": [
    {
      "sequence": 1,
      "focal": true,
      "coverage": {
        "reference": "Coverage/c1a2e3d4-5b6f-7890-abcd-ef1234567890"
      }
    }
  ],
  "item": [
    {
      "sequence": 1,
      "productOrService": {
        "coding": [
          {
            "system": "http://www.ama-assn.org/go/cpt",
            "code": "99213",
            "display": "Office visit, established patient"
          }
        ]
      },
      "quantity": {
        "value": 1
      },
      "unitPrice": {
        "value": 150.0,
        "currency": "USD"
      }
    }
  ],
  "total": {
    "value": 150.0,
    "currency": "USD"
  }
});

Claim Types

type is a free CodeableConcept. The standard codes from http://terminology.hl7.org/CodeSystem/claim-type are:

TypeDescription
institutionalHospital or facility claims
professionalProvider professional claims
oralDental or oral health claims
visionVision care claims
pharmacyPharmacy claims

Claim Statuses

StatusMeaning
draftPrepared but not yet active
activeClaim is active (default)
cancelledClaim was cancelled
entered-in-errorRecorded in error

status is the record’s lifecycle. The adjudication result (complete, partial, error) lives in the associated ClaimResponse outcome — see the next page.

Use

UseMeaning
claimStandard claim for reimbursement
preauthorizationPre-authorization request for services
predeterminationPredetermination of benefits

Search Claims

ParameterMatching
patientExact patient id (also accepts Patient/<uuid>)
status, useExact
createdWithout a prefix, the same calendar day (created=2026-04-21). Supports gt, ge, lt, le and ne (created=ge2026-04-01). Repeat it for a range (created=ge2026-04-01&created=lt2026-05-01)
providerExact Organization id (providerId; also accepts Organization/<uuid>)
insurerPartial text match on the insurer reference
REST
curl "https://api.esus.health/fhir/Claim?patient=3fa85f64-5717-4562-b3fc-2c963f66afa6&status=active" \
  -H "Authorization: Bearer YOUR_TOKEN"
SDK
const { resources, total } = await esus.fhir.search("Claim", {
  "patient": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "active"
});

Supporting Documentation

Upload files with POST /files/upload and register them as a DocumentReference for the patient. Esus does not store a structural link between a DocumentReference and a Claim, so keep that cross-reference in your own system.