Chuyển đến nội dung chính

Lesson 5: Encounter, Condition, Observation - Clinical Resources

Resource Encounter (visits, hospitalizations), Condition (diagnosis, health problems), Observation (vital signs, lab results, social history). How to link Resources together through References, Observation categories, Condition staging.

🏗️ Architecture — Lesson 5 Lesson 5: Encounter, Condition, Observation - Clinical Resources

HL7 FHIR - Basic to Advanced Healthcare Data Standard

Part 2: Core FHIR Resources

xdev.asia

1. Encounter Resource — Visits / Hospitalizations

Encounter describes an interaction between a patient and a healthcare provider — from outpatient visits, to hospitalizations, to emergency rooms, to telehealth.

Encounter structure

ElementCardinalityTypeDescription
status. status1..1codeplanned | in-progress | on-hold | discharged | completed | canceled | entered-in-error
class. class1..*CodeableConceptAMB (outpatient) | IMP (inpatient) | EMER (emergency) | VR (telehealth)
type0..*CodeableConceptSpecific type of examination
priority. priority0..1CodeableConceptPriority level
subject. subject1..1Reference(Patient)Patient
participant. participant0..*BackboneElementDoctors and nurses participate
period. period0..1PeriodStart time - end time
reason. reason0..*BackboneElementReason for examination
diagnosis. diagnosis0..*BackboneElementDiagnosis is tied to the visit
admission. admission0..1BackboneElementAdmission details (preAdmission, admissionSource, dischargeDisposition)
location. location0..*BackboneElementRoom/ward/bed
serviceProvider0..1Reference(Organization)Medical facility

For example: Outpatient Encounter

{
  "resourceType": "Encounter",
  "id": "encounter-outpatient-001",
  "status": "completed",
  "class": [
    {
      "coding": [
        {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
          "code": "AMB",
          "display": "ambulatory"
        }
      ]
    }
  ],
  "type": [
    {
      "coding": [
        {
          "system": "http://snomed.info/sct",
          "code": "185349003",
          "display": "Encounter for check up"
        }
      ],
      "text": "Khám sức khỏe tổng quát"
    }
  ],
  "subject": {
    "reference": "Patient/patient-001",
    "display": "Nguyễn Văn A"
  },
  "participant": [
    {
      "type": [
        {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
              "code": "ATND",
              "display": "attender"
            }
          ]
        }
      ],
      "actor": {
        "reference": "Practitioner/practitioner-001",
        "display": "BS. Trần Thị B"
      }
    }
  ],
  "period": {
    "start": "2025-01-15T08:00:00+07:00",
    "end": "2025-01-15T08:45:00+07:00"
  },
  "reason": [
    {
      "use": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/encounter-reason-use",
            "code": "CC",
            "display": "Chief Complaint"
          }
        ]
      },
      "value": [
        {
          "concept": {
            "text": "Đau đầu và mệt mỏi kéo dài 2 tuần"
          }
        }
      ]
    }
  ],
  "serviceProvider": {
    "reference": "Organization/org-bvdk-001",
    "display": "Bệnh viện Đa khoa Trung ương"
  }
}

For example: Encounter is hospitalized

{
  "resourceType": "Encounter",
  "id": "encounter-inpatient-001",
  "status": "in-progress",
  "class": [
    {
      "coding": [
        {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
          "code": "IMP",
          "display": "inpatient encounter"
        }
      ]
    }
  ],
  "subject": {
    "reference": "Patient/patient-002"
  },
  "period": {
    "start": "2025-01-10T14:30:00+07:00"
  },
  "admission": {
    "admitSource": {
      "coding": [
        {
          "system": "http://terminology.hl7.org/CodeSystem/admit-source",
          "code": "emd",
          "display": "From accident/emergency department"
        }
      ]
    },
    "preAdmissionIdentifier": {
      "system": "http://bvdk.vn/pre-admit",
      "value": "PA-20250110-001"
    }
  },
  "location": [
    {
      "location": {
        "reference": "Location/loc-cardiology-bed-12",
        "display": "Khoa Tim mạch - Giường 12"
      },
      "status": "active",
      "period": {
        "start": "2025-01-10T15:00:00+07:00"
      }
    }
  ],
  "diagnosis": [
    {
      "condition": [
        {
          "reference": {
            "reference": "Condition/cond-001"
          }
        }
      ],
      "use": [
        {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/diagnosis-role",
              "code": "AD",
              "display": "Admission diagnosis"
            }
          ]
        }
      ]
    }
  ]
}

