Skip to main content

DiagnosticReport

DiagnosticReport is used for reports such as lab results, imaging studies, and pathology reports. It contains the final report and references to supporting observations.

API convention: patient and encounter references are flat (subjectId, encounterId). Performer and result references use the standard FHIR reference shape. All ids are UUIDs.

Create a DiagnosticReport

curl -X POST https://api.esus.health/fhir/DiagnosticReport \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/fhir+json" \
  -d '{
    "status": "final",
    "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "encounterId": "c1a2e3d4-5b6f-7890-abcd-ef1234567890",
    "category": [{
      "coding": [{
        "system": "http://terminology.hl7.org/CodeSystem/v2-0074",
        "code": "LAB",
        "display": "Laboratory"
      }]
    }],
    "code": {
      "coding": [{
        "system": "http://loinc.org",
        "code": "58410-2",
        "display": "Complete blood count panel"
      }]
    },
    "effectiveDateTime": "2026-04-21T09:30:00Z",
    "issued": "2026-04-21T14:30:00Z",
    "performer": [{
      "reference": "Organization/9a8b7c6d-5e4f-3210-9876-543210fedcba",
      "display": "Central Lab Services"
    }],
    "result": [
      { "reference": "Observation/aa11bb22-cc33-dd44-ee55-ff6677889900" },
      { "reference": "Observation/bb22cc33-dd44-ee55-ff66-778899001122" },
      { "reference": "Observation/cc33dd44-ee55-ff66-7788-990011223344" }
    ],
    "conclusion": "All values within normal limits",
    "conclusionCode": [{
      "coding": [{
        "system": "http://snomed.info/sct",
        "code": "17621005",
        "display": "Normal findings"
      }]
    }]
  }'

DiagnosticReport Status

StatusMeaning
registeredReport registered, results pending
partialPreliminary results
preliminaryEarly results, may change
finalComplete final results
amendedAdjusted after final
correctedCorrected after final
appendedAdditional info added after final
cancelledOrder cancelled
entered-in-errorErroneous
unknownStatus cannot be determined

Report Categories (typical)

CategoryDescription
LABLaboratory results
RADRadiology / imaging
PATHPathology
CARCardiology
NEURNeurology

Attach a Rendered Report

Upload the PDF via /files/upload, then update the report with a presentedForm:

curl -X PUT https://api.esus.health/fhir/DiagnosticReport/aa11bb22-cc33-dd44-ee55-ff6677889900 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/fhir+json" \
  -d '{
    "status": "final",
    "subjectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "code": { "coding": [{ "code": "58410-2" }] },
    "presentedForm": [{
      "contentType": "application/pdf",
      "url": "https://api.esus.health/files/{fileId}"
    }]
  }'

Search Reports

# All reports for a patient
curl "https://api.esus.health/fhir/DiagnosticReport?patient=3fa85f64-5717-4562-b3fc-2c963f66afa6" \
  -H "Authorization: Bearer YOUR_TOKEN"

# Lab results only
curl "https://api.esus.health/fhir/DiagnosticReport?patient=3fa85f64-5717-4562-b3fc-2c963f66afa6&category=LAB" \
  -H "Authorization: Bearer YOUR_TOKEN"

# By date (exact-day match — no prefixes)
curl "https://api.esus.health/fhir/DiagnosticReport?patient=3fa85f64-5717-4562-b3fc-2c963f66afa6&date=2026-04-21" \
  -H "Authorization: Bearer YOUR_TOKEN"

Note: the date parameter filters on effectiveDateTime with an exact-day match. FHIR prefixes (ge, le, gt, etc.) are not applied — they are ignored and the query resolves as day equality.