HL7 and FHIR are closely related, but they solve healthcare data exchange problems in different ways. HL7 is the standards organization behind several healthcare data exchange standards, while FHIR is one of its modern standards. The comparison most integration teams need to understand is HL7 v2 vs. FHIR: one relies primarily on structured messages exchanged between systems, while the other organizes clinical data into reusable resources that can be exchanged through several communication patterns.
That distinction matters when connecting an existing EHR to a laboratory system, sharing patient records with another provider, or building an application that retrieves clinical data through an API. Choosing the right approach depends on the systems already in place, the data that needs to move, and how the receiving application will use it.
The distinction is not simply old technology versus new technology. HL7 v2 still supports many established hospital workflows, and FHIR does not automatically replace those connections. In fact, U.S. hospital adoption shows why both matter: an ASTP analysis of hospital technology capabilities found that 70% of hospitals enabled patient access through apps configured to meet FHIR specifications in 2024. That growing use of FHIR APIs exists alongside established messaging infrastructure that hospitals still depend on.
Understanding where each standard fits helps healthcare organizations plan integrations without disrupting systems that already support patient care.
Key Takeaways
- HL7 is a family of healthcare data exchange standards, while FHIR is one standard developed by HL7 International.
- The most common practical comparison is HL7 v2 vs. FHIR. HL7 v2 uses structured messages, while FHIR organizes clinical information into reusable resources.
- HL7 v2 remains widely used for hospital workflows such as admissions, discharges, transfers, orders, and laboratory results.
- FHIR supports modern data exchange through RESTful APIs, messaging, documents, and other exchange patterns. It is not limited to REST APIs.
- FHIR does not automatically replace HL7 v2. Many healthcare organizations use both standards in a hybrid integration architecture.
- Converting HL7 v2 messages into FHIR resources requires more than matching segments to resources. Clinical context, terminology, references, and local implementation rules all matter.
What Is HL7 in Healthcare?

Health Level Seven (HL7) is a standards development organization that creates frameworks for exchanging, integrating, sharing, and retrieving electronic health information. Its standards help healthcare systems communicate even when they use different applications, data structures, and vendors.
HL7 International develops several standards, including:
- HL7 Version 2 (v2): A messaging standard used to exchange clinical and administrative information between healthcare systems.
- HL7 Version 3 (v3): A standards framework based on a more formal reference information model.
- Clinical Document Architecture (CDA): A standard for representing clinical documents, such as discharge summaries and consultation notes.
- Fast Healthcare Interoperability Resources (FHIR): A standard that organizes healthcare information into modular resources for exchange and reuse.
These standards address different data exchange requirements. For example, a hospital may use HL7 v2 messages to notify its laboratory system about an order, while CDA supports the exchange of a structured clinical document.
HL7 v2 remains particularly important in hospital environments. It supports communication between electronic health records (EHRs), laboratory information systems (LIS), radiology information systems (RIS), pharmacy applications, and other departmental systems.
Its messages typically use a delimited text format, with segments identifying different parts of the information. Systems commonly exchange these messages through transport mechanisms such as the Minimal Lower Layer Protocol (MLLP), although the transport method depends on the implementation.
The HL7 Version 2 product overview describes v2 as a widely implemented standard for exchanging clinical information across centralized and distributed healthcare environments.
What Is FHIR in Healthcare?

