Integrations

Choosing and Running an Interface Engine

You need an interface engine once you are maintaining more than a handful of point-to-point interfaces, or the moment a single downstream system has to receive data from more than one source. Below that threshold, your EMR's native interfaces plus the vendor's integration service is usually cheaper, simpler, and easier to support. Above it, point-to-point integration turns into an unmaintainable mesh: every new system multiplies the connections you own, and a single field change at the lab breaks four things you did not know were connected.

When You Actually Need One

The honest test is not "how many interfaces do I have" but "how many places would I have to change if a source system changed a field?" Signals that you have outgrown point-to-point:

  • The same result feed needs to reach the EMR and a registry, a research extract, or a population-health tool.
  • You have two systems that both speak HL7 v2 but disagree on segment usage, code sets, or facility identifiers, and someone is reconciling that by hand.
  • An interface failure is discovered by a clinician noticing a missing result, rather than by an alert.
  • You cannot answer "was this message delivered?" without opening a ticket with a vendor.
  • You are adding a third or fourth downstream consumer of the same ADT feed.

If none of those are true, hold off. An engine you cannot staff is a new single point of failure with a license fee attached.

What an Interface Engine Actually Does

Strip away the marketing and an interface engine performs five jobs: it listens for inbound messages, transforms them, routes them to one or more destinations, persists them so nothing is lost across a restart, and tells you when any of that fails. Everything else is packaging.

In a typical practice the traffic is still predominantly HL7 v2 over MLLP — ADT for registration and demographics, ORM/OML for orders, ORU for results, DFT for charges, SIU for scheduling — with FHIR increasingly available for API-style access, app integration, and patient-facing data. Certified EHR technology is required to expose standardized FHIR-based APIs, so a modern engine should be comfortable with both worlds: v2 for the high-volume machine-to-machine feeds you already have, FHIR for the newer request/response integrations. Do not let a vendor talk you out of v2 competence because FHIR sounds more modern; your lab is not rewriting its interface for you.

Hosting Models Compared

ModelWho operates itBest whenWatch out for
EMR vendor's integration serviceYour EMR vendorFew interfaces, standard trading partners, no integration staffPer-interface fees; long lead times; limited visibility into failures; you cannot route to non-EMR destinations
Third-party hosted engine (SaaS)Integration vendorYou want engine capability without running serversPHI leaves your control — a BAA and a data-flow diagram are mandatory; check message-retention and replay policies
Self-hosted engineYouYou have (and will keep) staff who can write transformations and read logs at 2 a.m.Patching, certificates, disk for message archives, and the bus factor of the one person who knows the channel logic

Most independent practices land on either the EMR vendor's service or a hosted engine. Self-hosting is defensible only if integration is a durable, staffed function — not a side duty for whoever is least busy.

Evaluation Criteria That Matter

  1. Message persistence and replay. Can you reprocess yesterday's ORU feed after fixing a mapping bug, without asking the lab to resend? If the answer is no, keep looking.
  2. Observability. Queue depth, per-channel throughput, error counts, and last-message-received timestamps must be visible on a dashboard and exportable to whatever you already alert on.
  3. Transformation transparency. Can you read the mapping logic, diff it, and put it in version control? Drag-and-drop mappers that produce unreadable artifacts become tribal knowledge.
  4. Trading-partner onboarding. Ask how long a new lab interface takes end to end, and who does the work. Get it in the contract.
  5. Standards coverage. HL7 v2 (with the segment quirks your partners actually send), FHIR, X12 if you touch claims, and flat-file/SFTP for the partner who still insists on it.
  6. Exit path. If you leave, do you get your channel definitions and message archive in a usable form?
Ask for a failure demo, not a happy-path demo. Have the vendor show you what the console looks like when a destination is down for an hour: where the messages queue, what alert fires, who gets it, and exactly how you replay the backlog once the destination recovers. Vendors rehearse the happy path. Nobody rehearses this one.

Running It: Queues, Retries, and Error Triage

An interface engine in production is an operations discipline, not a project. The failure that hurts is never the loud one — it is the interface that has been silently dropping a message type for three weeks.

  • Alert on silence, not just on errors. A channel that has received zero messages in an interval where it normally receives hundreds is broken, even though nothing errored. Time-since-last-message is your single most valuable alert.
  • Alert on queue depth trends, not only on hard thresholds. A queue that is growing steadily is telling you the destination is degraded before it fails outright.
  • Give errors an owner and a queue. Errored messages need a triage workflow with a human name attached and a review cadence — otherwise the error folder becomes a graveyard.
  • Distinguish retryable from poisoned. A timeout should retry with backoff. A malformed segment should stop, alert, and wait for a person; retrying it a thousand times just fills the log.
  • Reconcile. Periodically compare source counts against destination counts for each feed. This is how you find the quiet drops that no alert caught.
  • Log ACK/NACK. An acknowledgment you never inspected is not an acknowledgment.

Testing and Change Control

Interface changes are code changes and deserve the same rigor. Keep channel definitions and transformation logic in version control, so you can diff what changed and roll it back. Maintain a non-production environment with a corpus of representative test messages, including the ugly ones — the truncated names, the unexpected repeats, the null-flavored fields — because those are what break in production. Require every mapping change to be tested against that corpus before promotion, and record who approved it. When a trading partner announces an upgrade, ask for their new sample messages early and run them through your test channel before the cutover date, not after.

Security and PHI Handling

An interface engine is a system that holds a large, concentrated, structured archive of protected health information in transit — which makes it a high-value target and a Security Rule concern in its own right, not a piece of plumbing.

  • Encrypt in transit and at rest. MLLP over a plain TCP socket across any untrusted path is not acceptable; tunnel it or use TLS.
  • Never test with live PHI. Use synthetic or properly de-identified messages in non-production environments. "Just a copy of yesterday's ORU feed" in a test system is a breach waiting for a misconfiguration.
  • Scope message retention deliberately. Long archives are wonderful for replay and terrible for exposure. Set a retention period on purpose and enforce it.
  • Treat interface service accounts as privileged. Unique credentials per trading partner, rotated on a schedule, never shared, and excluded from generic "service accounts are exempt" policies.
  • Get a BAA from any hosted engine vendor, and keep a current data-flow diagram showing exactly which PHI crosses which boundary. You will need it for your risk analysis anyway.

Common questions

Do I need an interface engine for a small practice?

Usually not. If you have a handful of standard interfaces and no need to route the same feed to multiple destinations, your EMR vendor's integration service is cheaper and easier to support. The trigger to buy is routing complexity, not practice size.

Is FHIR replacing HL7 v2 for practice interfaces?

Not yet, and not soon. FHIR is the standard for API-style access and app integration and is required of certified EHR technology, but the high-volume lab, ADT, and results feeds most practices run are still HL7 v2. Plan to operate both.

What is the most important alert to configure on an interface engine?

Time since last message received, per channel. Hard errors are loud and get noticed; a feed that has quietly stopped delivering produces no error at all, and that is the failure that reaches patients.

Can we use production HL7 messages in our test environment?

No. Production messages contain PHI, and a non-production environment rarely carries production-grade controls. Use synthetic or de-identified test messages, and include malformed and edge-case examples deliberately.