Explore documentation

Condition

Learn about the Condition resource for diagnoses and health problems.

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.

The Condition resource represents a health problem, diagnosis, or clinical finding: diseases, injuries, and other situations affecting a patient.

API convention: the patient and encounter references are sent as flat string fields (subjectId, encounterId). All ids are raw UUIDs (v4).

Creating a Condition

REST
curl -X POST https://api.esus.health/fhir/Condition \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/fhir+json" \
  -d '{
    "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "encounterId": "c1a2e3d4-5b6f-7890-abcd-ef1234567890",
    "clinicalStatus": {
      "coding": [{
        "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
        "code": "active",
        "display": "Active"
      }]
    },
    "verificationStatus": {
      "coding": [{
        "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
        "code": "confirmed",
        "display": "Confirmed"
      }]
    },
    "code": {
      "coding": [{
        "system": "http://snomed.info/sct",
        "code": "38341003",
        "display": "Hypertension"
      }],
      "text": "Essential hypertension"
    },
    "onsetDateTime": "2026-03-10"
  }'
SDK
const created = await esus.fhir.create("Condition", {
  "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "encounterId": "c1a2e3d4-5b6f-7890-abcd-ef1234567890",
  "clinicalStatus": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
        "code": "active",
        "display": "Active"
      }
    ]
  },
  "verificationStatus": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
        "code": "confirmed",
        "display": "Confirmed"
      }
    ]
  },
  "code": {
    "coding": [
      {
        "system": "http://snomed.info/sct",
        "code": "38341003",
        "display": "Hypertension"
      }
    ],
    "text": "Essential hypertension"
  },
  "onsetDateTime": "2026-03-10"
});

Required: subjectId and code. encounterId is optional and links the diagnosis to the visit where it was recorded. The patient and encounter must exist in your organization; otherwise the API answers 400. Other optional fields: category, severity, bodySite, onsetString, recordedDate, recorder, asserter, stage, note, and identifier. PUT and PATCH can also change identifier and stage.

Clinical Status

CodeDescription
activeCurrently present and requires attention
recurrenceCame back after having resolved
relapseCame back after a remission
inactiveNot currently active
remissionIn remission
resolvedNo longer present

Verification Status

CodeDescription
unconfirmedNot enough evidence to confirm it
provisionalTentative diagnosis
differentialOne of several possible diagnoses being considered
confirmedConfirmed with sufficient evidence
refutedRuled out by the evidence
entered-in-errorRecorded in error

The API stores clinicalStatus and verificationStatus as you send them; it does not validate the codes.

Searching Conditions

ParameterBehavior
_idExact id
patient / subjectPatient id (<uuid> or Patient/<uuid>)
encounterEncounter id
codeExact system|code, or partial text in code
clinical-status, verification-status, category, severityPartial text inside the CodeableConcept (e.g. clinical-status=active)
onset-date, recorded-dateDate, with optional prefix eq, gt, lt, ge, or le; repeat a parameter for a range (onset-date=ge2026-01-01&onset-date=lt2026-02-01)

Page with _count and _offset, and sort with _sort by _lastUpdated, onset-date, recorded-date, or clinical-status.

REST
curl "https://api.esus.health/fhir/Condition?patient=3fa85f64-5717-4562-b3fc-2c963f66afa6&code=http://snomed.info/sct|38341003" \
  -H "Authorization: Bearer YOUR_TOKEN"
SDK
const { resources, total } = await esus.fhir.search("Condition", {
  "patient": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "code": "http://snomed.info/sct|38341003"
});

Because status search is partial, clinical-status=active also returns inactive conditions. Filter client-side if you need to tell them apart.

Read, update (PUT/PATCH), delete, and _history work the same as for Patient: see CRUD Operations.