Fast Healthcare Interoperability Resources (FHIR) is an HL7 standard for representing and exchanging healthcare information through modular, standardized data structures called resources.
Instead of packaging information primarily into large, delimited messages, FHIR defines resources for individual healthcare concepts. These include:
- Patient: Demographic and administrative information about a patient.
- Practitioner: Information about a healthcare professional.
- Encounter: Details of a patient interaction with a healthcare provider.
- Observation: Clinical measurements and findings, such as blood pressure and laboratory values.
- Condition: A patient’s health conditions and diagnoses.
- MedicationRequest: Information about a medication order or prescription.
- AllergyIntolerance: Details of a patient’s allergies and intolerances.
- DiagnosticReport: A report containing diagnostic findings, such as laboratory or imaging results.
Each resource has a defined structure, data elements, and relationships with other resources. Applications can retrieve, create, update, or search supported resources through a FHIR server.
For example, a patient-facing application could retrieve a patient’s demographic information from a Patient resource, medication orders from MedicationRequest, and laboratory findings from Observation resources. The application does not need to interpret an entire HL7 v2 message to access each type of information.
FHIR commonly uses JSON or XML to represent resources. Its RESTful API also defines interactions through HTTP methods, including GET, POST, PUT, and DELETE, depending on the server’s supported capabilities and authorization rules.
However, FHIR is not exclusively a REST API standard. It also supports messaging, document-based exchange, and other services. The official FHIR specification describes these different capabilities and resource categories.
FHIR also supports implementation guides and profiles that constrain or extend the base specification for particular use cases. For example, the U.S. Core Data for Interoperability (USCDI) and US Core implementation guide help define standardized data expectations for U.S. healthcare exchange.
A broader understanding of the systems, architecture, and standards involved is available in our healthcare software development guide.
What Is the Difference Between HL7 and FHIR?
The main difference is that HL7 refers to an organization and a family of healthcare standards, while FHIR is one specific standard within that family. For practical integration decisions, the comparison usually focuses on HL7 v2 and FHIR.
HL7 v2 exchanges information through structured messages containing segments and fields. FHIR represents healthcare information through resources that applications can access and exchange using defined interfaces.
HL7 v2 vs. FHIR: Key Differences
| Comparison Factor | HL7 v2 | FHIR |
| Data structure | Messages containing segments, fields, and components | Modular resources with defined data elements |
| Exchange model | Primarily event-driven messaging | RESTful APIs, messaging, documents, and services |
| Data format | Commonly pipe-delimited text (ER7) | Commonly JSON or XML; other representations are supported |
| Communication | Often uses MLLP or other configured transports | HTTP for RESTful interactions; other exchange patterns are supported |
| Data access | Systems exchange messages containing relevant events or information | Applications can access supported resources through defined interactions |
| Extensibility | Z-segments, local conventions, and implementation-specific variations | Extensions, profiles, and implementation guides |
| Common use cases | ADT notifications, orders, laboratory results, and internal hospital interfaces | Patient-facing applications, EHR APIs, and modern application integrations |
| Integration requirements | Message parsing, routing, transformation, and acknowledgment handling | Resource access, authorization, profile validation, and terminology handling |
| Legacy compatibility | Deeply embedded in many existing hospital systems | Often introduced alongside established infrastructure |
The table describes typical implementations, not absolute limitations. For example, FHIR can support messaging and document exchange, while HL7 v2 can be transformed into data structures used by modern applications.
How Do HL7 Messages Differ From FHIR Resources?
The structural difference becomes clearer when looking at a simplified HL7 v2 admission message and a FHIR Patient resource.
Example of an HL7 v2 ADT message:
MSH|^~\&|REG|HOSPITAL|EHR|HOSPITAL|202611231030||ADT^A01|MSG0001|P|2.5 EVN|A01|202611231030 PID|1||123456^^^HOSPITAL^MR||DOE^JOHN PV1|1|I|ICU^101^1
This example represents an ADT A01 admission notification. Its segments carry different types of information:
- MSH identifies the message structure, sending and receiving applications, and other message metadata.
- EVN contains event-related information.
- PID carries patient identification and demographic details.
- PV1 contains patient visit information, such as the patient class and assigned location.
A Simplified FHIR Patient Resource:
{ "resourceType": "Patient", "id": "123456", "name": [ { "family": "Doe", "given": ["John"] } ] }
The FHIR representation identifies the resource type and organizes patient information into named fields. Other related information, such as the hospital admission and assigned location, would generally be represented through an Encounter resource and associated references.
This is an important distinction: an HL7 v2 message does not necessarily convert into one FHIR resource. A single message can contain information that maps to multiple related resources. The mapping depends on the message type, field content, clinical context, terminology, and implementation rules.
When Should You Use HL7 v2 vs. FHIR?
The right standard depends on the systems involved, the integration purpose, and the type of data exchange required. HL7 v2 is often the practical choice for established hospital messaging, while FHIR is well suited to applications that need standardized access to individual clinical data elements.
When Does HL7 v2 Make Sense?
HL7 v2 is a strong option when an organization needs to connect existing clinical and administrative systems that already support v2 messaging.
Common use cases include:
- Patient admission and discharge: ADT messages notify connected systems when patients are admitted, transferred, or discharged.
- Laboratory orders and results: ORM messages can communicate orders, while ORU messages carry observation and result information.
- Scheduling: SIU messages exchange appointment and scheduling information.
- Departmental system integration: Hospitals use v2 interfaces to connect EHRs with LIS, RIS, pharmacy, billing, and other applications.
- Established workflows: Organizations can continue using existing interfaces when replacing them would introduce unnecessary operational risk.
For example, a hospital may already have an HL7 v2 interface between its EHR and laboratory information system. If that connection reliably transfers orders and results, replacing it with FHIR may not offer enough value to justify the migration.
HL7 v2 is also useful when the receiving system does not expose a suitable FHIR API but supports established v2 interfaces.
When Does FHIR Make Sense?
FHIR is often a better fit when applications need structured access to healthcare information through standardized interfaces.
Typical use cases include:
- Patient-facing applications: Mobile and web apps retrieve authorized patient information from an EHR.
- Third-party healthcare applications: External applications connect to EHR data through supported FHIR APIs.
- Clinical data access: Applications retrieve resources such as Patient, Encounter, Condition, Observation, and MedicationRequest.
- Healthcare data exchange: Organizations build integrations around standardized resources and implementation guides.
- Modern application development: Development teams need a consistent data model for connecting different healthcare applications.
For example, a patient engagement application may need to retrieve demographics, medications, allergies, appointments, and laboratory results from an existing EHR. FHIR APIs can expose these data types through their corresponding resources, provided the EHR supports the required interactions and the application has appropriate authorization.
The actual capabilities still depend on the EHR vendor, its FHIR version, supported profiles, available resources, and access policies. A FHIR endpoint does not guarantee access to every resource or operation.
Is FHIR Replacing HL7?

