Healthcare Integration For Beginners: HL7v2

Imagine spending your career building modern applications, using the latest tools and frameworks that fit nicely into your toolbox. Then one day, your boss asks you to connect your software product to a system with patient records 😬.

This common scenario is how many of us have entered the space of healthcare data, and some of us never escape. Welcome HL7v2 - The workhorse behind healthcare interoperability.

What are Electronic Health Record (EHR) Systems

EHRs have fundamentally transformed healthcare data management. They enable digital storage and retrieval of patient information, ensuring timely, comprehensive, and accurate data access across care points.

At present, there are connectivity challenges with EHR systems. A single health organization typically uses more than a dozen distinct EHR platforms, many of which struggle to share data with one another. Efforts to integrate these EHRs have been initiated, yet frequently, only systems from the same vendor can synchronize, or they need to be part of a particular network to achieve interoperability.

For many EHR Systems, HL7v2 is the first/only choice for accessing data, and for many integrations it provides some advantages.

Bruh
 HL7v2? Why is that still around?

HL7 (Health Level Seven) version 2, commonly abbreviated as HL7v2, is a messaging standard widely used in the healthcare industry to support clinical and administrative data communication between different software applications.

95% of US healthcare organizations are using HL7 v2.x to exchange clinical information More than 35 countries have HL7 V2.x implementations

HL7 “HL7 Version 2 Product Suite”

Although newer standards such as HL7 version 3 (HL7v3) and FHIR (Fast Healthcare Interoperability Resources) have been introduced, HL7v2 remains relevant for several reasons:

  1. Widespread Adoption: HL7v2 has been in use since the late 1980s, and it has achieved a vast and deep penetration in the healthcare market globally. Many existing health systems and applications are built around this standard.
  2. Interoperability: Many legacy systems that use HL7v2 are still operational. Until these systems are replaced or updated, HL7v2 will remain a critical component in ensuring these systems can communicate with newer technologies.
  3. Cost of Transition: Transitioning from HL7v2 to newer standards involves costs – both in terms of financial investment and effort. This includes redesigning interfaces, retraining staff, and possibly replacing systems that aren’t compatible with the newer standards.
  4. Maturity and Stability: Given its longevity, many of the kinks and issues with HL7v2 have been identified and resolved over time. This has made it a stable and reliable standard for many institutions.
  5. Flexibility: One of the strengths (and criticisms) of HL7v2 is its flexibility. This means that it can be tailored to the specific needs and peculiarities of an institution, but this can also lead to variability in how different organizations implement the standard.
  6. Vendor Support: Due to its widespread use, many health IT vendors still provide robust support for HL7v2, ensuring its continued relevance.
  7. Incremental Migration: As healthcare organizations adopt newer technologies and standards, they often do so incrementally. This means newer systems might use FHIR or HL7v3, but they still need to interface with older systems using HL7v2. In such mixed environments, HL7v2 remains a crucial bridge for data exchange.
  8. Complex Transition: Transitioning from HL7v2 to newer standards isn’t just about technology. It also involves changing workflows, processes, and organizational practices, which can be complex and challenging.

While newer standards like FHIR offer advantages in terms of modern web compatibility, flexibility, and more structured data, the deep-rooted presence of HL7v2 in the healthcare IT ecosystem means it will remain relevant for some time.

Key components to working with hl7v2.

  1. Pick the right tooling: The landscape of tooling healthcare integrations can have a steep learning curve. The skills of your team may dictate a direction that works best for solving the integration needs.
  2. Understand the infrastructure: HL7v2 most commonly leverages a TCP/IP socket, (without built-in security). This surfaces a subtle gap in infrastructure that prevents developers from using modern technologies, especially when security is top of mind.
  3. Security can be layered on: HL7v2 was developed at a time when the emphasis on digital security wasn't as pronounced as it is today. Traditionally the network layer is locked down behind a VPC/VPC and connections tunnel over IPSec with IKE. This can add weeks of stakeholder meetings to integration timelines.
  4. Message flow requires routing: Figuring out where each message should be sent to can be a daunting task. ADT A08 Update messages could easily overrun the workflow if not properly filtered.
  5. It's not JSON: Mapping can be tedious, both the HL7v2 and FHIR specs provide a way to handle custom data. The Z segments in HL7v2 and extensions in FHIR offer the ability to. customize the payload. Mapping turns into a time consuming manual process that ends up being spreadsheet driven rather than api spec.

Tool Reference

NameLanguageDifficultyCostOn premiseDevOps
Mirth Integration EngineJavaHighVaries (owned by NextGen Healthcare); Community Edition availableSits behind your existing Cloud infrastructure VPN, requires configuration.Yes
Google Cloud Healthcare APIAPI basedModerateBased on GCP Pricing; Limited free tier availableLinks to your existing Cloud infrastructure VPN.Yes
RhapsodyProprietaryHighContact sales for pricing; No free versionOn Premise GatewayYes
JitterbitGUI basedModerateVaries by edition and usage; Community Edition availableOn Premise GatewayYes
RedoxAPI basedModerateContact sales for pricing; No free versionOn Premise GatewayYes
IguanaLua (for transformations)ModerateContact sales for pricing; Demo availableOn Premise GatewayYes
MuleSoftJava, options for scripting/connectorsHighVaries by edition and usage; Community Edition availableYesYes
Amazon HealthLakeAWS basedModerateBased on AWS Pricing; AWS services have a free tierSits behind AWS site to site VPN, requires configuration.Yes
Retrohook (Beta)GUI Based (Web)LowContact Sales, free trial versionYes (Web based GUI)No