Part 4: Data to evidence

11 Data quality, warehouses and OMOP

Can you trust a number that passed through six systems?

About 80 minutesPending final reviewLast checked 2026-11-30

In plain language

  • To study many patients at once, researchers copy hospital records into a shared format called a common data model.
  • Every copy and conversion can lose or distort information. Different units for the same lab test are a classic trap.
  • Before you trust a number from a large dataset, you need to know where it came from and whether someone can check it.

The core sections below build on these ideas. Sections marked "Going deeper" are optional and go further.

Why this matters for you

What it means for each role
Students
Most published health data science runs on common data models. This is how those numbers are produced.
Physicians and residents
Before you trust a registry or a study, you should know how its data were mapped and checked.
Nurses and allied health
Much of the research record comes from nursing flowsheets. How you document becomes someone's dataset.
Researchers and analysts
Concept mapping, unit conversion and plausibility checks are daily work. Mistakes here invalidate whole studies.
IT and administration
Research warehouses, ETL jobs and data governance sit with you, and so does provenance.

Mira joins a research dataset

Thirty days after her ED visit, Mira’s record is copied overnight from the hospital’s EHR into a research warehouse by an ETL process (extract, transform, load). There, it is pseudonymised, meaning names and record numbers are removed, and transformed into the OMOP Common Data Model. Dates are kept, so this is not fully de-identified data: it stays inside the institution’s research governance. Her atrial fibrillation becomes a row in condition_occurrence with condition_concept_id = 313217, and her creatinine becomes a row in measurement.

Why go to that trouble? Every EHR stores data its own way, and every hospital uses its own local codes. A study written for one hospital’s database will not run at the next one. A common data model fixes the table structure and the vocabularies, so the same analysis can run unchanged at many sites. The OHDSI network does this across hundreds of databases worldwide. The patient data stays at each site, and only aggregate results are shared.

How OMOP is shaped

OMOP is person-centred. The person table holds one row per person. Clinical events live in domain tables such as visit_occurrence, condition_occurrence, drug_exposure and measurement. Each event points to a concept.

Concepts are the key idea. Every code from every vocabulary gets a concept_id. These include SNOMED CT (clinical findings and diagnoses), LOINC (lab tests), RxNorm (US drugs) and ICD-10 (diagnoses for billing and statistics). One concept per idea is marked as standard, and analyses use the standard ones. The original code is kept in _source_value and _source_concept_id columns, so it can be traced, although mapping to a standard concept can still lose detail. If the ETL cannot find a mapping, the concept ID is 0, and the record becomes invisible to any query that uses standard concepts.

Concepts also form a hierarchy, stored in the concept_ancestor table. “Atrial fibrillation” has descendants such as paroxysmal and persistent AF, and an ingredient such as apixaban has descendants that are specific products, like “apixaban 5 MG Oral Tablet”. Real OMOP data stores drugs as those specific products. So a real query looks for every descendant of the ingredient, not the ingredient itself. Forgetting this is the most common mistake new OMOP analysts make. To keep the lab small, this teaching database stores drugs at the ingredient level and has no concept_ancestor table.

Lab: query a research warehouse

The database below has 300 synthetic people, Mira among them, and runs entirely in your browser. It comes from two hospitals. Site A, MENA Academic Hospital where Mira was treated, reports creatinine in µmol/L, the convention in the UAE and most of the world. Site B, a partner hospital, reports it in mg/dL, the US convention. Select a table name to look at it. Then work through the challenges. The last two are where real analyses go wrong.

Not a SQL user? Open a challenge’s worked answer and read the query before you run it. Say in one sentence what it asks, then check the result. Reading queries is a real skill: analysts’ results reach committees as numbers, and someone has to ask how they were produced.

Loading the database…

Challenges (0 of 5 solved)

  1. How many people are in the database?

  2. How many distinct people have atrial fibrillation coded with the standard concept?

  3. How many condition records failed to map to any standard concept?

  4. How many people with standard-coded AF have no anticoagulant (warfarin or apixaban) on record?

  5. What is the mean serum creatinine in mg/dL, rounded to 2 decimals? Watch the units.

A challenge is marked solved when your query returns the right answer, however you write it.

Can you trust a number that passed through six systems?

Mira’s creatinine was measured by an analyser, sent to the lab system, put in an HL7 message, stored by the EHR, extracted, mapped, unit-converted and loaded. Each step can introduce error. A widely used framework from Kahn and colleagues groups data quality checks into three families:

  • Conformance: does the value have the right format, type and allowed code? An unknown unit or a text value in a numeric field fails here.
  • Completeness: is the data there? A site that never records smoking status fails here, and so do the missing anticoagulants that may simply have been filled elsewhere.
  • Plausibility: is it believable? A creatinine of 80 that is labelled mg/dL, or a test dated 2099, fails here. A careful analysis would also exclude those 2099 rows before calculating the mean creatinine.
Going deeper Automated data quality checks

OHDSI’s Data Quality Dashboard runs thousands of such checks on a database. The checks do not make data correct. They make the problems visible, so that analysts can decide whether a question can be answered.

From the Failure Museum: the database nobody could see

In 2020, at the height of the COVID-19 pandemic, The Lancet and the New England Journal of Medicine published studies based on hospital data from a little-known company. The data supposedly came from hundreds of hospitals on several continents. One study reported that hydroxychloroquine was linked to higher mortality, and some clinical trials paused in response. Within weeks, independent researchers pointed out numbers that could not be right. The data came from a company called Surgisphere. The co-authors could not get access to the underlying data to audit it, and both papers were retracted.

Lesson: a dataset’s size and polish are not evidence of its quality. Before you trust pooled data, you need provenance: where each record came from, how it was transformed, and the ability for someone else to check it. Common data models and data quality dashboards exist so that this checking is possible.

Check your understanding

Answer every question, then check. Each answer comes with an explanation. Score 80% or more to mark the module complete. Your progress is saved only in this browser.

1. In OMOP, a condition record has condition_concept_id = 0. What does that mean?
2. Why do networks such as OHDSI convert many hospitals' data into one common data model?
3. One site stores creatinine in µmol/L and another in mg/dL, both under the same measurement concept. What happens if you average value_as_number directly?
4. A measurement dated 2099-01-01 fails which kind of data quality check, in the Kahn framework?
5. Which query finds people with atrial fibrillation who have no anticoagulant on record?
6. What is the main lesson of the 2020 retracted COVID-19 studies described in this module?

0 of 6 answered

Sources

  1. OHDSI. OMOP Common Data Model documentation (v5.4)
  2. OHDSI. The Book of OHDSI. 2021.
  3. Hripcsak G, Duke JD, Shah NH, et al. Observational Health Data Sciences and Informatics (OHDSI): opportunities for observational researchers. Stud Health Technol Inform. 2015;216:574-578.
  4. Kahn MG, Callahan TJ, Barnard J, et al. A harmonized data quality assessment terminology and framework for the secondary use of electronic health record data. EGEMS. 2016;4(1):1244.
  5. OHDSI Athena vocabulary browser (to check concept IDs)
  6. Mehra MR, Desai SS, Ruschitzka F, Patel AN. RETRACTED: Hydroxychloroquine or chloroquine with or without a macrolide for treatment of COVID-19: a multinational registry analysis. Lancet. 2020. Retracted 4 June 2020. DOI not yet checked against the publisher.
  7. Mehra MR, Desai SS, Kuy S, Henry TD, Patel AN. Retraction: Cardiovascular disease, drug therapy, and mortality in Covid-19. N Engl J Med. 2020.