No. FHIR is not replacing the entire HL7 standards family, and it has not made HL7 v2 obsolete. FHIR is itself an HL7 standard. It provides a different approach to exchanging healthcare information, but many hospitals still rely on v2 interfaces for established clinical workflows.
Replacing an existing interface involves more than changing the data format. Hospitals must account for connected applications, message triggers, clinical workflows, vendor support, terminology, and operational dependencies.
For example, a hospital may use HL7 v2 to send laboratory results from its LIS to the EHR. At the same time, it may expose those results through FHIR APIs so an authorized patient application can retrieve them.
A full transition may make sense when an organization is modernizing its integration architecture, replacing legacy systems, or consolidating interfaces. Even then, the migration needs to account for historical data, message dependencies, and downstream applications.
How Do HL7 and FHIR Work Together?

HL7 v2 and FHIR can work together through an integration layer that receives messages, interprets their content, transforms relevant data, and makes it available in FHIR-compatible structures.
A hybrid architecture allows hospitals to preserve established connections while supporting applications that need modern API-based access.
How Does HL7 v2-to-FHIR Transformation Work?
Consider a hospital that receives laboratory results through an HL7 v2 ORU message but needs to make those results available to a patient-facing application through FHIR.
The integration flow may look like this:
- A clinical event occurs: A laboratory completes a test and generates a result.
- The LIS sends an HL7 v2 message: The system creates an ORU message containing patient, order, and observation information.
- The interface engine receives the message: Middleware accepts the message and checks its structure.
- The integration layer parses the segments: It identifies relevant information from segments such as PID, OBR, and OBX.
- The data is mapped to FHIR resources: Patient information may map to a Patient resource, while test findings may map to Observation resources. Depending on the report and workflow, a DiagnosticReport may also be appropriate.
- The resources are validated: The integration layer checks required fields, references, terminology, and applicable profiles.
- The application retrieves the data: An authorized application accesses the available FHIR resources through the FHIR server.
HL7 v2 message → Interface engine → Data transformation → FHIR resources → Connected application
This is not a universal one-to-one conversion process. The integration layer must preserve relationships between the patient, order, observation, and report. It may also need to resolve local codes, normalize units, handle missing fields, and prevent duplicate resource creation.
HL7 International publishes a Version 2 to FHIR Implementation Guide, which documents mappings between v2 messages, segments, data types, and vocabulary and FHIR resources. Its mapping approach illustrates why conversion requires context rather than simple segment-to-resource matching.
What Role Does an HL7 Interface Engine Play in Healthcare Integration?
An HL7 interface engine acts as middleware between healthcare applications. It receives data from one system, processes it according to configured rules, and routes it to the appropriate destination.
In a hybrid HL7 and FHIR environment, the interface engine can help translate between legacy messages and modern resource-based interfaces.
Its responsibilities commonly include:
- Message reception: Accepting HL7 v2 messages from connected systems.
- Message parsing: Reading segments, fields, components, and message types.
- Data transformation: Converting information between HL7 v2, FHIR, and other formats.
- Message routing: Directing data to the appropriate EHR, LIS, RIS, pharmacy, or other application.
- Acknowledgment handling: Processing acknowledgments and managing delivery failures.
- Error management: Identifying malformed messages, missing fields, and mapping failures.
- Monitoring: Tracking message status, processing errors, and interface availability.
For example, an interface engine can receive an ADT message from a hospital registration system and route relevant patient admission information to the EHR, billing platform, and other connected systems.
In a FHIR integration, middleware may also transform incoming v2 data into FHIR resources before storing or exposing them through a FHIR server.
The engine does not automatically guarantee accurate data exchange. Mapping rules, terminology handling, message validation, and monitoring still need to be configured and maintained. Organizations planning this architecture may need specialized system integration services to connect existing applications and manage data flows.
What Should You Consider When Choosing HL7 or FHIR Integration?
The decision should begin with the integration requirements, not the assumption that one standard is always better. Healthcare organizations need to evaluate their existing systems, data exchange patterns, vendor capabilities, security requirements, and long-term maintenance needs.
| Decision Factor | Questions to Ask | What It Means for the Integration |
| Existing infrastructure | Do connected systems already support HL7 v2, FHIR, or both? | Preserve reliable interfaces where possible and identify gaps before introducing new connections. |
| Integration purpose | Does the workflow involve event notifications, clinical messages, or application-based data access? | Use messaging where event-driven exchange is required and FHIR where resource-based access fits the workflow. |
| EHR capabilities | Which FHIR versions, resources, profiles, and interactions does the vendor support? | Confirm actual API capabilities rather than assuming full FHIR support. |
| Data requirements | Which clinical and administrative data elements need to move? | Define resource mappings, message fields, terminology, and data relationships. |
| Authorization | Who needs access, and what data can each application retrieve or update? | Configure authentication, authorization, scopes, and role-based access. |
| Transformation needs | Must information move between HL7 v2, FHIR, CDA, or proprietary formats? | Plan mapping, validation, error handling, and terminology normalization. |
| Operational impact | Could the integration affect patient care or existing departmental workflows? | Test interfaces and plan deployment around clinical operations. |
| Maintenance | Who will monitor interfaces, resolve errors, and manage vendor changes? | Establish ownership, monitoring, documentation, and support procedures. |
How Do Security and HIPAA Requirements Affect the Decision?
Neither HL7 v2 nor FHIR automatically makes an integration HIPAA-compliant. The organization must protect electronic protected health information (ePHI) throughout data transmission, processing, storage, and access.
The HIPAA Security Rule requires regulated entities to implement appropriate administrative, physical, and technical safeguards. Relevant technical controls include access control, audit controls, integrity protections, authentication, and transmission security. The HHS summary of the HIPAA Security Rule explains these obligations.
For HL7 v2 integrations, security planning should cover protected network connections, message routing, endpoint access, and safeguards for data stored in interface-engine logs or queues.
For FHIR integrations, teams should also assess API authentication, authorization scopes, token handling, access policies, and audit logging. SMART on FHIR can support application authorization, but implementing it does not remove the need for broader security controls.
Both approaches require careful handling of patient identifiers, access permissions, error logs, and data retention. Development teams should avoid exposing PHI or authentication tokens in application logs and should apply access controls based on the minimum information each user or system needs.
Organizations building integrations should also consider their responsibilities under HIPAA, including applicable business associate arrangements and vendor access. These requirements need to be addressed in the wider design of custom healthcare software with HIPAA safeguards.
What Does It Take to Implement and Maintain an HL7 or FHIR Integration?
Implementation involves more than connecting two endpoints. The integration team needs to define the data exchange requirements, confirm system capabilities, configure mappings, test clinical workflows, and monitor the connection after deployment.
A typical implementation process includes:
- Assess the systems: Identify the EHR, LIS, RIS, pharmacy, and other applications involved. Document their supported standards and integration methods.
- Define data requirements: Specify the information that needs to move, its source, its destination, and how frequently it must be exchanged.
- Confirm vendor capabilities: Review available HL7 interfaces, FHIR endpoints, supported resources, implementation guides, and authorization requirements.
- Design the integration architecture: Decide whether to use direct messaging, FHIR APIs, an interface engine, or a hybrid approach.
- Configure mappings and validation: Define how data elements, identifiers, codes, and references will move between systems.
- Test the integration: Validate message delivery, resource access, data accuracy, error handling, security, and end-to-end clinical workflows.
- Deploy and monitor: Release the connection in a controlled manner, monitor failures, and maintain compatibility as connected systems change.
Testing should cover more than whether a message or API request succeeds. Teams need to confirm that the receiving system interprets the information correctly, that patient and encounter references remain accurate, and that errors do not silently produce incomplete records.
Organizations that need application-specific endpoints or custom data exchange logic may also require custom API development services.
Conclusion
HL7 and FHIR are not competing standards in the way they are sometimes presented. HL7 is the broader standards family, and FHIR is one of its standards. The practical choice is usually between continuing with HL7 v2 messaging, introducing FHIR-based access, or combining both to support different healthcare workflows. Existing infrastructure, EHR capabilities, data requirements, and operational impact should guide that decision.
Healthcare integrations need to work with clinical systems already in use while supporting new applications and data exchange requirements. If you are planning an integration strategy or building connected healthcare applications, explore Cubix healthcare software development services to discuss the architecture and engineering requirements.
Have an Integration Challenge? Let's Solve It Together
Contact Us
Frequently Asked Questions
1. Is FHIR Part of HL7?
Yes. FHIR is a healthcare data exchange standard developed by HL7 International. It belongs to the HL7 family of standards alongside HL7 v2, HL7 v3, and CDA.
2. Is HL7 v2 the Same as FHIR?
No. HL7 v2 is a message-based standard that organizes information into segments and fields. FHIR uses modular resources and supports RESTful APIs, messaging, documents, and other exchange patterns.
3. Is FHIR Better Than HL7?
Neither is universally better. FHIR is often suitable for modern API-based applications, while HL7 v2 remains useful for established hospital messaging workflows. The right choice depends on the systems and use cases involved.
4. Can HL7 v2 and FHIR Work Together?
Yes. An interface engine or integration layer can receive HL7 v2 messages, transform relevant information into FHIR resources, and make it available to applications that support FHIR.
5. Does FHIR Replace HL7 v2?
No. FHIR is part of the HL7 standards family, but it does not automatically replace HL7 v2. Many healthcare organizations use both standards to support different integration requirements.
6. What Is an HL7 Interface Engine?
An HL7 interface engine is middleware that receives, parses, transforms, and routes healthcare messages between applications. It can also support data conversion between HL7 v2 and FHIR.
7. Does FHIR Always Use REST APIs?
No. FHIR supports RESTful APIs, but its resources can also be used in messaging, document-based exchange, and other service patterns. REST is a common implementation approach, not the only way to use FHIR.


