Epic's Data Architecture: From Chronicles to Clarity
Purpose: To understand why Epic’s data looks the way it does by tracing its journey from hierarchical to relational.
The Tale of Two Databases
Section titled “The Tale of Two Databases”To understand Epic’s EHI export, you must first understand Epic’s unique dual-database architecture. Unlike most modern systems that use a single database, Epic runs two completely different databases in parallel:
- Chronicles: The real-time hierarchical database where clinicians work
- Clarity: The relational reporting database that feeds analytics
This isn’t a design quirk—it’s a deliberate architecture that balances the competing needs of speed (for patient care) and structure (for reporting). Let’s explore how this shapes everything you see in the EHI export.
Chronicles: The MUMPS Legacy
Section titled “Chronicles: The MUMPS Legacy”Epic’s Chronicles database runs on technology older than the Internet itself. Born in 1966 at Massachusetts General Hospital, MUMPS (Massachusetts General Hospital Utility Multi-Programming System) was revolutionary for its time. It combined a programming language with an integrated database—a radical idea when RAM was measured in kilobytes.
That LINE
column? It’s Chronicles’ way of handling multiple values for a single concept—what MUMPS calls “multiple responses.” In a hierarchical database, you don’t create separate tables for one-to-many relationships; you create numbered lines within the same record.
How Chronicles Stores Data
Section titled “How Chronicles Stores Data”In Chronicles, data lives in Master Files (called INIs), each containing records with:
- Item Number: The unique identifier for the record
- Items: Individual data fields, which can be single-valued or multi-valued
Here’s how this translates to what you see:
In Chronicles, this would be stored as a single account record with multiple contact “lines.” The ETL process flattens this into rows, preserving the line numbers.
The Nightly Transformation: ETL
Section titled “The Nightly Transformation: ETL”Every night, Epic performs a massive Extract, Transform, Load (ETL) operation:
This process:
- Extracts data from Chronicles’ hierarchical structure
- Transforms it into relational tables (creating those LINE columns)
- Loads it into Clarity’s 18,000+ SQL Server tables
The result? Yesterday’s real-time data becomes today’s analytics.
Why Two Databases?
Section titled “Why Two Databases?”This architecture seems complex, but it solves real problems:
Chronicles excels at:
- Lightning-fast lookups for individual patients
- Real-time data entry during patient care
- Handling constantly changing clinical workflows
- Supporting hundreds of simultaneous users
Clarity excels at:
- Complex queries across millions of records
- Population health analytics
- Financial reporting
- Research datasets
Chronicles Artifacts in Your Data
Section titled “Chronicles Artifacts in Your Data”Understanding Chronicles helps explain many “quirks” in the EHI export:
These _REAL
columns contain Epic’s internal date format—the number of days since December 31, 1840. Why 1840? It’s a MUMPS convention that predates Unix time by decades.
The Hidden Hierarchy
Section titled “The Hidden Hierarchy”Even in relational form, you can see Chronicles’ hierarchical DNA:
Tables like ACCOUNT
, ACCOUNT_2
, ACCOUNT_3
aren’t separate entities—they’re continuations of the same Chronicles record, split because SQL Server has column limits that Chronicles doesn’t respect.
From INI to Table
Section titled “From INI to Table”Chronicles master files (INIs) map directly to Clarity tables:
Each prefix typically represents a Chronicles master file:
- PAT: Patient master file
- HSP: Hospital accounts
- ORD: Orders
- CLA: Clarity-specific tables
The Performance Trade-off
Section titled “The Performance Trade-off”This dual architecture creates a 24-hour lag but enables both systems to excel at their jobs. Real-time clinical care happens in Chronicles. Historical analysis happens in Clarity. The EHI export gives you the Clarity view—comprehensive but not instantaneous.
Many tables include update tracking columns that show when data was last refreshed from Chronicles, though these are often empty in EHI exports.
Working With the Architecture
Section titled “Working With the Architecture”Understanding this architecture helps you:
- Interpret LINE patterns: When you see numbered lines, think “this was a multi-valued field in Chronicles”
- Handle split tables:
PATIENT
,PATIENT_2
, etc. are one logical record - Understand timing: Data is always at least one day old due to ETL
- Recognize Chronicles types:
_YN
for yes/no,_C
for category lists,_REAL
for internal dates
Key Takeaways
Section titled “Key Takeaways”- Epic uses two databases: Chronicles (hierarchical, real-time) and Clarity (relational, analytical)
- The EHI export comes from Clarity after nightly ETL processing
- MUMPS, created in 1966 at Mass General, still powers Epic’s core database
- The LINE column pattern (in 275 tables) reveals Chronicles’ hierarchical structure
- Tables ending in _2, _3, etc. are continuations of the same logical record
- Understanding this architecture explains many “quirks” in the data model