Source: https://quadevs.com/insights/clinical-data-warehouse/

Title: Clinical data warehouse design for healthcare | quadevs

[Home](https://quadevs.com/)/ [Insights](https://quadevs.com/insights/)/ Clinical data warehouse design: notes from production

# Clinical data warehouse design: notes from production

A clinical warehouse is defined by its constraints: history that is never overwritten, partner ETL that survives outages and schema changes an auditor can follow.

Published 2026-08-27 Updated 2026-11-16 7 min read

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](https://quadevs.com/case/clinical-data-warehouse/). 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](https://quadevs.com/insights/hedis-data-pipeline/) 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.

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](https://quadevs.com/case/medical-reporting/). When many teams need live reads across sources, an [aggregation hub](https://quadevs.com/insights/clinical-data-aggregation/) 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.

1. [What the clinical part changes](https://quadevs.com/insights/clinical-data-warehouse/#what-clinical-changes)
2. [Normalization with history](https://quadevs.com/insights/clinical-data-warehouse/#normalization-history)
3. [ETL that survives partner outages](https://quadevs.com/insights/clinical-data-warehouse/#idempotent-etl)
4. [Forward-only schema evolution](https://quadevs.com/insights/clinical-data-warehouse/#schema-evolution)
5. [Serving analytics without hurting operations](https://quadevs.com/insights/clinical-data-warehouse/#serving-analytics)

## Common questions

What makes a data warehouse clinical?

Its constraints. Patient, encounter and claim records need full history, referential integrity across years of feature work and an audit trail for schema changes, because an auditor or a regulator may ask how a value came about. A clinical warehouse is built to answer that question.

   Why forward-only schema migrations?

In an audited system, a rollback that rewrites historical data looks the same as tampering. Forward-only migrations with an audit trail make every schema state explainable, and a bad release is corrected by another forward step.

   Why keep stored procedures in the codebase?

The database UI has no review, no history and no rollback. Shipping procedures from the repository makes them versioned, reviewed and deployable like other code. In our warehouse work it ended the gap between what the database ran and what the team thought it ran.

   Warehouse or aggregation hub first?

The hub first when consumers keep re-integrating sources. The warehouse first when analytics lacks history. They combine well: the hub can feed the warehouse, and warehouse replicas can take heavy reads off the hub.

## We built this in production

[### Clinical data warehouse

Healthcare · data systems  .NET · MSSQL · Windows services · ETL View case](https://quadevs.com/case/clinical-data-warehouse/)   [### Clinical data aggregation hub

Healthcare · API hub  .NET · ASP.NET Core · typed SDK View case](https://quadevs.com/case/clinical-data-hub/)   [### Automated medical reporting

Healthcare · reporting  .NET · PDF · LeadTools · MSSQL View case](https://quadevs.com/case/medical-reporting/)

## Keep reading

[### Clinical data aggregation: a hub architecture

 Data · 7 min read Read](https://quadevs.com/insights/clinical-data-aggregation/)   [### HEDIS automation: a pipeline auditors can reproduce

 Quality · 7 min read Read](https://quadevs.com/insights/hedis-data-pipeline/)

Service [Clinical data warehouses and data aggregation platforms](https://quadevs.com/healthcare/clinical-data-platforms/)

Practice [Healthcare software development](https://quadevs.com/healthcare/)

[Send a brief. Reply within 1 business day](https://quadevs.com/contact/)  [or email hello@quadevs.com](mailto:hello@quadevs.com)
