Skip to content

Components Overview

Think of the NPCA EMR Clinical Data Standard as telling the complete story of a patient's journey through a hospital visit. Each component represents a chapter in this story, connected through unique codes that link everything together.

The Patient Journey Story

Every story starts with a person - the Patient who needs medical care. When they arrive at the hospital, a new Visit begins. This visit becomes the container for everything that happens during their stay.

The journey unfolds through encounters:

  • Triage - The first stop where nurses assess how urgent the patient's condition is
  • Outpatient/Inpatient/Emergency - The main treatment areas where doctors provide care
  • Progress Notes - Daily check-ins during longer stays (for inpatients)
  • Surgery - Special procedures when needed

Throughout the journey, we collect information:

  • Vital Signs - Temperature, blood pressure, heart rate
  • Medical History - What happened before this visit
  • Physical Examinations - What doctors observe and feel
  • Laboratories & Imageries - Test results and scans
  • Diagnoses - What's wrong with the patient
  • Prescriptions - Medications to help them get better
  • Invoices - What services were provided and their costs

Component Relationships & Unique Codes

Each component has a unique code that identifies it. Other components reference these codes to show relationships:

  • Patient: code identifies them in their own object, while other components link to it via patient_code
  • Visit: code identifies them in their own object, while other components link to it via visit_code
  • Encounters: There are 6 components that are encounters in their nature: triages, outpatients, inpatients, emergencies, progress_notes, and surgeries. If you see encounter_code in a component, it links to one of these.

Strict Linking Rules for Encounters

Main Encounter Types

  • Outpatient, Inpatient, Emergency are top-level encounters
  • Triage is a special encounter that must be included in every visit
  • Progress Note is a sub-encounter that must link to an Inpatient (progress_notes.encounter_code = inpatient.code)
  • Surgery is another sub-encounter that can link to either Outpatient or Inpatient (surgeries.encounter_code = inpatient.code OR surgeries.encounter_code = outpatient.code)

Clinical Data Linking Rules

Vital Signs:

  • Must have at least 1 link to Triage (vital_signs.encounter_code = triage.code)
  • Additional vital signs link to Progress Notes (vital_signs.encounter_code = progress_notes.code)

Physical Examinations:

  • Must link with a main encounter like Outpatient, Inpatient, or Emergency
  • Cannot link directly to sub-encounters like Progress Notes or Surgery

Medical Histories:

  • Must link with a main encounter (same as Physical Examinations)
  • Provides context for the main treatment episode

Laboratories and Imageries:

  • Can link with main encounters (Outpatient, Inpatient, Emergency)
  • Can also link with Progress Notes to provide clearer timeline
  • This flexibility allows tracking when tests were ordered vs. when results came back

Diagnoses:

  • Must link with main encounters or sub-encounters
  • Provide clinical conclusions at different stages of care
  • Can help track diagnostic evolution throughout the visit

Prescriptions - Medication Location Rules:

  • Home medications: Link to Visit via visit_code but NOT to encounter (encounter_code: null)
  • Hospital medications: Link to Visit via visit_code AND to encounter (prescription.encounter_code = one of the encounter codes)
  • Can link to main encounters OR Progress Notes for clearer picture of when medications were given

Invoices:

  • Do not need the same separation as Prescriptions
  • If linked to an encounter or sub-encounter, they provide clearer picture of when charges occurred
  • Can help track billing by specific treatment episode

Referral Rules

Referrals are special components that happen in specific scenarios:

Patient Referred IN:

  • Visit will have admission_type as "Refer"
  • referrals.referred_from contains information about the sending facility

Patient Referred OUT:

  • Visit will have discharge_type as "Refer Out"
  • referrals.referred_to contains information about the receiving facility

Health Facility Data:

  • Standard data lookup endpoint provides all health facility information
  • Use this data to populate referral forms correctly

Data Validation Summary

Required Relationships

  1. Every visit MUST have exactly one Triage
  2. Every visit MUST have at least one main encounter (OPD/IPD/Emergency)
  3. Progress Notes can ONLY exist with Inpatient encounters
  4. All clinical data MUST link to appropriate encounter types
  5. Referral data MUST match visit admission/discharge types

Code Uniqueness Rules

  • Patient codes: Unique system-wide
  • Visit codes: Unique per healthcare facility
  • Encounter codes: Unique within the EMR system
  • All other codes: Unique within their respective component type