2. Condition Resource — Diagnosis / Health Problem

Condition records the patient's diagnosis, health problem, or medical condition.

Condition structure

ElementCardinalityTypeDescription
clinicalStatus0..1CodeableConceptactive | recurrence | relapse | inactive | remission | resolved. resolved
verificationStatus0..1CodeableConceptunconfirmed | provisional | differential | confirmed | refuted | entered-in-error
category. category0..*CodeableConceptproblem-list-item | encounter-diagnosis
severity0..1CodeableConceptSeverity (SNOMED CT)
code1..1CodeableConceptDiagnosis codes (ICD-10, SNOMED CT)
bodySite0..*CodeableConceptBody position
subject. subject1..1Reference(Patient)Patient
encounter. encounter0..1Reference(Encounter)Related visits
onset[x]0..1dateTime | Age | Period | Range | string.stringOnset time
abatement[x]0..1dateTime | Age | Period | Range | string.stringTime of remission
stage. stage0..*BackboneElementDisease stage

For example: Diagnosis of Hypertension

{
  "resourceType": "Condition",
  "id": "cond-hypertension-001",
  "clinicalStatus": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
        "code": "active"
      }
    ]
  },
  "verificationStatus": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
        "code": "confirmed"
      }
    ]
  },
  "category": [
    {
      "coding": [
        {
          "system": "http://terminology.hl7.org/CodeSystem/condition-category",
          "code": "encounter-diagnosis",
          "display": "Encounter Diagnosis"
        }
      ]
    }
  ],
  "severity": {
    "coding": [
      {
        "system": "http://snomed.info/sct",
        "code": "24484000",
        "display": "Severe"
      }
    ]
  },
  "code": {
    "coding": [
      {
        "system": "http://hl7.org/fhir/sid/icd-10",
        "code": "I10",
        "display": "Essential (primary) hypertension"
      },
      {
        "system": "http://snomed.info/sct",
        "code": "38341003",
        "display": "Hypertensive disorder"
      }
    ],
    "text": "Tăng huyết áp nguyên phát"
  },
  "subject": {
    "reference": "Patient/patient-001",
    "display": "Nguyễn Văn A"
  },
  "encounter": {
    "reference": "Encounter/encounter-outpatient-001"
  },
  "onsetDateTime": "2024-06-15",
  "recordedDate": "2025-01-15"
}

Condition Staging (Cancer)

{
  "resourceType": "Condition",
  "id": "cond-cancer-001",
  "code": {
    "coding": [
      {
        "system": "http://hl7.org/fhir/sid/icd-10",
        "code": "C34.1",
        "display": "Malignant neoplasm of upper lobe, bronchus or lung"
      }
    ],
    "text": "Ung thư phổi thùy trên"
  },
  "subject": {
    "reference": "Patient/patient-003"
  },
  "stage": [
    {
      "summary": {
        "coding": [
          {
            "system": "http://snomed.info/sct",
            "code": "258219007",
            "display": "Stage 2"
          }
        ]
      },
      "type": {
        "coding": [
          {
            "system": "http://snomed.info/sct",
            "code": "260998006",
            "display": "Clinical staging (qualifier value)"
          }
        ]
      }
    }
  ]
}

3. Observation Resource — Observation results

Observation is the most versatile resource in FHIR — for vital signs, lab results, social history, surveys, imaging measurements, and clinical assessments.

Observation Categories

