How We Audit HL7 Interfaces Across a Complex EMR Environment
Last Updated on October 26, 2026
Quick Summary
This insight explains how we audited HL7 interfaces across a complex EMR environment: why the client needed an audit, how we identified message failures and data mapping issues, the security risks we uncovered, how we prioritised fixes, and the seven phases we followed to improve interface reliability, protect patient information, and strengthen ongoing monitoring.
Table of Contents
Introduction
Most healthcare systems run many IT systems and not a single EMR system. There are usually numerous EMRs in addition to the laboratory, imaging, pharmacy, and billing solutions. These systems are interconnected through various HL7 interfaces created over time by different groups of people. This HL7 communication channel does not merely constitute legacy software; according to the national survey done in 2023 by ASTP/ONC, 96 percent of all health information exchanges receive HL7 v2 ADT messages. The risk involved when such situations become evident is very high.
This is the stance held by one of our clients, a healthcare system with [Y] EMRs through a series of acquisitions. The lab results feed was not providing information for [N] hours and the clinicians found out about it before the IT department did. The following is an Insight on the seven stages of our audit, the results of each stage, and the reason why we prioritize some of the solutions.
Why the Client's Interface Estate Needed an Audit of HL7 Interfaces
The estate of the client developed in a way that is characteristic of such estates. Every acquisition came with its own EMR and engine channels, and every vendor project brought new feeds, but the people who set up the first interfaces were long gone. The HL7 interfaces worked on most days, but nobody had an overall view of them.
What Was Happening
Why It Was Risky
Who Felt It
No one could say how many interfaces were live
Unknown feeds cannot be secured or monitored
IT leadership
Several feeds had no named owner
Failures sat unresolved
Integration team
Lab results stalled with no alert
Results reached clinicians late
Integration team
An unpatched engine version was in production
No security fixes were arriving
Security team
PHI moved over plain MLLP
Patient data travelled as readable text
Compliance team
None of these was a coding failure. Each was a visibility failure, so visibility became the starting point for everything that followed.
Phase 1: Creating an Inventory of HL7 Interfaces
A register is done before testing any message. Each task done by our interoperability engineering team starts with this, because when an audit is done without a register, it will only check on the feeds that the person mentioned.
Four sources were used to compile the register: channel export from the interface engine, firewall and port numbers, vendor specifications, and brief interviews with each application owner. If there were any conflicts in the sources, then the network data was used, as it represented what is connected.
Register Field
Why It Matters
Source and destination
Shows every system that touches patient data
Message type and trigger event (ADT A01, ORU R01, SIU S12, DFT P03)
Shows which workflow breaks if the feed fails
HL7 version (MSH-12)
Exposes version drift between senders
Transport and daily volume
Flags plain-text transport and sets alert baselines
Business owner and BAA party
Gives every failure an owner and every partner a signed agreement
The register surfaced the first surprise: [N] orphaned HL7 interfaces were still sending patient traffic to systems the client had retired. The same discipline is applied on a larger scale, including a normalization layer in a statewide Health Information Exchange (HIE) which processes 4.2 million HL7 messages per day.
Phase 2: Verifying Live HL7 v2 Messages with Conformance Profiles
HL7 testing guidance generally focuses on newer builds.An audit has a different job, because live feeds drift from their original specification through years of upgrades and workarounds. So we validated production traffic, not test files.
For each feed, we sampled real HL7 v2 messages and checked them against XML conformance profiles using NIST’s HL7 v2 validation tooling, which tests each message against the profile’s rules and produces a validation report. This work matters because v2 is not on its way out. Data from ASTP/ONC shows most HIEs still routinely exchange v2 traffic, while FHIR API use is catching up more slowly.
Across the client’s HL7 interfaces, four patterns kept appearing:
Version drift: senders on different MSH-12 versions feeding the same receiver
Z-segment sprawl: custom segments added for one project and never documented
Local codes: result feeds sending local codes instead of LOINC
Identifier gaps: inconsistent assigning authority in PID-3, which weakens patient matching
Phase 3: Mapping PHI Flows, Logs, and Data Mapping Across Systems
Most PHI audits end up at the last step. The more exposed area lies in where the information ends up: debug logs, archives, and replay directories that store the entire copy of patient information far beyond the time of delivery.
PHI was tracked across HL7 interfaces through the components carrying it (PID, NK1, PV1, IN1, and OBX) to where each message ended up being stored. We noted for every storage area who has access to it, how long it is stored there, and whether it is encrypted, and cross-checked every outside vendor against the signed BAA.
Data mapping process was similarly examined. We found that due to [N] downstream systems ignoring A40 merge or A18 events, a patient merged in the primary EHR ends up duplicated elsewhere. It is a patient safety problem, not just a data integrity problem.
The map pays off on the compliance side as well. The HIPAA Security Rule update proposed in January 2025 would require a written technology asset inventory and a network map of ePHI flows. It is still a proposal, and OCR’s regulatory agenda now targets July 2027 for a final rule, while the current rule stays fully enforced.
Phase 4: Testing ACK Handling, Queues, and Error Recovery in the Interface Engine
The feed might appear as “connected” in the dashboard even when it experiences failures. At this point, what was tested is the performance of the feeds under different situations without touching the configuration.
Test
What a Failure Looks Like
HL7 ACK and NAK behavior (AA, AE, AR)
A receiver accepts a message it later drops
Queue wait time
Results reach the chart hours late
Error queue age
Failed messages pile up with no owne
Duplicate detection on MSH-10
Duplicate orders or result
Inactivity alerts
A feed goes quiet and nobody notices
Downtime replay (maintenance window only)
Lost or out of order messages after recovery
The ACK test matters most for HL7 interfaces. InterSystems’ own alerting guidance for HL7 routing notes that applications cannot always be relied on to use ACK codes correctly, which is how a lab feed can stop for hours while every status light stays green.
Phase 5: Checking Security on Every HL7 Interface
The security findings in HL7 work are not often exotic. They tend to be comprised of plain-text communications, open ports, and outdated software, and each one is hard to notice when there is no single owner of the whole environment.
We checked every feed against five points:
Transport: MLLP has no built-in encryption, so we confirmed which feeds used MLLP over TLS or a VPN tunnel
Listeners: open ports, including the common default 2575, reachable from segments that had no need
Access: shared admin accounts and engine consoles without MFA
Logs: debug logging left on after troubleshooting, writing full PHI to disk
Version: whether the engine release still receives fixes
This last item is especially significant today for teams running HL7 interfaces. Mirth Connect version 4.6 saw the consolidation of NextGen under a single commercial license in March 2025, thus making Mirth Connect version 4.5.2 the last open-source version released. Those using this version should come up with a plan: purchase the commercial license, utilize the community Open Integration Engine fork, or find another engine altogether.
Not sure which of your HL7 feeds still send PHI in plain text, or which ones fail without raising an alert?
Our Healthcare Interoperability Services team inventories every feed, tests your engine end to end, and hands you a ranked fix list before the next incident finds the gaps for you.
Phase 6: Defect Prioritization and HL7 v2 to FHIR Transition Plan
The worth of an audit lies in the work order that results from the audit process. By the time the findings log is done, each finding has been prioritized in terms of patient safety, PHI risk, and the effort required to resolve the defect.
Priority
Finding Type
Why It Comes First
Typical Fix
1
Patient safety (stalled results, broken merges)
It reaches the chart
Fix routing and alerts
2
PHI exposure (plain MLLP, PHI in logs, orphaned feeds)
Compliance risk
TLS, log masking, decommission
3
Reliability (silent failures, unowned feeds)
Recurring incidents
Alerts, owners, runbooks
4
Conformance drift
Slow damage to data qualitySlow damage to data quality
Profile fixes, code mapping
Not all findings require replacement of the feed. For each individual case, we have adopted a simple analysis of the following kind: keep it as is on v2 and fix it, put a FHIR layer in front of it for new users, or discontinue it. Internal stable ADT and ORU feeds usually continue on v2, while patient application or payer feeds are more suitable for FHIR.
Phase 7: Setting Up Ongoing HL7 Interface Monitoring After the Audit
The audit process is a snapshot. In the absence of constant monitoring of HL7 interfaces, the register becomes outdated within just a few months; hence, the last stage allows the client to have a method to ensure that the entire picture remains accurate.
Alerts on queue wait, error queue age and feed inactivity, set from each feed’s normal volume
A daily reconciliation of source and destination record counts
A rule that no feed goes live, changes or retires without a register update
A quarterly review of owners, BAAs and encryption coverage
Conclusion
Identifying broken feeds was not the hardest part of conducting this audit. Identifying feeds that seemed fine reporting success while losing transactions, PHI transferred in plain text in a secure environment, or data going to systems no longer used was the difficult part. Structured audits turn unknown risks into known assets with documented owners and monitoring of HL7 feeds. In every health system whose asset has built up over time, the relevant question is not whether feeds are working; it is what feeds can be shown to be safe. If there is doubt as to safety, the Bacancy Technology’s healthcare engineering team can establish the registry, run the tests, and maintain the asset ready for audits even past go-live.
It depends on the number of feeds, the number of engines and how quickly we get read access. [Confirm typical duration with the delivery team.] The inventory phase usually sets the pace, because every later test depends on it.
No, except for the downtime replay test that we schedule during a maintenance window agreed upon in advance. Otherwise, no, since our approach relies on read-only engine exports, network analysis, and passive message sampling.
Absolutely not, if your feed is PHI. Version 4.5.2 is the latest version in the open-source line, while all subsequent ones are available under the license from NextGen. Options here include using 4.6 or more recent releases, moving to Open Integration Engine, or even changing engines.
No, many feeds internal to ADT, ORU, and others work well on v2 and do not get much value out of moving to FHIR. We make a determination based on each feed and move to FHIR when we need it for patients, payers, or our business partners.
No, not directly. The current HIPAA Security Rule requires a risk assessment to include the location and movement of ePHI. The 2025 proposed rule requires a written asset inventory and network map, but it is still only a proposed rule, with the final rule expected in July 2027.
Rajiv Mehta
AI/ML Developer at Bacancy
Versatile tech leader driving innovation across cloud, AI, and full-stack development.