HL7 interface testing for a live interface means auditing eight things: the inventory of feeds and partners, conformance to the implementation guide, code mapping, acknowledgment handling, retries and duplicates, monitoring for silent feeds, HIPAA transmission security, and ownership. Score each area 0 to 2 with evidence, fix every zero first, and retest before partners upgrade.
Plenty of interfaces get tested once, at go-live, and then run for years on trust. The partner upgrades their LIS, a new test code shows up, someone changes a firewall rule, and the feed degrades until a clinician asks where a result went. The checklist below is the one we use on existing interfaces. It is built around HL7 v2, with notes on what changes for FHIR APIs and X12 EDI, and it works on a commercial engine or a homegrown listener.
What does an HL7 interface audit check?
An HL7 interface audit checks whether each production feed still does what its spec says, fails loudly when it breaks, and protects the PHI it carries. Go-live testing ran against test data; the audit looks at production behavior and the error queues that have built up since.
Conformance and mapping concern the messages themselves. The other six areas cover what happens around them: failure handling, who watches the feed, how it is secured, and who owns it when a partner changes something. A message validator only reaches the first two, and in our audits most of the real problems turn up in the rest.
The scored HL7 interface audit checklist
Score each row 0 (missing), 1 (partly in place or undocumented), or 2 (in place, with evidence such as a file, log, dashboard, or test result). A 0 in the acknowledgment, monitoring, or security rows is a fix-this-week item, since those gaps lose or expose data.
| Area | What to check | Evidence that earns a 2 | Score (0 to 2) |
|---|---|---|---|
| Inventory | Every endpoint, transport, partner, message type, trigger event, HL7 version, and normal hourly volume is listed | An interface register that matches the engine's channel list | |
| Conformance | Sample messages validate against the partner spec or the implementation guide profile | Validator reports for each message type, dated within the last year | |
| Mapping and code sets | Local test codes map to LOINC, units map to the code system the guide requires, unmapped codes are caught | A versioned mapping table and a report of unmapped values | |
| Acknowledgments | The ACK mode (original or enhanced) is known, MSA-2 matches MSH-10, AE and AR responses are acted on | Logs showing ACK pairing and a ticket trail for rejected messages | |
| Retries and duplicates | Retry limits, an owned dead-letter queue, and duplicate detection exist and are tested | Configured retry policy and a replay test showing no duplicate results posted | |
| Monitoring and alerting | Alerts fire on queue depth, connection loss, error rate, and a feed that goes quiet; backlog drain time after an outage is known | Alert rules plus a record of the last alert and who responded | |
| Security and HIPAA | MLLP runs inside TLS or a VPN, each SFTP key has an owner and issue date and is revoked when people or partners leave, logs are reviewed, non-treatment feeds follow minimum necessary, BAAs exist where the partner is a business associate | Network diagram, key inventory, audit log review record, BAA list | |
| Documentation and change control | Each interface has a named owner, a current spec, and a retest plan for partner upgrades | Owner list, spec repository, and a regression test pack |
The totals are our triage rubric, not a validated scale. We treat 14 to 16 as healthy and anything under 10 as a reason to stop adding feeds until the gaps close. We run the full audit yearly and rerun the affected rows whenever a partner changes systems, versions, or connectivity.
Step 1: build the interface inventory
Every later test needs a list of what to test and a baseline to compare against, so the inventory comes first. For each interface, record the source and destination systems, the transport (MLLP over TCP, SFTP, HTTPS API), the partner contact, the message types and trigger events (ADT^A01, ORM^O01, ORU^R01), the HL7 version in MSH-12, and normal volume by hour.
Pull the list from the engine's channel configuration and compare it with firewall rules and partner contracts. Mismatches are where the risk sits: a firewall opening for a channel nobody remembers, or a contract for a feed that was quietly turned off. If lab feeds dominate your inventory, our guide to HL7 lab interfaces walks through the ORM and ORU flow in more detail.
How do you validate HL7 messages against the spec?
Validate a sample of each message type against the partner's specification or a machine-readable conformance profile, including corrected results, cancellations, and long free-text notes. Use synthetic or de-identified messages where you can; production samples should stay inside systems covered by the same safeguards as the interface.
For HL7 v2, NIST built the best-known free tooling. Its HL7 v2 conformance testing tools support context-free testing against the technical requirements and context-based testing with directed test cases. The General Validation Tool (GVT) hosts validators built from IGAMT profiles and TCAMT test plans.
Those tools have moved. The NIST Health IT Program is ending, and its legacy website says most testing tools now live at Valitheus, operated by Prometheus Computing. NIST's GVT information sheet says that move finished on September 21, 2026 with no GVT data transferred; users had to re-establish IGAMT-2 and TCAMT accounts through a consent form and re-push their guides and test plans. The first IGAMT went offline June 30, 2026, and the LRI lab test tool was archived in September 2026, with artifacts available for local install. If your profiles lived in the old NIST tools, confirm they made the trip.
FHIR interfaces need two kinds of checks. The $validate operation and official Java validator check structure, cardinality, value domains, terminology bindings, invariants, and profiles. The API behavior in the FHIR RESTful specification needs its own tests: does your client follow next links on paged searches, read the OperationOutcome on 4xx and 5xx errors, and handle a 412 when an If-Match update hits a version conflict? For SMART backend services, the SMART App Launch specification says expires_in should not exceed 300 seconds, so confirm long syncs refresh tokens.
For X12, the acknowledgments do part of the validation. A TA1 reports whether the ISA/IEA envelope was accepted or rejected, a 999 reports syntax and implementation guide errors, and a 277CA (005010X214) reports business-rule errors on individual claims, per CMS's 5010 acknowledgment overview. Payers document TA1 and 999 usage under 005010X231A1, as in Wisconsin Medicaid's TA1 companion guide. An accepted 999 does not mean an accepted claim, and if your 999s and 277CAs land in a folder nobody reads, that row scores a zero. Our post on 837 and 835 claim and remittance EDI covers that side.
How do you audit code mapping and units?
Audit mapping separately, because a message can pass every structural check and still be clinically wrong when a local code maps to the wrong LOINC term or a unit is dropped. Sample results and trace each coded value back to its source.
In an ORU^R01, OBX-3 holds the observation identifier; the HL7 v2.5.1 chapter 7 definition gives 8625-6^P-R interval^LN as its example, where LN marks LOINC, the international standard for identifying health observations, measurements, and documents. Many labs send a local code first and LOINC second, or only a local code. Check which component your receiver reads and what it does with a code that has no map entry. It should hold the message or raise an alert; posting under a generic name hides the problem from everyone downstream.
The base v2.5.1 standard defaults OBX-6 units to ISO+ abbreviations, while many implementation guides call for UCUM. California's electronic lab reporting specification expects a UCUM code in the first triplet of OBX-6 and a local code in the second. If one partner sends mg/dL as free text and another sends coded UCUM, your mapping layer has to normalize both.
Then test status transitions in OBX-11, a required field. A preliminary result (P) can legitimately create a new observation. A corrected result (C) replaces previously transmitted final data with the same observation ID and sub-ID, so the receiver has to match on patient, order, OBX-3, and OBX-4 first. Send P, then F, then C for one test and confirm the chart shows a single current value; then send a late P after an F and confirm it doesn't overwrite the final. Duplicate results from this sequence are among the defects we find most often in lab feeds.
Which HL7 acknowledgment mode is your interface using?
If MSH-15 and MSH-16 are both empty, the interface uses original acknowledgment mode: one application ACK with AA, AE, or AR in MSA-1. If either field is valued, enhanced mode rules apply, which can split the response into a commit ACK (CA, CE, CR) and a later application ACK (AA, AE, AR).
That rule comes from the HL7 v2.5.1 control chapter. Its enhanced-mode section applies when at least one of the two fields is not null, while the field definition says MSH-16 is required for enhanced mode, so flag any message that values only one and confirm intent with the partner. Both fields use HL7 Table 0155: AL (always), NE (never), ER (error or reject only), and SU (successful completion only). The standard treats original mode as equivalent to enhanced mode with MSH-15 = NE and MSH-16 = AL. A CR means the receiver rejected the message type, version, or processing ID; a CE means it couldn't accept the message for another reason, such as a sequence number error.
Here is an illustrative, abbreviated exchange with fake data. The sender asks for both acknowledgments:
MSH|^~\&|LABSYS|TESTLAB|EHR|TESTCLINIC|20261031083000||ORU^R01^ORU_R01|MSG000123|P|2.5.1|||AL|AL
PID|1||123456^^^TESTCLINIC^MR||TEST^PATIENT||19800101|F
OBR|1||LAB998877|2345-7^Glucose^LN|||20261031070000||||||||||||||||||F
OBX|1|NM|2345-7^Glucose^LN||95|mg/dL^mg/dL^UCUM|70-99||||Q
The receiver commits the message to storage and returns an accept ACK, with MSH-15 and MSH-16 not valued:
MSH|^~\&|EHR|TESTCLINIC|LABSYS|TESTLAB|20261031083001||ACK^R01^ACK|ACK000501|P|2.5.1
MSA|CA|MSG000123
Application processing then finds Q in OBX-11, which is not a valid result status, and returns an error that points at the field:
MSH|^~\&|EHR|TESTCLINIC|LABSYS|TESTLAB|20261031083005||ACK^R01^ACK|ACK000502|P|2.5.1
MSA|AE|MSG000123
ERR||OBX^1^11|103^Table value not found^HL70357|E
In the audit, confirm that MSA-2 echoes the original MSH-10, since that is how the sender pairs a response with its message. In v2.5.1 the ERR segment uses ERR-2 for location, ERR-3 for the Table 0357 error code, and ERR-4 for severity; ERR-1 survives only for backward compatibility, so older interfaces may report errors there. And confirm someone acts on AE and AR responses. An engine that logs an AE and moves on has lost that result as far as the clinician is concerned.
Error handling: retries, dead letters, and duplicate detection
Every interface needs a bounded retry policy, a dead-letter queue with a named owner, and a way to stop a resent message from posting twice. Test all three by breaking the connection on purpose in a test environment.
Retries should back off and stop. An engine that retries forever on a message the receiver will always reject blocks everything behind it, which is how one bad character in a PID segment can hold up a morning of results. After the limit, the message should land in the dead-letter queue with its error attached and a written review deadline.
Duplicates come in two kinds. Transport replays happen when an ACK is lost and the sender resends. The v2.5.1 control chapter says acknowledgments alone can prevent out-of-sequence transactions, but "only the use of sequence numbers can prevent duplicate transactions." That protocol, in MSH-13, is optional and rarely used, so most receivers check MSH-10: replay a message with the same MSH-10 and confirm nothing posts twice. Business duplicates are harder. After a partner fails over, the same result can arrive with a new MSH-10, and only matching on order number, OBX-3, and observation time catches it.
Monitoring: how to catch a feed that silently stopped
Alert on queue depth above normal, a dropped connection, a rising error or AE rate, and message volume below the hourly baseline. The volume alert is the one that catches an outage with no errors.
Silent feeds come up in our audits more than any other finding. A partner changes an IP address, a certificate expires on their side, or an upstream system stops generating a trigger event, and your engine sees an idle connection that looks like a quiet afternoon. A reasonable starting rule: if an ADT feed that normally sends a few hundred messages an hour sends none for 30 minutes during business hours, page someone, then tune per feed. A weekly batch file needs a different rule.
Also stop a test channel for an hour, restart it, and time how long the backlog takes to drain. For the score, ask when each alert last fired and what happened next. An alert that goes to an unmonitored mailbox earns a 1 at best.
Security and HIPAA checks for MLLP, SFTP, and APIs
Confirm that PHI in transit is protected, that access is logged and reviewed, that each feed carries only what its use requires, and that BAAs exist where they apply. Transport and logging fall under the Security Rule; minimum necessary and BAAs come from the Privacy Rule, which has treatment exceptions for both.
The MLLP transport specification defines a start block of 0x0B, an end block of 0x1C followed by 0x0D, and character encoding rules. It says nothing about encryption or authentication, so plain MLLP over TCP is cleartext. 45 CFR 164.312(e)(1) requires transmission security and lists encryption as addressable. Under 164.306(d)(3), that means implementing it if reasonable and appropriate, or documenting why not and implementing an equivalent alternative where reasonable. HHS's Security Rule summary says plainly that addressable does not mean optional. The rule names no technology, but TLS or a site-to-site VPN around MLLP is the usual answer. HHS published a proposed Security Rule update in January 2025; the Federal Register shows no final rule yet, so audit against the current text.
For SFTP, list every key, its holder, its issue date, and whether departed staff or retired partners still have one. For logs, 164.312(b) requires audit controls, and 164.308(a)(1)(ii)(D) requires regular review of records such as audit logs. The engine's message logs usually contain full PHI, so check who can read them.
The minimum necessary standard (45 CFR 164.502(b) and 164.514(d)) doesn't apply to disclosures to a provider for treatment, so a results feed to an ordering clinic is out of scope. A feed to a billing or analytics vendor that forwards full diagnosis and insurance segments because the template included them is a common finding. HHS's business associate guidance says a physician needs no BAA with a clinical laboratory to disclose PHI for treatment, but vendors that host or process the data for you, such as a cloud interface engine or clearinghouse, usually are business associates. Check those contracts against HHS's sample BAA provisions.
Documentation, ownership, and partner change management
Each interface needs a named owner, a current spec, and a regression test pack you can rerun when a partner upgrades. Ask who gets called when the feed breaks at 2 a.m., and whether that name is written down anywhere.
Keeping the partner spec, mapping tables, and engine configuration export together in version control is good practice rather than a regulation. The security procedures for these interfaces do fall under 45 CFR 164.316(b), which requires keeping Security Rule documentation for six years from creation or the date it was last in effect, whichever is later.
A regression pack for an HL7 v2 lab or ADT feed should include at least these synthetic or de-identified cases, each with a written expected result:
- One valid message for every message type and trigger event the interface carries.
- A message missing a required field, which should come back AE or AR with an ERR segment.
- A preliminary, final, and corrected result for the same test, plus a late preliminary after the final.
- A cancellation and, for ADT feeds, a patient merge.
- A replay of an already accepted MSH-10.
- A long free-text note and a value containing escaped delimiters.
- An unmapped local code, which should land in a hold queue.
Run the pack in the partner's test environment before any upgrade cutover, including a move of some feeds from v2 to FHIR. Our comparison of HL7 v2 and FHIR covers where each fits.
Where to start this week
Put the channel list from your interface engine next to your firewall rules and partner contracts. Rows that appear in one list but not the others are where to look first. Then pull last week's AE and AR acknowledgments and check whether anyone acted on them.
If you want a second set of eyes, audits like this are part of our HL7, FHIR, and EDI integration services, and the deliverable is this scored checklist with the evidence behind each score.