How Lab Middleware Works: From Analyzer Output to HIS Delivery

Lab middleware connects your analyzers to your HIS. Here's exactly how it works — connect, parse, process, deliver — and what to look for when evaluating one.
How Lab Middleware Works: From Analyzer Output to HIS Delivery
Every hospital lab has the same invisible problem: the analyzer already produced the result. It's sitting there, formatted and ready, on the instrument's internal buffer. But getting that result into the Hospital Information System — accurately, automatically, and without a technician typing it in by hand — requires a layer of software most people never think about until it breaks.
That layer is lab middleware. This guide explains exactly what it does, how it does it, and what distinguishes middleware that works reliably in production from middleware that creates more problems than it solves.
The Problem Middleware Solves
Lab analyzers speak their own language. A Sysmex XN-550 transmits CBC results in ASTM E1394 format over TCP/IP. A Mindray BC-430 does the same over RS-232 serial. A COBAS C311 uses a slightly different ASTM implementation with manufacturer-specific field extensions. None of these instruments speak HL7, which is what your HIS expects to receive.
Without middleware, the options are grim: manually transcribe results (error-prone, slow, expensive), build custom integrations for every instrument-HIS pair (costly, brittle), or leave instruments disconnected and accept that lab data won't flow automatically (clinically unacceptable for most institutions).
Middleware sits between the instruments and the HIS. It receives the instrument's native output, translates it into a format the HIS understands, validates it, and delivers it — automatically, in real time, without human intervention in the data path.
Step 1: Connect — How Middleware Talks to Instruments
The first step is establishing a communication channel between the middleware and each analyzer. Two connection types dominate clinical labs:
RS-232 Serial
The older standard. RS-232 is a point-to-point serial connection — one cable, one port on the analyzer, one port on the middleware computer (or a USB-to-serial adapter). It's reliable when cabling is done correctly, but has real limitations: maximum cable length is typically 15 meters without a repeater, baud rates must match exactly on both ends, and a single cable failure takes that analyzer offline with no automatic failover.
Many legacy analyzers — Dimension RxL, ADVIA CP, older Horiba models — only support RS-232. Replacing them isn't financially realistic for most labs. Good middleware must support RS-232 connections natively, including correct baud rate configuration, parity settings, and flow control.
TCP/IP
Modern analyzers typically support TCP/IP in addition to or instead of RS-232. The analyzer and middleware communicate over the hospital network using a socket connection. TCP/IP connections are more reliable (automatic retransmission on packet loss), not limited by cable length, and easier to troubleshoot. Bidirectional communication — sending orders from middleware back to the analyzer — is also more practical over TCP/IP.
A lab with 5 analyzers might have 3 RS-232 and 2 TCP/IP connections. Middleware that handles both simultaneously, in a single application, is significantly easier to manage than two separate systems. See how LISBridge handles multi-instrument connectivity.
Step 2: Parse — Reading the Instrument's Output
Once the connection is established, the instrument starts transmitting. The middleware must parse the incoming data — extract the patient ID, test codes, result values, units, reference ranges, and flags from the raw message format.
This is where most middleware implementations either shine or fail.
ASTM E1394 defines a structure: H records, P records, O records, R records, L terminator. A well-formed ASTM message from a compliant instrument should be straightforward to parse. In practice, manufacturers implement the standard inconsistently. Optional fields are sometimes present, sometimes absent. Delimiters vary. Custom extension records appear in instrument-specific positions. A parser built for one analyzer model may produce incorrect output when pointed at a different model, even from the same manufacturer.
The implication for middleware selection: generic ASTM parsers are insufficient. Production-grade middleware maintains instrument-specific parsing profiles — separate parsing logic for each supported analyzer model, built and validated against real output from that instrument in the field.
LISBridge handles this through a Rust/WebAssembly parser architecture. Each supported instrument has a dedicated parser module. The modules update silently in the background via CDN, so when a Sysmex firmware update changes the XN-550's ASTM output, the parser update is delivered and applied without disrupting ongoing lab operations. No IT call required, no application restart.
Step 3: Process — Validate, Structure, Deduplicate
Parsing produces a raw result. Processing turns it into a reliable, structured data record ready for delivery. This step is often where middleware adds the most value — and where shortcuts taken by cheaper middleware create clinical risk.
Validation
Is the result value within a plausible physiological range? Does the patient ID in the P record match a known patient in the system? Are required fields present? Middleware should flag anomalous results for review rather than passing them silently to the HIS.
Deduplication
Analyzers sometimes retransmit results — on reconnection after a communication gap, or when a run is repeated. Middleware must recognize that a result for patient ID X, test WBC, from sample collected at time Y has already been processed, and handle the duplicate appropriately (discard, update, or flag for review).
Structuring
The raw ASTM message contains analyte names as analyzer-internal codes. The middleware maps these codes to standard identifiers — LOINC codes if your HIS uses them, or institution-specific test codes. A CBC result needs to know that the analyzer's internal code "WBC_1" maps to LOINC 6690-2 (Leukocytes [#/volume] in Blood by Automated count).
Routing
In a multi-instrument lab, results from different analyzers may need to go to different destinations. Chemistry results to one HIS module, hematology results to another. Urgent results to a priority queue. Middleware should support routing rules that direct each result to the appropriate endpoint without manual intervention.
Step 4: Deliver — Push to HIS or Generate Report
The final step is getting the structured result to its destination. Most hospital labs use one of two delivery mechanisms:
HL7 to HIS
The middleware constructs an HL7 ORU (Observation Result Unsolicited) message from the structured result and transmits it to the HIS over MLLP/TCP. The HIS acknowledges receipt (ACK message), and the middleware logs the successful delivery. If the HIS is temporarily unavailable, the middleware queues the result and retries — not silently discards it.
This is the standard integration pattern for hospital labs connected to a HIS or EHR. LISBridge supports configurable HL7 v2.x output for any HIS that accepts HL7 connections.
Standalone Reporting
For labs not connected to a HIS — or during the transition before a HIS integration is completed — middleware can generate structured reports locally. PDF reports, CSV exports, or database writes that feed an in-house reporting system.
LISBridge supports both modes. A lab can start in standalone mode, then add HL7 HIS integration later without changing the instrument connections or parser configuration.
One-Way vs. Bidirectional Middleware
The pipeline described above is one-way: results flow from instrument to HIS. Many labs also need the reverse direction — orders flowing from the HIS down to the instrument. A physician orders a CBC in the EHR; that order needs to reach the Sysmex XN-550 so the analyzer knows which patient's sample it's running.
This is bidirectional middleware. The middleware receives HL7 ORM (Order Message) from the HIS, translates it to an ASTM order record, and sends it to the appropriate analyzer. The analyzer runs the sample, produces results, and those results flow back up through the middleware to the HIS — completing the loop.
Bidirectional integration is technically more demanding. It requires the middleware to maintain state, manage order queues, and handle the ENQ/ACK handshake in both directions simultaneously. Not all middleware products implement it correctly. If bidirectional order management is a requirement for your lab, it's worth testing this specifically during evaluation.
What Middleware Does That Your HIS Can't Do Alone
A common question from hospital IT: "Can't the HIS just connect directly to the analyzers?" In most cases, no — for three reasons:
- Protocol mismatch: HIS systems speak HL7 or proprietary formats. Analyzers speak ASTM E1394. The HIS has no ASTM parser.
- Physical connectivity: HIS servers are typically in a data center. Analyzers are on the lab floor. Routing RS-232 serial connections from the lab bench to the data center isn't practical. Middleware runs as a local application near the instruments, then communicates with the HIS over the hospital network.
- Instrument-specific logic: Each analyzer model has its own ASTM implementation quirks. Managing this per-instrument logic inside the HIS would require the HIS vendor to support every analyzer your lab uses — an unrealistic expectation. Middleware externalizes this logic, keeping the HIS integration clean and protocol-agnostic.
5 Questions to Ask When Evaluating Lab Middleware
- Does it support my specific analyzer models? Not just "ASTM E1394 support" in general — does it have tested, validated parsing profiles for the Sysmex XN-550, the Mindray BC-430, the COBAS C311, and every other analyzer in your lab? Ask for the specific list.
- What happens when the network goes down? A middleware that drops results when connectivity to the HIS is temporarily lost is not production-ready. It should queue and retry.
- How does it handle parser updates? When an instrument firmware update changes the ASTM output, how long until your middleware is updated? Who pays for the update? Does it require a service call?
- Does it support bidirectional communication? If you need order management, verify the bidirectional implementation specifically — not just result delivery.
- What does the licensing model look like at scale? A solution that's inexpensive for one instrument may become costly as your lab grows to 5 or 10 connected analyzers. Understand per-device and per-instrument pricing before committing.
FAQ
Is lab middleware the same as an interface engine?
Related but not identical. Interface engines (like Mirth Connect, Rhapsody, or Iguana) are general-purpose HL7 routing and transformation tools designed for system-to-system integration at the hospital level. Lab middleware is more specifically focused on the instrument layer — ASTM parsing, RS-232/TCP connectivity, and the per-instrument parsing logic required to correctly receive analyzer output. Many deployments use both: middleware handles the instrument layer, and an interface engine handles the HL7 routing to multiple downstream systems.
Can middleware work offline?
It should. Lab instruments run 24/7. Internet connectivity isn't always. Middleware should be able to receive and process instrument results locally even when the connection to the HIS is temporarily unavailable, then deliver queued results when connectivity is restored. LISBridge is designed as a local desktop application with offline-first architecture — it doesn't depend on cloud connectivity to function.
How long does it take to connect a new instrument?
With LISBridge, under 10 minutes for a supported instrument. Select the instrument model, configure the connection (serial port or IP/port), and the correct parsing profile is applied automatically. No custom scripting required.
What happens if the middleware crashes while results are being transmitted?
The analyzer will eventually retransmit if it doesn't receive acknowledgment. Good middleware implements the ASTM link-layer handshake correctly — if the middleware goes down mid-transmission, the analyzer times out and can retransmit when connection is restored. Results should never be silently lost.
Do we need middleware if we only have one analyzer?
Yes, if that analyzer needs to connect to a HIS. The protocol mismatch problem exists regardless of how many instruments you have. Even a single Sysmex XN-550 needs ASTM-to-HL7 translation to deliver results to a HIS. Middleware is the standard solution, and the time savings — eliminating manual result entry — justify the cost from day one.
The Bottom Line
Lab middleware isn't a luxury — it's the infrastructure that makes your lab data reliable, automatic, and clinically actionable. The four-step pipeline (Connect → Parse → Process → Deliver) sounds simple, but the implementation details in each step determine whether your lab runs smoothly or spends hours troubleshooting dropped results and manual rework.
Hospitals with 5 analyzers have eliminated 2 hours of daily manual transcription after deploying LISBridge. Data accuracy improved to above 99.9%. The middleware paid for itself within weeks.
Start your free trial — no credit card required. lisbridge.com/pricing
Comments (0)
No comments yet. Be the first to leave one!