Data Integrity Rules

  • Use null for empty values, never remove fields entirely
  • Referral data is required when patients are transferred between facilities
  • All datetime fields must use Cambodia timezone (+07:00)
  • All codes must be pre-existing and valid within the system

Visit Flow Examples

Let's put what has been described so far into visual examples:

Outpatient Visit Flow

Outpatient Visit Flow

Typical Outpatient Journey:

  1. Patient arrives → Triage assessment
  2. Triage → Basic vital signs, chief complaint recorded
  3. Outpatient encounter → Doctor consultation, examination
  4. Clinical data collection → Labs ordered, physical exam, medical history
  5. Diagnosis & treatment → Doctor determines condition, prescribes medication
  6. Discharge → Patient leaves with home medications and follow-up instructions

Inpatient Visit Flow

Inpatient Visit Flow

Typical Inpatient Journey:

  1. Patient arrives → Triage assessment
  2. Triage → Urgent condition identified, needs admission
  3. Inpatient encounter → Admission to ward, initial treatment
  4. Daily progress notes → Regular monitoring, vital signs, medication adjustments
  5. Additional services → Labs, imaging, possible surgery
  6. Recovery & discharge → Condition improves, discharge planning

Emergency Visit Flow

Emergency to Outpatient

Emergency Outpatient Visit Flow

Emergency to Outpatient Journey:

  1. Patient arrives → Immediate triage for urgency assessment
  2. Emergency encounter → Rapid assessment and stabilization
  3. Treatment & monitoring → Immediate interventions, vital signs monitoring
  4. Condition stabilized → Patient responds well to treatment
  5. Discharge home → Patient leaves with medications and follow-up instructions

Emergency to Inpatient

Emergency Inpatient Visit Flow

Emergency to Inpatient Journey:

  1. Patient arrives → Immediate triage for urgency assessment
  2. Emergency encounter → Rapid assessment and stabilization
  3. Critical condition identified → Patient needs ongoing hospital care
  4. Admission to ward → Transfer to inpatient unit for continued treatment
  5. Daily progress notes → Regular monitoring, medication adjustments
  6. Recovery & discharge → Condition improves, discharge planning

Component Categories

Our components are organized into logical categories for easier understanding and implementation:

Base Components

  • Encounter - Clinical interactions between patient and providers
  • Observations - Flexible data collection system for any patient information
  • Conditions - Medical conditions and diagnoses tracking system
  • Services - Healthcare services and procedures provided to patients

Core Components

  • Patient - Personal information and demographics
  • Visit - Hospital stay container
  • Triage - Initial patient assessment
  • Vital Signs - Body function measurements
  • Medical History - Past health information
  • Physical Examination - Clinical findings
  • Laboratories - Test results and analysis
  • Imageries - Radiology and imaging results
  • Diagnosis - Medical conclusions
  • Prescriptions - Medication orders
  • Invoices - Financial records
  • Referrals - Inter-facility transfers

Specific Encounters

  • Inpatient - Hospital admission encounters
  • Outpatient - Clinic visit encounters
  • Emergency - Urgent care encounters
  • Surgery - Surgical procedure encounters
  • Progress Notes - Daily monitoring encounters

Quick Reference

Component Hierarchy

Patient
└── Visit
    ├── Triage (required)
    ├── Main Encounters (at least one required)
    │   ├── Outpatient
    │   ├── Inpatient
    │   └── Emergency
    ├── Sub-Encounters (optional)
    │   ├── Progress Notes (IPD only)
    │   └── Surgery (OPD/IPD)
    └── Clinical Data
        ├── Vital Signs
        ├── Medical History
        ├── Physical Examination
        ├── Laboratories
        ├── Imageries
        ├── Diagnosis
        ├── Prescriptions
        ├── Invoices
        ├── Referrals
        ├── Conditions
        └── Services
    └── Base Components
        ├── Observations
        ├── Conditions
        └── Services

Key Linking Patterns

  • Patientpatient_code ← All other components
  • Visitvisit_code ← All encounter and clinical components
  • Encountersencounter_code ← Clinical data components
  • Observationsobservation_code ← Related observations (optional)

Next Steps

  1. Review Base Components for fundamental structures
  2. Explore Core Components for main data models
  3. Check Specific Encounters for encounter types
  4. Refer to References for standard codes and values

Important

Each component tells part of the patient's healthcare story. When connected together through their unique codes, they create a complete picture of the patient's journey from arrival to discharge, including all the care, tests, treatments, and outcomes along the way.