Skip to main content
The Observation resource represents clinical measurements and assertions. All observations must reference a valid Patient resource.

Endpoints

Create Observation

Requires admin or practitioner role.
POST /api/fhir/Observation
Authorization: Bearer {token}
Content-Type: application/json
resourceType
string
required
Must be "Observation"
status
string
required
Observation status: registered, preliminary, final, amended, corrected, cancelled, entered-in-error, unknown
code
object
required
What was observed (LOINC, SNOMED CT, or local codes)
subject
object
required
Reference to Patient in format {"reference": "Patient/{id}"}
effectiveDateTime
string
Clinically relevant time/date for the observation
valueQuantity
object
Actual result value with unit
valueString
string
Result as a string (alternative to valueQuantity)
interpretation
array
High, low, normal, etc.
note
array
Comments about the observation

Example Request

cURL
curl -X POST https://api.example.com/api/fhir/Observation \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "resourceType": "Observation",
    "status": "final",
    "code": {
      "coding": [{
        "system": "http://loinc.org",
        "code": "8867-4",
        "display": "Heart rate"
      }]
    },
    "subject": {
      "reference": "Patient/65f1234567890abcdef12345"
    },
    "effectiveDateTime": "2024-03-15T10:30:00Z",
    "valueQuantity": {
      "value": 72,
      "unit": "beats/minute",
      "system": "http://unitsofmeasure.org",
      "code": "/min"
    },
    "interpretation": [{
      "coding": [{
        "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
        "code": "N",
        "display": "Normal"
      }]
    }]
  }'

Response

{
  "resourceType": "Observation",
  "id": "65f2345678901abcdef23456",
  "status": "final",
  "code": {
    "coding": [{
      "system": "http://loinc.org",
      "code": "8867-4",
      "display": "Heart rate"
    }]
  },
  "subject": {
    "reference": "Patient/65f1234567890abcdef12345"
  },
  "effectiveDateTime": "2024-03-15T10:30:00Z",
  "valueQuantity": {
    "value": 72,
    "unit": "beats/minute",
    "system": "http://unitsofmeasure.org",
    "code": "/min"
  }
}

List Observations

GET /api/fhir/Observation
Authorization: Bearer {token}
subject
string
Filter by patient: Patient/{id}
_count
number
Results per page (default: 20)
_offset
number
Pagination offset (default: 0)

Example Request

curl -X GET "https://api.example.com/api/fhir/Observation?subject=Patient/65f1234567890abcdef12345" \
  -H "Authorization: Bearer YOUR_TOKEN"

Get Observation by ID

GET /api/fhir/Observation/:id
Authorization: Bearer {token}

Update Observation

Requires admin or practitioner role.
PUT /api/fhir/Observation/:id
Authorization: Bearer {token}
Content-Type: application/json

Common Vital Signs

Blood Pressure

LOINC: 85354-9 (systolic), 85354-9 (diastolic)

Heart Rate

LOINC: 8867-4

Temperature

LOINC: 8310-5

Oxygen Saturation

LOINC: 2708-6

Role Permissions

RoleCreateReadUpdate
Admin
Practitioner
Auditor

Build docs developers (and LLMs) love