Healthcare data arrives in more formats than almost any other industry handles: HL7 v2 messages, FHIR resources, X12 claims, EHR database extracts and spreadsheets from partners. ETL, extract, transform and load, is the work of turning all of it into data that analysts, quality teams and AI models can trust.
This guide walks through a healthcare ETL pipeline from source to warehouse: the sources, the choice between ETL and ELT, the staging layer, transformation and terminology mapping, target models such as OMOP, data quality checks, compliance controls and the mistakes that sink projects.
What is healthcare ETL?
Building healthcare data pipelines?
Agnotic designs and builds healthcare ETL and ELT pipelines from clinical, claims and operational sources into analytics-ready warehouses.
Healthcare ETL is the process of extracting data from clinical, claims and operational systems, transforming it into consistent structures and codes, and loading it into a warehouse or data platform for reporting, research and AI. It must handle healthcare formats such as HL7 v2, FHIR and X12, map local codes to standard terminologies, and protect patient data throughout.
What sets healthcare apart is the mix of formats and meaning. The same lab test can arrive under different local codes from two hospitals, and the same patient can appear under several identifiers. Most of the effort in healthcare ETL goes into making those match.
What does a healthcare ETL pipeline look like?
A healthcare ETL pipeline moves data through four stages: sources such as HL7 v2, FHIR, X12 and files; a staging layer that lands raw data unchanged; a transform and terminology layer that cleans, matches and standardizes it; and a warehouse that serves analysts and applications.
- 1. Sources: Messages, API responses, claim files and extracts collected on a schedule or in real time.
- 2. Staging: Raw data stored exactly as received, with load time and source recorded.
- 3. Transform and terminology: Parsing, cleaning, patient matching, code mapping and business rules.
- 4. Warehouse: Modeled tables, such as a dimensional model or a common data model, ready for queries.
Keeping these stages separate makes the pipeline easier to debug and rerun. When a mapping changes, the transform step can be replayed from staging without asking source systems to resend data.
Which sources does healthcare ETL handle?
Healthcare ETL handles real-time clinical messages, API data, administrative transactions and bulk extracts, each needing its own parser and load pattern.
- HL7 v2: ADT, orders, results and other messages from interface engines, often in real time.
- FHIR: Resources pulled through REST APIs or Bulk Data exports from EHRs and payers.
- X12: Claims and remittances; HIPAA names the X12 837 standards, such as 005010X222 for professional claims, at 45 CFR 162.1102.
- EHR database extracts: Reporting databases such as Epic Clarity, loaded in nightly batches.
- Files: CSV and spreadsheet extracts from registries, partners and departmental systems.
- Device and app data: Readings from remote monitoring devices and patient apps.
Document every source with its format, frequency, owner and known quirks. That catalogue becomes the reference when something breaks at 2 a.m.
ETL or ELT: which fits healthcare data?
Most modern healthcare platforms use ELT: load raw data into the warehouse first, then transform it there. ETL, which transforms before loading, still fits where data must be filtered or de-identified before it reaches the platform.
- ELT strengths: Raw data is kept, transformations can be rerun, and cloud warehouses handle large transforms well.
- ETL strengths: Sensitive fields can be removed or masked before data lands, and only needed data is stored.
- Hybrid: Parse and de-identify at the edge, then load and model inside the warehouse.
The decision often comes down to privacy. If a research platform must never hold direct identifiers, de-identification belongs in the extract step, before loading.
Cost and skills matter as well. ELT puts most of the work in SQL inside the warehouse, which many analytics teams already know, while classic ETL tools need their own specialists. Pick the pattern your team can run and support at 2 a.m., not the one that looks best on a slide.
Whichever pattern you choose, the staging layer should store data exactly as received, never edited, with metadata showing where and when each record came from. It is the pipeline's memory and its safety net.
- Immutable raw data: Messages and files stored as received, including ones that fail parsing.
- Lineage metadata: Source system, file or message ID, and load timestamp on every record.
- Replay: The ability to reprocess any period from staging when a transform changes.
- Retention: Rules for how long raw data is kept, in line with policy and contracts.
Staging is also where failed records should go, not into a log file nobody reads. A message that cannot be parsed today may be parsed tomorrow after a fix, and keeping it in staging means the warehouse can catch up without asking the source to resend.
What happens in the transform and terminology step?
The transform step parses source formats, cleans values, matches patients and providers across sources, and maps local codes to standard terminologies. This is where most of the clinical judgment in a pipeline lives.
- Parsing: HL7 v2 segments, FHIR resources and X12 loops turned into rows and columns.
- Cleaning: Units standardized, dates normalized and obvious errors flagged rather than silently fixed.
- Patient matching: Records from different sources linked to one person using identifiers and demographics.
- Terminology mapping: Local lab codes to LOINC, local drug codes to RxNorm, problems to SNOMED CT and ICD-10-CM.
- Business rules: Definitions such as an encounter, an episode or an attributed patient, applied consistently.
- Deduplication: Repeat messages and resent files removed without losing genuine updates.
Terminology mapping deserves its own owner and review process. A single wrong mapping, such as a lab code pointed at the wrong LOINC term, can distort every report that uses it.
Which target models do healthcare warehouses use?
Healthcare warehouses commonly use dimensional models for operational reporting, the OMOP Common Data Model for research and analytics across organizations, or FHIR-shaped stores for application access. Many platforms use more than one.
- Dimensional models: Facts such as encounters, charges and results, with dimensions for patient, provider, location and date, suited to dashboards.
- OMOP CDM: A standard model maintained by the OHDSI community, using OHDSI standardized vocabularies, so the same analysis can run at many sites.
- FHIR stores: Data held as FHIR resources, convenient for apps and APIs but harder for large analytic queries.
Choose the model by its main users. Finance and operations teams want dimensional tables; researchers want OMOP; app developers want FHIR. A well-built pipeline can feed all three from one transform layer.
OMOP conversions need particular planning. Every source code must be mapped to an OHDSI standard concept, and unmapped codes end up excluded from many analyses, so track the mapping rate by domain and source as a core project measure.
How do you check data quality?
Check data quality at every stage, with automated tests that block bad loads and dashboards that show trends. Healthcare data fails quietly: a feed stops, a code changes, a field goes blank, and reports keep running.
- Completeness: Expected row counts per source and day, and required fields populated.
- Conformance: Values in valid formats and code sets.
- Plausibility: Dates in sensible ranges and values within clinical limits.
- Timeliness: Alerts when a feed is late or silent.
- Standard checks: OHDSI's Data Quality Dashboard runs more than 3,500 checks against OMOP data, a useful baseline for OMOP projects.
Decide in advance which checks block a load and which only warn. A missing day of lab results should stop downstream reports from publishing; a handful of implausible heights can be flagged and fixed later. Publish the results where data users can see them, so trust in the warehouse is based on evidence.
How do you keep healthcare pipelines compliant?
Keep pipelines compliant by treating every stage that holds patient data as part of the HIPAA environment: access controls, encryption, audit logs and minimum necessary data. The HIPAA Security Rule at 45 CFR 164.312(b) requires audit controls that record and examine activity in systems containing electronic protected health information.
- Access: Role-based access to staging and warehouse layers, with raw data restricted most tightly.
- Encryption: Data encrypted in transit and at rest, including backups and temporary files.
- Audit logs: Logins, queries and exports logged and reviewed.
- De-identification: Separate de-identified data sets for research and broad analytics.
- Agreements: Business associate agreements with every cloud and tool vendor that touches the data.
Pipelines spread data into places people forget: temporary tables, developer laptops, test environments and log files that capture message contents. Include all of them in the risk analysis, and use synthetic or de-identified data for development and testing wherever possible.
What goes wrong in healthcare ETL projects?
Healthcare ETL projects go wrong when they skip staging, underestimate terminology work or build without data quality checks.
- No raw layer: Transforms run straight from sources, so errors cannot be replayed.
- Mapping by spreadsheet: Code mappings kept in a spreadsheet nobody reviews.
- Silent failures: A feed stops and nobody notices for weeks.
- Unclear definitions: Two dashboards count encounters differently.
- Identity gaps: Patients split or merged incorrectly across sources.
- Hand-built pipelines: Each new source wired up differently, so nobody can maintain them all.
The common thread is treating the pipeline as a one-off build rather than a product. Pipelines need version control, automated tests, documentation, monitoring and an owner, just like any application that clinicians or executives depend on.
How Agnotic can help
Agnotic Technologies designs and builds healthcare data pipelines for clients: connectors for HL7 v2, FHIR, X12 and EHR extracts, raw staging with full lineage, transformation and terminology mapping, and warehouse models including dimensional and OMOP.
Agnotic builds data quality checks, monitoring and HIPAA controls into the pipeline from the start, so analysts and AI teams can rely on the data and compliance teams can see who touched it.
Build a pipeline you can trust
Explore Agnotic's data engineering services, or read more in the data engineering hub.
Related reading on Agnotic
Continue with clinical data integration, healthcare data management, EHR data analytics and Epic Clarity integration.


