Design and build are different jobs
The ETL chapter of The Book of OHDSI describes four steps, each owned by different people:
- Data experts and CDM experts design the ETL together.
- People with medical knowledge create the code mappings.
- A technical person implements the ETL.
- Everyone is involved in quality control.
The point of the split is focus. Designing requires deep knowledge of the source and of the OMOP Common Data Model; implementing requires knowing how to move large volumes of data efficiently. Doing both at once, the chapter warns, is how teams get stuck in detail before the logic is agreed1. In practice the most expensive mistake I see is a team writing transformation code from a verbal briefing, then discovering weeks later that a field meant something else.
Step 1: scan before you specify
White Rabbit connects to the source (delimited files or common databases such as PostgreSQL, SQL Server, Oracle and Redshift) and produces a scan report: every table and field, data types, row counts, how often each field is empty and, optionally, the frequency of each value. Two defaults are worth knowing. Values appearing fewer than five times are suppressed by the "min cell count" setting, and by default 100,000 randomly selected rows per table are scanned. Both matter on sensitive data, and both should be set deliberately rather than left as they are2.
The scan describes; it does not interpret. The book's example is a sex column holding 1 and 2: White Rabbit will not tell you which is which, and the data holder has to. I treat every such question as a line item in the specification, with a named person who answered it.
Rabbit-in-a-Hat then reads the scan and lets the design team draw connections from source tables and columns to CDM tables and columns, with logic and comments on each. It generates documentation, not code. That is a feature: the output is a specification that a reviewer can read and an implementer can build from2.

The order matters because the CDM is person-centric. Every clinical event table refers to PERSON through person_id, and the book recommends working out VISIT_OCCURRENCE before the clinical tables because they reference visit_occurrence_id. Visit logic is usually the hardest part of the design: what counts as one visit in your source rarely matches the CDM's idea of one5.
A good specification line reads like the published ETL-Synthea specification. For gender, for instance, it states that M becomes concept 8507, F becomes 8532, rows with missing gender are dropped, and why. Destination field, source field, logic and reasoning: nothing left for the implementer to guess4.
Step 2: map the codes that matter
Start by checking what the OMOP vocabularies already cover. If your source uses ICD-10-CM, for example, the "Maps to" relationships in CONCEPT_RELATIONSHIP already give you the standard concept, and no manual work is needed. I covered how those vocabularies fit together in clinical terminologies explained.
Local codes, national formularies and in-house lab codes are where the effort goes. Usagi suggests mappings from textual similarity between source descriptions and concept names, and a person with coding experience then approves, replaces or rejects each suggestion3.

The practices I would insist on all come from the book:
- Sort by frequency. A code that is rarely used will rarely matter in a study. Map the codes that cover most of the records first.
- Concept 0 is allowed. Some codes have no good target, and an honest 0 is better than a misleading match.
- Check the concept's context. Look at its parents and children; an orphan concept with no hierarchy makes a poor target, because cohort definitions rely on the hierarchy.
- Record why. Usagi supports comments on mappings. Use them, because the person reviewing next year will not remember.
- Export only approved mappings. Usagi exports approved rows in the SOURCE_TO_CONCEPT_MAP format, with your own source_vocabulary_id, so your mappings stay distinguishable from the standard ones.
Step 3: build with whatever the team can run
OHDSI deliberately does not prescribe an implementation stack. Sites have used SQL builders, SAS, C#, Java and Kettle; the book lists ETL-Synthea, a SQL builder, alongside .NET and AWS Lambda builders. It also notes that the community gave up on an "ultimate" user-friendly ETL tool after several attempts: such tools handle most of the work, but the rest always needs code specific to the source. My rule is simpler: choose the stack the team that will maintain it already knows.
Two implementation details from the book are worth adopting. Intermediate tables, for example to assign visit_occurrence_id or to pre-resolve source codes to standard concepts, are encouraged, because mapping on the fly is slow. Relying on them after the build is not: the CDM should be complete without them. And the designers should stay available to the implementers, because logic that is obvious to the person who wrote it is often ambiguous to the person coding it.
Step 4: check against the specification
The book's quality control steps are review by a second person, tracing one person's records through source and CDM, comparing overall counts, replicating a known study, and unit tests that encode each rule in the specification as a small synthetic record. I go through the layers, including the Data Quality Dashboard, in OMOP data quality checks. The design point here is that every one of these checks needs the specification to exist. Without it, a count difference cannot be classed as a bug or an intended exclusion.
Where the specification has gaps, use the community conventions before inventing your own. The OHDSI conventions documented through the THEMIS work group answer questions such as what to do with a person who has no year of birth (drop them; missing month or day is allowed). Following them keeps your data consistent with the rest of the network6.
Plan for maintenance from day one
The book lists four triggers for ETL maintenance: the source data changes, a bug is found, a new vocabulary release appears, or the CDM itself changes. Vocabularies can have several releases in a month; the book suggests adopting a new one once or twice a year, which means rerunning the ETL and its checks.
| Trigger | What to rerun | What to keep |
|---|---|---|
| New source codes | Usagi with "apply previous mapping", then map only the new codes | Approved mappings and their comments |
| New vocabulary release | Rebuild the Usagi index, find mapped concepts that are no longer standard | The vocabulary version each CDM build used |
| Bug in the ETL | Triage by who uses the affected tables, then fix and add a unit test | The test, so the bug cannot return |
| New CDM version | Specification and ETL for changed or added tables | The previous build until the new one passes checks |
The book's example of triage is a cost column rounded to whole units: minor for researchers characterising conditions, critical for health economists. Bug priority depends on who uses the data, which is one more reason to know your users before you build. If you plan to feed the CDM from FHIR, the pipeline view is in FHIR to OMOP architecture, and synthetic patient data with Synthea covers test data you can share freely.
The short version. Scan the source, write the specification before the code, map the frequent codes properly and leave the rare ones, follow the community conventions, and budget for vocabulary updates as recurring work rather than a surprise.
The CTO's take
An OMOP conversion is often budgeted as a data engineering project. The engineering is the predictable part. The cost and risk sit in the specification, the code mapping and the maintenance, which need clinical and source-system knowledge that engineers alone do not have. Staff those parts explicitly, make the specification the reviewable contract, and the build becomes routine.
If you are planning an OMOP conversion or rescuing one, I am a fractional CTO and AI architect based in India, the United States and the UAE, working globally. You can analyse your challenge and bring the result to a call.
- 1
- 2
- 3UsagiOHDSI
- 4
- 5
- 6