The Migration Every Healthcare Organization Will Face
HL7 v2 has been the backbone of healthcare data exchange for nearly four decades. It works. It's everywhere. And it's not going away anytime soon — over 95% of US hospitals still use it for critical internal integrations.
But the future is FHIR. CMS mandates it. EHR vendors are investing in it. Patients expect it. And the talent pool of developers who can work with modern REST APIs vastly outnumbers those with specialized HL7 v2 expertise.
The question isn't whether to adopt FHIR — it's how to get there without breaking the systems that keep your hospital running today. This guide covers the decision framework, architecture patterns, data mapping, terminology challenges, ROI, testing tools, and the pitfalls that catch most organizations off guard.
The Decision Framework: Why Are You Migrating?
The right migration strategy depends entirely on what's driving the initiative. Different drivers lead to different approaches, timelines, and investment levels.
Driver 1: CMS Compliance. If you need FHIR APIs to meet CMS mandates (Patient Access API, Prior Authorization), focus narrowly on the required APIs. Build a FHIR facade over your existing data, expose the mandated resources, and move on. Don't migrate internal interfaces that don't need FHIR.
Driver 2: Modernization. If you're modernizing your integration infrastructure to reduce maintenance costs and enable new capabilities, take a phased approach. Prioritize the interfaces with the highest maintenance burden or the greatest business value. Bridge v2 and FHIR — don't rip and replace.
Driver 3: New Product. If you're building a new healthcare application, build FHIR-first from day one. Add HL7 v2 bridges only where you must connect to legacy systems. This is the cleanest path because you're not carrying technical debt.
The cardinal rule: HL7 v2 and FHIR coexist. Never plan to eliminate v2 entirely — many critical systems (labs, pharmacies, legacy EHRs) will use v2 for years. Your architecture must support both.
The Coexistence Architecture
The most successful migrations use a coexistence pattern — v2 and FHIR running side by side, connected through a translation layer. This lets you migrate consumers one at a time without disrupting existing data flows.
The architecture has three layers:
- Legacy Systems — Lab, pharmacy, radiology, and ADT systems continue to send and receive HL7 v2 messages exactly as they do today. No changes required.
- Integration Hub — Your existing HL7 v2 engine (like Mirth Connect) handles v2 traffic. Alongside it, a FHIR server (like HAPI FHIR) exposes FHIR APIs. A bidirectional translator bridges the two — converting v2 messages to FHIR resources and vice versa.
- Modern Applications — Patient portals, mobile apps, analytics platforms, and third-party SMART apps all consume FHIR APIs. They never see v2.
This pattern lets you migrate incrementally. Each new consumer connects via FHIR. Each legacy system continues with v2. Over time, as legacy systems are replaced, the v2 layer shrinks naturally.
Data Mapping: v2 Segments to FHIR Resources
The core technical work of migration is mapping HL7 v2 message segments to FHIR resources. Some mappings are straightforward; others require significant transformation.
The most important mappings:
- PID → Patient: Relatively straightforward. PID.5 (name) maps to Patient.name, PID.7 (DOB) to Patient.birthDate. But watch for: v2 allows unstructured name formats that FHIR's structured name object can't always parse cleanly.
- PV1 → Encounter: Visit information maps well, but v2's patient class codes (I, O, E) must be translated to FHIR's Encounter class ValueSet (IMP, AMB, EMER).
- OBX → Observation: Lab results map naturally. OBX.5 (value) to Observation.value, OBX.6 (units) to Observation.valueQuantity.unit. The challenge: v2 uses local test codes while FHIR expects LOINC.
- DG1 → Condition: Diagnosis codes map directly (ICD-10 is standard in both). But v2's diagnosis types and ranking don't have direct FHIR equivalents.
HL7 International publishes an official v2-to-FHIR Implementation Guide with detailed mappings. Use it as your starting reference.
The Terminology Mapping Challenge
Terminology mapping is where 30% of your migration effort will go, and it's where most organizations underestimate the work. HL7 v2 and FHIR use different code systems, and the translation isn't always clean.
The core challenges:
- Local codes: Many v2 implementations use local, vendor-specific codes instead of standard terminologies. These must be mapped to SNOMED CT, LOINC, or ICD-10 for FHIR.
- Granularity mismatches: V2 might have 3 gender codes (M, F, O) while FHIR's AdministrativeGender has 4 (male, female, other, unknown). The mapping is close but not exact.
- Lossy conversions: Some v2 data elements have no direct FHIR equivalent. You must decide: store in an extension, map to the closest concept, or drop it.
FHIR's ConceptMap resource is designed exactly for this — it defines formal mappings between code systems. Build ConceptMaps for every v2 table you use, and maintain them as a living reference.
Migration Roadmap
A successful HL7 v2 to FHIR migration follows four phases. Rushing phases or skipping the assessment leads to costly rework.
Phase 1 — Inventory and Assess (3-4 weeks). Catalog every v2 interface. Classify each as "must migrate to FHIR," "bridge with translator," or "retire." Map v2 segments to FHIR resources. Identify terminology gaps that need mapping work.
Phase 2 — Build FHIR Facade (6-8 weeks). Deploy a FHIR server. Implement the v2-to-FHIR translator for your core resources (Patient, Encounter, Observation). Expose read-only FHIR APIs first. Validate conformance using Inferno.
Phase 3 — Migrate Consumers (8-12 weeks). Move applications from v2 to FHIR APIs one at a time. Start with the lowest-risk consumers (reporting, analytics) before migrating clinical applications. Add write-back FHIR operations. Run v2 and FHIR in parallel with data consistency checks.
Phase 4 — Optimize and Expand (Ongoing). Add FHIR resources beyond the initial set. Retire v2 interfaces that have been fully replaced. Connect to TEFCA. Implement Bulk Data export for population health and analytics.
Migration ROI
FHIR migration is expensive. Justifying the investment requires a clear picture of the costs you're eliminating and the capabilities you're gaining.
The ROI case is built on three pillars: reduced maintenance costs (fewer interfaces, less specialized labor), faster time-to-integrate for new applications, and new revenue opportunities from patient-facing and partner-facing APIs that v2 can't support.
Typical payback period: 18-24 months for organizations with 20+ v2 interfaces.
Testing and Validation Tools
FHIR conformance testing is critical — CMS mandates specific compliance criteria, and EHR vendors validate your implementation during app review. These tools should be part of your migration from day one.
Inferno is the most important tool — it's the ONC-designated testing tool for US Core FHIR conformance. If you're seeking ONC certification or need to prove CMS compliance, Inferno is required. It's free and open source.
Synthea is invaluable for generating realistic synthetic patient data to test your FHIR implementation without using real PHI.
7 Pitfalls to Avoid
After supporting multiple v2-to-FHIR migrations, we've seen the same mistakes repeatedly. Avoiding these saves months and significant cost.
The three most critical pitfalls:
- Trying to migrate everything at once. Prioritize ruthlessly. Start with 3-5 high-value interfaces, prove the pattern works, then expand.
- Underestimating terminology mapping. Budget 30% of your total effort for terminology work. It's the most tedious and most critical part of the migration.
- Shutting down v2 too early. Run v2 and FHIR in parallel for at least 6 months. Data consistency issues surface slowly, and you need a rollback path.
Next Steps
HL7 v2 to FHIR migration is inevitable for most healthcare organizations. The key is doing it incrementally, with a coexistence architecture that lets both standards run side by side during the transition.
For foundational knowledge, see What is HL7? and What is FHIR?. For integration engine selection, see Mirth Connect Guide. For EHR-specific guidance, see EHR Integration Guide.
Planning a v2-to-FHIR migration? Our team has helped healthcare organizations across the US plan and execute migration strategies — from assessment through production and beyond.



