A clinical data warehouse holds normalized patient, encounter and claim data. It keeps every earlier version of each record. Analysts query it through read replicas. Three rules set it apart from a generic warehouse. History is never overwritten. Partner ETL can fail and resume without duplicating data. Every schema change leaves a trail a reviewer can follow.

These notes come from a warehouse we built for a healthcare operator. We then kept it running through years of feature work, while its record count grew more than tenfold. The build is in our clinical data warehouse case. The system before it had three recurring defects. ETL jobs raced each other. Normalization rules drifted between jobs. Stored procedures were so bloated that each schema change was a risk. Every decision below answers one of them.

What the clinical part changes

A generic warehouse is tuned for query speed and storage cost. A clinical one is tuned so that it can prove things. An auditor, a regulator or a partner may ask how a value came about, what it was before and who changed the schema beneath it. The design has to answer all three.

Referential integrity is a must. A claim row that points to a missing encounter is a defect in the record of care. History is a must too. Overwriting a patient record destroys what a dispute would need. Measures built from the warehouse must be rebuilt from their inputs on demand. HEDIS numerators and denominators are the sharpest example. So the warehouse may never lose or reshape what it took in.

Normalization with history

Sources disagree on shape, coding and identity. So the warehouse normalizes into one patient model, one encounter model and one claim model. It keeps the past while it does so. Each record stores its earlier values, when they changed and which batch changed them.

Keeping history is what makes corrections safe. Clinical feeds correct themselves all the time, and each correction lands as a new state. An analyst can then rebuild the data as it stood when a past report was produced. With in-place updates, each correction invalidates every earlier report, and nobody can tell which ones.

Normalization code lives in one place per entity. The drift we inherited came from parallel ETL jobs, each with its own version of the rules. Two jobs merged patient identities in different ways, so whether two records matched depended on which job ran first. One shared code path per entity ended that defect.

Partner feeds entering idempotent ETL, a history-keeping core database and read replicas that serve analytics
Idempotency keys let a stalled partner feed resume cleanly; replicas keep analytics off the operational path.

ETL that survives partner outages

Feeds come from external partners, and partners miss windows, deliver half a batch or resend old files. So each batch carries an idempotency key. Applying the same batch twice leaves the same state as applying it once.

Recovery then becomes routine. A missed window resumes without duplicates, and a resent file changes nothing. An operator can rerun a suspect batch to find the fault. Without idempotency, each outage means matching patient data by hand.

Batches run in a fleet of background services, one per feed, so a single partner's outage leaves the other feeds running. Per-feed diagnostics show a stuck batch as soon as it stalls.

Forward-only schema evolution

Years of features mean hundreds of schema changes. Every migration is forward-only and recorded in an audit trail. In an audited system, a rollback that rewrites old rows looks the same as tampering. So a bad release is fixed by another forward migration, and the trail shows both steps.

Stored procedures ship from the repository. A procedure edited live in the database UI has no review, no history and no sure link to what the repository says is live. Versioned, reviewed and deployed like other code, procedures stopped drifting from what the team believed was running. With both rules in place, every schema state the warehouse has ever had can be explained.

Serving analytics without hurting operations

Day-to-day processes read and write in small transactions. Analysts run large scans. Read replicas keep the two apart, so a ten-minute query never slows the live path.

Downstream uses take their own forms. Batch reporting reads from replicas, as in our cohort report generation. When many teams need live reads across sources, an aggregation hub belongs in front of the warehouse, each handling the job the other does badly.

Idempotent batches, preserved history, forward-only change and replica isolation are cheap to choose at the start. Each one dropped under deadline pressure returns later as a reconciliation project.