Key takeaways
HL7 v2 and FHIR solve different interoperability problems. HL7 v2 remains deeply useful for event-driven exchange such as admissions, orders, results, and scheduling, while FHIR provides standardized healthcare resources and modern API patterns for granular data access, apps, and newer integration workflows. In most real healthcare environments, the right architecture uses both.
In this guide
The direct answer What HL7 v2 is What FHIR is HL7 vs FHIR comparison Messages vs resources When HL7 v2 wins When FHIR wins FHIR versions and profiles SMART on FHIR Mapping HL7 v2 to FHIR Coexistence architecture Implementation workflow Testing and monitoring Security and governance Production lessons Decision roadmap FAQ Explore HL7/FHIR Integration ↗The direct answer
HL7 v2 is usually the better fit when an existing healthcare system already emits event-driven messages for admissions, orders, results, scheduling, or other operational workflows. FHIR is usually the better fit when an application needs standardized, resource-level API access, modern authorization, patient-facing apps, granular queries, or new interoperability products.
FHIR does not simply replace HL7 v2. Many hospitals, laboratories, imaging systems, and EHR environments will continue to use v2 interfaces while exposing FHIR APIs for different use cases. A practical integration strategy starts with the workflow and source-system capabilities, then chooses the standard and version that fit the actual exchange.
The event-driven workhorse
HL7 Version 2 is a family of healthcare messaging standards designed to exchange clinical and administrative events between systems. In day-to-day integration work, "HL7" often means HL7 v2 pipe-delimited messages moving through an interface engine or point-to-point interface.
Messages are organized into segments such as MSH for message metadata, PID for patient identity, PV1 for encounter context, OBR for order or observation request information, and OBX for observation values. The exact structure depends on the message type, version, implementation guide, trading-partner agreement, and local conventions.
MSH|^~\&|EHR|CLINIC|LAB|NETWORK|20260819||ORU^R01|MSG123|P|2.5
PID|||P12345||DOE^JANE||19840408|F
OBR|1||LAB7788|718-7^Hemoglobin
OBX|1|NM|718-7^Hemoglobin||13.4|g/dLEvent:
laboratory result available
Patient:
local patient identifier P12345
Observation:
Hemoglobin = 13.4 g/dL
Workflow:
route result to receiving systemHL7's current v2-to-FHIR implementation guide focuses on commonly exchanged v2 message structures including admission and transfer events, orders, results, vaccinations, medical-document events, and scheduling. That is a useful reflection of where v2 remains operationally important.
Healthcare data as reusable resources
FHIR, or Fast Healthcare Interoperability Resources, is an HL7 standard for exchanging healthcare information electronically. Its core building blocks are resources such as Patient, Practitioner, Encounter, Observation, Condition, MedicationRequest, ServiceRequest, DiagnosticReport, Appointment, and DocumentReference.
FHIR is often discussed as a REST API standard, but it is broader than REST. The specification includes resource models plus exchange approaches that include RESTful APIs, search, documents, messaging, services, subscriptions, and other patterns. JSON is common in application development, but FHIR also defines other representations.
Simplified FHIR resource
{
"resourceType": "Observation",
"status": "final",
"code": {
"coding": [{
"system": "http://loinc.org",
"code": "718-7",
"display": "Hemoglobin"
}]
},
"subject": { "reference": "Patient/P12345" },
"valueQuantity": {
"value": 13.4,
"unit": "g/dL"
}
}The practical comparison
| Dimension | HL7 v2 | FHIR |
|---|---|---|
| Primary mental model | Events packaged as messages | Standardized resources plus multiple exchange paradigms |
| Common transport | MLLP/TCP, files, interface engines, vendor-specific channels | HTTPS REST APIs, messaging, documents, subscriptions, and other FHIR patterns |
| Typical integration | System A sends an ADT, order, result, or scheduling event to System B | App reads, searches, creates, updates, or exchanges specific healthcare resources |
| Data shape | Segments and fields inside message structures | Resources with defined elements, references, profiles, terminology, and extensions |
| Web/mobile developer experience | Usually requires an interface layer or specialized parser | Designed to work naturally with modern API development |
| Customization | Local Z-segments and site conventions are common | Profiles and extensions formalize constrained use, but implementation variation still exists |
| Security model | Transport and application security are commonly defined outside the message itself | FHIR API security is also external to the core REST semantics; SMART provides widely used OAuth-based authorization patterns |
| Best fit | Established operational event feeds and legacy interoperability | New APIs, apps, granular data access, standardized resources, and modern interoperability programs |
The architectural difference that matters
HL7 v2 messages usually describe an event in context. A single result message may include message metadata, patient identity, encounter information, order context, and multiple observations. The receiver processes the message as an event and updates its local state.
FHIR decomposes healthcare information into resources that reference one another. A Patient can be read independently. An Encounter can reference that Patient. An Observation can reference the Patient and Encounter. A DiagnosticReport can reference multiple Observations.
Communicates patient administration events such as admission, transfer, discharge, or demographic updates.
FHIR resourcesRepresent identity and encounter state as addressable resources that can be searched or exchanged.
v2 eventCommunicates observations and results in an event-driven message.
FHIR resourcesRepresent individual measurements and grouped diagnostic results with explicit references.
v2 eventCommunicates scheduling events in many installed environments.
FHIR resourcesRepresent scheduling data through resource-level structures when supported by the server and workflow.
Do not assume a v2 segment maps one-to-one to one FHIR resource. Mapping depends on message context, semantics, identifiers, terminology, and the target implementation guide. HL7 now publishes a dedicated v2-to-FHIR implementation guide because consistent transformation requires more than renaming fields.
Do not replace a working event feed without a reason
If the required ADT, order, result, or scheduling event is available and well-supported, using it may be lower-risk than building a parallel mechanism.
Event-driven workflowAdmission, discharge, transfer, order, and result events often fit naturally into message-driven processing.
Legacy ecosystemLaboratory, radiology, billing, interface-engine, and hospital systems may have mature v2 interfaces with years of operational hardening.
Vendor realityA vendor may support patient data retrieval through FHIR while still requiring v2 or a proprietary interface for orders, results, or scheduling workflows.
Interface engineA mature integration engine can route, transform, validate, monitor, replay, and reconcile v2 traffic across many systems.
Change riskReplacing a stable interface only to modernize the syntax can create project risk without improving patient or operational outcomes.
Use the modern resource model where it creates leverage
FHIR resources and RESTful interactions are much easier to consume from modern application stacks than raw v2 feeds.
Patient accessFHIR plus SMART authorization provides standardized patterns for app access to health data where the server supports the required profiles and scopes.
Query-drivenSearch and read interactions allow applications to request resources directly rather than reconstructing state from a historical message stream.
New platformA FHIR-first internal model can make APIs, analytics, apps, and future partner integrations easier to standardize.
Standard profilesUS Core, SMART App Launch, and other implementation guides define narrower expectations for particular use cases.
Data reuseResource-level APIs can support multiple workflows without creating a new message format for each consumer.
"FHIR support" is not specific enough
As of August 2026, HL7 lists FHIR R5, version 5.0.0, as the current published base specification. That does not mean every production EHR or U.S. interoperability program has moved to R5.
The current published US Core Implementation Guide, version 9.0.0, is still based on FHIR R4 and meets USCDI v6 requirements. The current published SMART App Launch guide, version 2.2.0, is also published against FHIR R4, while documenting compatibility with FHIR versions from DSTU2 onward.
| Question | What to verify | Why it matters |
|---|---|---|
| Base version | R4, R4B, R5, or another supported version | Resource definitions and compatibility differ between releases |
| Implementation guide | US Core or another jurisdiction/use-case profile | Profiles add required elements, terminology, search behavior, and conformance rules |
| CapabilityStatement | Resources, search parameters, interactions, and operations actually supported by the server | The base FHIR specification does not require every server to implement everything |
| Authorization | SMART version, scopes, backend-service support, launch context, token behavior | Data availability means little if the application cannot obtain appropriate access |
| Write support | Create, update, conditional operations, transaction behavior, proprietary restrictions | Many practical integrations need more than read-only data |
| Vendor profile | Extensions, proprietary endpoints, required identifiers, partner-program constraints | Real implementations often add vendor-specific requirements |
That is why "we support FHIR R5" is not automatically better than "we support the R4 profile your EHR and implementation guide require." Interoperability is about matching the ecosystem, not chasing the newest version number.
FHIR defines data exchange, SMART defines common authorization patterns
SMART App Launch is an HL7 implementation guide that defines OAuth 2.0 based patterns for applications to authorize, authenticate, and integrate with FHIR-based systems. It supports EHR-launched apps, standalone apps, scopes for limiting access, discovery of server configuration, and backend-service patterns.
SMART does not mean "the app may read everything." Requested scopes, user privileges, patient context, server policy, consent, organizational policy, and applicable law all affect what data and actions should be available.
Translation is semantic work
HL7's v2-to-FHIR implementation guide provides standardized mappings for messages, segments, data types, and vocabularies into FHIR R4 concepts. It is an important starting point, but each production transformation still needs local implementation rules.
Mapping rule
When v2 becomes FHIR, store enough provenance to reproduce the transformation: source message ID, source version, mapping version, terminology map, generated resource IDs, validation results, timestamp, and downstream outcome. Without that trace, reconciliation becomes guesswork when the source and target disagree.
The most common architecture is hybrid
A practical architecture often keeps v2 at the system boundary where legacy or operational systems already use it, then normalizes data into an internal model or FHIR layer for modern applications. Other systems may remain FHIR-native end to end.
The EMR may own demographics and encounters while a scheduling platform owns availability. Do not let each integration invent authority independently.
IdentityPatient, provider, encounter, order, accession, and organization identifiers need durable cross-system mapping.
TerminologyLOINC, SNOMED CT, RxNorm, ICD, local codes, units, and organization-specific vocabularies need controlled translation.
EventsDuplicate and out-of-order v2 messages can corrupt FHIR state if the transformation layer assumes every event is new.
ReadsDo not rebuild current state from an incomplete event history if the source system offers a reliable query or API.
WritesA FHIR read API does not imply that the same vendor accepts FHIR writes for every workflow.
Integration starts with a workflow contract
State exactly what should happen when a patient registers, an order is created, a result arrives, an appointment changes, or an app requests data.
Phase 02Obtain interface specifications, CapabilityStatements, FHIR version, implementation guides, SMART configuration, sandboxes, and write restrictions.
Phase 03Document patient, encounter, order, provider, location, organization, and external-system identifiers before mapping fields.
Phase 04Map v2 fields, FHIR profiles, extensions, codes, units, null behavior, repeated values, and local conventions.
Phase 05Specify acknowledgements, retries, idempotency, duplicate detection, out-of-order events, timeout behavior, and replay rules.
Phase 06Include normal messages, missing fields, unknown codes, malformed payloads, duplicate events, mismatched patients, and unavailable dependencies.
Phase 07Compare source and destination records for real traffic before allowing the interface to operate without close review.
Phase 08Track rejected messages, FHIR errors, authorization failures, mapping drift, queue depth, replay, and downstream corrections.
Phase 09Control changes to source message versions, FHIR profiles, vendor APIs, terminology maps, and implementation-guide releases.
Planning an EMR, lab, portal, or AI integration?
Trilops designs healthcare integrations around vendor capabilities, HL7 v2, FHIR, SMART authorization, identity, terminology, reconciliation, and operational monitoring.
A valid payload can still create the wrong record
Standards do not remove security responsibility
FHIR's REST API specification explicitly notes that authentication, authorization, and audit collection are not solved by the REST interactions themselves. SMART provides authorization patterns for FHIR applications, but implementation still needs organizational policy, appropriate scopes, identity, consent where applicable, logging, secrets, network controls, and incident response.
Do not give an integration broad database or API access merely because it is easier to configure.
TransportProtect every connectionUse appropriate encrypted transport, network controls, certificates, key rotation, and secure channel configuration for the architecture.
SecretsManage credentials centrallyOAuth clients, private keys, API secrets, interface credentials, and certificates need rotation and audited access.
AuditTrace reads, writes, transformations, and failuresKeep enough context to reconstruct who or what moved which data and why.
RetentionKnow where PHI appearsInterface logs, dead-letter queues, message archives, API traces, and test fixtures can all contain sensitive data.
GovernanceAssign ownership across organizationsDefine who handles mapping changes, downtime, data corrections, access approvals, incident response, and vendor escalation.
For the broader healthcare software controls, read HIPAA-Compliant Software Development. Technical interoperability does not by itself establish HIPAA compliance or any other legal or regulatory status.
What healthcare integration work taught us
"FHIR available" often meant a defined subset of resources, searches, scopes, and read/write operations. The CapabilityStatement, sandbox, partner documentation, and real test calls mattered more than the checkbox.
Parsing JSON or pipe-delimited text is straightforward compared with deciding whether two identifiers refer to the same patient, encounter, provider, order, or location.
Local codes, units, order catalogs, provider types, locations, and clinical terminology changed over time. Mapping tables needed versioning, owners, tests, and rollback.
Modern APIs reduced friction for applications, but production systems still needed authorization, normalization, orchestration, retries, reconciliation, monitoring, and vendor-specific adaptation.
v2 was effective for operational events while FHIR provided resource-level access for portals, apps, analytics, and newer workflows. Forcing one standard everywhere increased complexity rather than reducing it.
Dead-letter queues, replay, idempotency, reconciliation, and human correction were not edge features. They were how the system stayed trustworthy when a partner interface failed.
The hardest interoperability bugs are rarely about whether the payload is valid. They are about whether the payload means the same thing on both sides.
Trilops healthcare integration principleA practical decision framework
Integration decision scorecard
Need an interoperability architecture review?
We can help map the actual exchange path across HL7 v2, FHIR, SMART, proprietary APIs, identity, terminology, monitoring, and downstream workflows.
Frequently asked questions
Not in the simple sense. FHIR is the modern standard for many API and application workflows, while HL7 v2 remains deeply installed for operational messaging. Most large healthcare ecosystems will support both for years because they serve different workflows and source systems.
No. RESTful APIs are one prominent FHIR exchange pattern, but the specification also includes messaging, documents, services, subscriptions, and other mechanisms. FHIR's broader foundation is its standardized resource model.
Use the version required by the target ecosystem and implementation guide. FHIR R5 is the current published base specification, but the current US Core 9.0.0 guide is based on FHIR R4. Verify the EHR's CapabilityStatement and required profile rather than choosing by recency alone.
SMART App Launch defines OAuth-based patterns for applications to authorize and integrate with FHIR servers. It covers capabilities such as EHR launch, standalone launch, scopes, configuration discovery, token exchange, and backend services.
Many common v2 concepts can be mapped into FHIR, and HL7 publishes a v2-to-FHIR implementation guide. Production conversion still requires local semantic decisions, terminology mapping, identifier rules, target profiles, validation, and testing. A mechanical field rename is not enough.
Possibly. FHIR reduces custom data-format work, but organizations may still need routing, transformations, authorization, orchestration, monitoring, retries, terminology, identity matching, and reconciliation across several vendors and standards.
Ask for the supported FHIR version, implementation guides, CapabilityStatement, SMART configuration, available resources and search parameters, read/write operations, sandbox access, rate limits, event options, partner requirements, fees, support process, and version-change policy.
FHIR versions, implementation guides, vendor support, regulatory programs, and certification requirements evolve. Verify the exact target ecosystem immediately before implementation. This article is technical guidance, not legal, regulatory, or compliance advice.
Trilops builds healthcare integration layers across HL7 v2, FHIR, SMART authorization, vendor APIs, identity, terminology, auditability, monitoring, and recovery workflows.