CategoryDescriptionFor example
vital-signsSigns of vitalityBlood pressure, heart rate, SpO2, temperature
laboratoryTest resultsHbA1c, glucose, CBC, lipid panel
imaging. imagingImage resultsTumor size
social-historySocial historySmoking, drinking alcohol
survey. surveySurvey tablePHQ-9 (depression), VAS (pain)
exam. examClinical examinationWeight, height

For example: Vital Signs — Blood pressure

{
  "resourceType": "Observation",
  "id": "obs-bp-001",
  "status": "final",
  "category": [
    {
      "coding": [
        {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "vital-signs",
          "display": "Vital Signs"
        }
      ]
    }
  ],
  "code": {
    "coding": [
      {
        "system": "http://loinc.org",
        "code": "85354-9",
        "display": "Blood pressure panel with all children optional"
      }
    ],
    "text": "Huyết áp"
  },
  "subject": {
    "reference": "Patient/patient-001"
  },
  "encounter": {
    "reference": "Encounter/encounter-outpatient-001"
  },
  "effectiveDateTime": "2025-01-15T08:15:00+07:00",
  "performer": [
    {
      "reference": "Practitioner/practitioner-002",
      "display": "ĐD. Lê Thị C"
    }
  ],
  "component": [
    {
      "code": {
        "coding": [
          {
            "system": "http://loinc.org",
            "code": "8480-6",
            "display": "Systolic blood pressure"
          }
        ]
      },
      "valueQuantity": {
        "value": 145,
        "unit": "mmHg",
        "system": "http://unitsofmeasure.org",
        "code": "mm[Hg]"
      },
      "interpretation": [
        {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
              "code": "H",
              "display": "High"
            }
          ]
        }
      ]
    },
    {
      "code": {
        "coding": [
          {
            "system": "http://loinc.org",
            "code": "8462-4",
            "display": "Diastolic blood pressure"
          }
        ]
      },
      "valueQuantity": {
        "value": 92,
        "unit": "mmHg",
        "system": "http://unitsofmeasure.org",
        "code": "mm[Hg]"
      },
      "interpretation": [
        {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
              "code": "H",
              "display": "High"
            }
          ]
        }
      ]
    }
  ]
}

For example: Lab Result — HbA1c

{
  "resourceType": "Observation",
  "id": "obs-hba1c-001",
  "status": "final",
  "category": [
    {
      "coding": [
        {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "laboratory"
        }
      ]
    }
  ],
  "code": {
    "coding": [
      {
        "system": "http://loinc.org",
        "code": "4548-4",
        "display": "Hemoglobin A1c/Hemoglobin.total in Blood"
      }
    ],
    "text": "HbA1c"
  },
  "subject": {
    "reference": "Patient/patient-001"
  },
  "effectiveDateTime": "2025-01-15",
  "valueQuantity": {
    "value": 7.2,
    "unit": "%",
    "system": "http://unitsofmeasure.org",
    "code": "%"
  },
  "referenceRange": [
    {
      "low": {
        "value": 4.0,
        "unit": "%"
      },
      "high": {
        "value": 5.6,
        "unit": "%"
      },
      "text": "Bình thường: 4.0 - 5.6%"
    }
  ],
  "interpretation": [
    {
      "coding": [
        {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
          "code": "H",
          "display": "High"
        }
      ],
      "text": "Cao — Gợi ý đái tháo đường kiểm soát chưa tốt"
    }
  ]
}

4. Link Resources via References


Patient ──────────────────┐
  │                        │
  ▼                        ▼
Encounter ──────────────▶ Condition
  │         diagnosis       │
  │                         │ evidence
  ▼                         ▼
Observation ◀──────────── Observation
(vital signs)              (lab results)

All clinical Resources are linked together via Reference. Encounter contains reference to Patient, Condition is attached to Encounter via element encounter. encounter, Observation references both Patient, Encounter, and can refer to Condition.

5. Summary

  • Encounter — Description of interactions (outpatient visit, hospital admission, emergency room, telehealth)

  • Condition — Diagnose the disease with ICD-10/SNOMED CT, staging, severity

  • Observation — Most flexible resource: vital signs (LOINC), lab results, social history

  • References — Links create a complete clinical data network