Back to Guides
Health IT
EMR vs EHR
Complete comparison of Electronic Medical Records (EMR) and Electronic Health Records (EHR). Learn the key differences, database architecture, and when to use each system.
Quick Comparison
| Feature | EMR | EHR |
|---|---|---|
| Scope | Single organization | Multiple organizations |
| Data Sharing | Limited | Extensive (HIE, APIs) |
| Patient Access | Basic portal | Full patient portal |
| Interoperability | Minimal | FHIR, HL7 v2, CCD |
| Focus | Clinical documentation | Longitudinal patient record |
| Cost | Lower ($) | Higher ($$-$$$) |
| Best For | Small clinics, single practices | Hospitals, health systems |
Database Architecture Differences
EMR Database Design
- • Single tenant architecture
- • Provider-centric data model
- • Episode-based records
- • Limited external identifiers
- • Optimized for speed within org
- • Minimal data normalization
EHR Database Design
- • Multi-tenant capable
- • Patient-centric data model
- • Longitudinal lifetime records
- • Extensive external IDs (MPI, HIE)
- • Optimized for sharing/interop
- • Highly normalized (HL7 RIM)
EMR Database Schema
-- EMR: Provider-Centric, Episode-Based CREATE TABLE emr_patient ( id UUID PRIMARY KEY, local_mrn VARCHAR(50) UNIQUE, -- Org-specific MRN first_name VARCHAR(100), last_name VARCHAR(100), dob DATE, -- Minimal external identifiers created_at TIMESTAMP DEFAULT NOW() ); CREATE TABLE emr_encounter ( id UUID PRIMARY KEY, patient_id UUID REFERENCES emr_patient(id), provider_id UUID, encounter_date DATE, chief_complaint TEXT, -- Episode-specific, no sharing status VARCHAR(20) ); CREATE TABLE emr_note ( id UUID PRIMARY KEY, encounter_id UUID REFERENCES emr_encounter(id), note_text TEXT, -- Provider documentation only provider_id UUID, created_at TIMESTAMP DEFAULT NOW() );
EHR Database Schema
-- EHR: Patient-Centric, Longitudinal, Interoperable CREATE TABLE ehr_patient ( id UUID PRIMARY KEY, enterprise_mrn VARCHAR(50), -- Enterprise-wide MRN national_patient_id VARCHAR(100), -- HIE identifier facility_mrns JSONB, -- Multiple facility MRNs first_name VARCHAR(100), last_name VARCHAR(100), dob DATE, -- External identifiers for sharing ssn_encrypted BYTEA, external_ids JSONB, -- Other org identifiers last_updated_at TIMESTAMP, sync_status VARCHAR(20) -- HIE sync status ); CREATE TABLE ehr_encounter ( id UUID PRIMARY KEY, patient_id UUID REFERENCES ehr_patient(id), facility_id UUID, -- Multi-facility support encounter_number VARCHAR(50), external_encounter_id VARCHAR(100), -- For HIE -- Care coordination fields referring_provider UUID, care_team JSONB, transitions_of_care JSONB, shared_with_orgs TEXT[] -- Track sharing ); CREATE TABLE ehr_clinical_document ( id UUID PRIMARY KEY, patient_id UUID REFERENCES ehr_patient(id), document_type VARCHAR(100), -- CCD, CCR, etc. fhir_resource_type VARCHAR(50), -- FHIR resource fhir_json JSONB, -- Full FHIR resource -- Interoperability shared_via VARCHAR(50), -- HIE, Direct, FHIR API external_doc_id VARCHAR(100), version INTEGER );
When to Choose EMR vs EHR
Choose EMR When:
- ✓Small independent practice (1-5 providers)
- ✓Single specialty clinic with limited referrals
- ✓Budget constraints are primary concern
- ✓No need for external data sharing
- ✓Focus is on internal documentation efficiency
Choose EHR When:
- ✓Hospital or multi-facility health system
- ✓Need for care coordination across organizations
- ✓Participation in ACO or value-based care programs
- ✓Required patient portal and patient engagement
- ✓Need for population health management and analytics