MLT-280 · Lesson 11 of 12 · 20 min
Middleware and autoverification
▶ Video coming soon A video version of this lesson is on the way.
On Monday, November 2, Elodie Marchand spent the day in a small office off the core laboratory with Wendell Achampong, the laboratory information systems analyst, and a whiteboard covered in boxes and arrows. On one side Wendell had written the hospital's electronic record and the LIS; on the other, the automation line and the three immunoassay analyzers; in the middle, a box labeled middleware with dozens of small notes stuck to it. "Every one of these notes is a rule," Wendell said. "Rerun this if it's above that. Dilute this if it's flagged. Hold this if the hemolysis index is too high. Release this automatically if everything is fine. IA-3 can't go live until every rule for its five tests is written, tested and signed. The analyzer measures. The middleware decides what happens next."
Between the analyzer and the patient's record lies a layer of software that most clinicians never see but that shapes nearly every result. This lesson describes the information architecture of the modern laboratory, the functions of middleware, the standards that let instruments and information systems communicate, and autoverification, the automated release of results that meet predefined criteria. It builds on the laboratory information system concepts in Laboratory Information and Quality Systems.
Where middleware sits
The hospital information system or electronic health record holds orders and displays results to clinicians. The laboratory information system (LIS) receives orders, creates accessions and labels, manages specimens, stores results, produces reports and keeps the legal record of the laboratory's work. The instrument software controls each analyzer. Middleware, shown in Figure 14, is software that sits between the LIS and the instruments and automation, adding functions that neither the LIS nor the analyzer performs well on its own. Some middleware is supplied by analyzer manufacturers and handles their instruments and automation; other products are independent and connect instruments from several manufacturers. Many LIS products have built-in rule engines that perform some middleware functions, and the division of tasks between them varies by laboratory.
What middleware does
- Order management and routing: receiving orders from the LIS and sending them to the right analyzer, balancing workload between analyzers that run the same test, and telling the automation system where each tube must go.
- Rules for reruns, reflex testing and dilutions: for example, automatically rerunning a result above the measuring interval at dilution, repeating a critical value, or adding a free T4 when TSH is outside its reference interval if the laboratory's approved reflex protocol allows.
- Result review tools: displaying results with flags, previous results, serum indices and instrument messages so that technologists can review exceptions efficiently.
- Quality control management: collecting QC results from every analyzer, applying multirules, plotting Levey-Jennings charts, blocking release of patient results when QC fails, and sharing data with peer-comparison programs.
- Patient-based real-time quality control: calculating moving averages or medians of patient results to detect shifts between QC runs, an extension of Bull's algorithm described in Lesson 5.
- Autoverification: applying rules to release results automatically or hold them for review.
- Specimen tracking and storage: knowing where each tube is, including its position in storage for add-on tests.
- Instrument management: maintenance logs, reagent inventory, calibration status and alarms, often on dashboards visible throughout the laboratory.
- Audit trail: recording who did what and when, including every rule-based action, as required for traceability.
How the systems communicate
Instruments, middleware and information systems exchange messages over defined interfaces. Two families of standards are common.
- ASTM-type instrument protocols, now maintained by CLSI as LIS01 and LIS02, define the low-level transfer and the message content (header, patient, order, result and terminator records) used by many analyzers.
- Health Level Seven (HL7) version 2 messages are the most widely used format for orders and results between LIS, middleware and hospital systems. Integrating the Healthcare Enterprise (IHE) profiles, such as the Laboratory Analytical Workflow profile, specify how HL7 messages should be used between analyzers and information systems.
- Coding systems give tests and results standard identities: LOINC codes identify the test performed, and SNOMED CT codes may describe specimens and findings, which allows results to be shared across organizations and in provincial or national repositories.
Interfaces may be unidirectional (the analyzer only sends results; orders are entered at the analyzer) or bidirectional (the analyzer also receives orders). In a bidirectional host query interface, the analyzer reads a tube's barcode and asks the middleware what tests to run, so tubes can be loaded in any order.
Every interface must be validated before use and after any change. Validation checks that every test code maps correctly, that results transfer with the correct units, decimal places and signs (such as less-than or greater-than results), that flags and comments arrive intact, that reference intervals and critical flags display correctly, that corrected results replace earlier ones properly, and that results reach the correct patient. Interface errors are rare but dangerous because they can affect thousands of results invisibly; a misplaced decimal or a mapping error can turn a normal result into a critical one, or the reverse.
Autoverification
Autoverification is the process by which patient results generated by an instrument are accepted for release, or held for review, by computer-based rules, without a technologist reviewing each result. CLSI described the basics of autoverification in AUTO10-A in 2006 and, in 2019, published AUTO15, Autoverification of Medical Laboratory Results for Specific Disciplines, which gives general guidance and discipline-specific direction on designing and validating autoverification systems.
The logic is a series of checks, all of which must be passed for automatic release, as Figure 15 illustrates.
Typical autoverification criteria include:
- Quality control status: QC for the test on that analyzer is current and acceptable.
- Instrument flags and errors: no analyzer alarms, reaction curve abnormalities, short sample or clot flags.
- Specimen integrity: serum indices below the test-specific limits for hemolysis, icterus and lipemia; correct specimen type.
- Measuring interval: the result lies within the analytical measuring interval; results above it trigger automatic dilution and results below it are reported as less than the limit.
- Limit checks: the result lies within a range that the laboratory considers safe to release without review, which may be narrower than the reportable range; critical values are always held so that they can be communicated.
- Delta checks: the difference from the patient's previous result within a defined time window does not exceed a set limit, which catches both analytical errors and mislabeled specimens.
- Consistency checks between related results: for example, an anion gap within plausible limits, direct bilirubin not greater than total bilirubin, or a calculated LDL cholesterol valid only when triglycerides are below a threshold.
- Clinical context where available: certain locations (such as oncology or dialysis) or patient ages may have different limits.
Many laboratories autoverify a large majority of routine chemistry and immunoassay results, freeing technologists to concentrate on the results that need judgment. Autoverification also makes release decisions consistent across shifts and staff, shortens turnaround time and reduces transcription and release errors.
Designing, validating and maintaining rules
Autoverification is only as safe as its rules, and a rule error can release thousands of wrong results. Laboratories therefore manage rules with the same discipline as analytical methods.
- Design rules with input from technologists, the laboratory director and clinicians, starting conservatively and expanding as experience grows. Document the rationale for each limit.
- Validate rules before use by testing every path, both with simulated results that exercise each condition (just inside and just outside every limit, with and without each flag) and with real patient results run in parallel, comparing the middleware's decision with technologists' decisions.
- Approve the rules formally; the laboratory director (or designee) signs a written policy and the rule set.
- Monitor performance: autoverification rates, the reasons results are held, and any errors that reached patients.
- Revalidate after any change in rules, middleware software, instrument software, reagents with different measuring intervals or the LIS, and review the rules periodically.
- Suspend autoverification quickly when needed, for example during an instrument problem, with a documented procedure.
In the United States, CAP checklists require that an autoverification policy be approved by the laboratory director, that the rules be validated before use and after changes, that the system can suspend autoverification promptly, and that results released this way be identifiable in an audit trail; CLIA's general requirements for result review and reporting continue to apply.
Worked problem
Building the procalcitonin rule
Wendell and Elodie are building autoverification rules for procalcitonin on IA-3. The measuring interval is 0.02 to 100 µg/L, the hemolysis limit in the instructions for use is a hemolysis index equivalent to 5 g/L free hemoglobin, procalcitonin has no critical value at Mapleford, and the clinical team uses decision points of 0.25 and 0.5 µg/L in antimicrobial stewardship protocols. Outline a rule set.
Show solution
- Hold if QC is not current or not acceptable for procalcitonin on IA-3, or if any instrument flag accompanies the result.
- Hold if the hemolysis index exceeds the manufacturer's limit; add the standard comment if released after review.
- If the result exceeds 100 µg/L, rerun automatically at the manufacturer's dilution and hold the diluted result for review; if below 0.02 µg/L, report as less than 0.02 µg/L.
- Apply a delta check, for example holding a result that has fallen or risen by more than a set factor within 24 hours, to catch mislabeled specimens.
- Release automatically if all checks pass; validate each path with simulated values just inside and outside each limit and with parallel patient data before go-live.
Answer: A rule set covering QC status, instrument flags, hemolysis, the measuring interval with automatic dilution, a delta check and automatic release otherwise, validated path by path and approved by the director before use.
Units and reporting differences
Middleware and the LIS also handle reporting conventions that differ between laboratories and countries. For example, 25-hydroxyvitamin D is reported in nmol/L in Canada and in many other countries, but in ng/mL by most laboratories in the United States (1 ng/mL equals about 2.5 nmol/L); glucose is reported in mmol/L in Canada and mg/dL in the United States. An analyzer may report results in one unit while the LIS requires another, and the conversion must be built and validated in exactly one place. Unit errors at interfaces are a classic source of serious error, particularly when results move between laboratories.
Risks and safeguards
Middleware brings great benefits but introduces risks that laboratories must manage.
- Silent failures: a rule that never fires, because of a mapping change, gives no warning. Periodic testing of rules with known values detects this.
- Over-reliance: technologists may stop questioning results that were autoverified, or may review held results superficially because most are released anyway. Training and auditing maintain vigilance.
- Alert fatigue: too many rules holding too many results lead to rushed reviews. Rules should be tuned using data.
- Change control: every software update, from the analyzer, middleware, LIS or hospital system, can affect interfaces and rules, so laboratories need a formal change control process with testing in a non-production environment before updates reach live systems.
- Cybersecurity and downtime: networked instruments and middleware are part of the hospital's attack surface; laboratories work with information technology teams on access control, patching and monitoring, and maintain downtime procedures for working without middleware or LIS, including manual result entry and paper reporting.
By the end of the day, Wendell and Elodie had written 41 rules for IA-3's five tests and a test script of 230 simulated results designed to drive every rule down every path. "Tomorrow we break them," Wendell said. "If we can't make a rule fail on purpose, we don't understand it."
Common mistakes
MistakeAssuming autoverification rules work forever once validated
InsteadRevalidate after any software, reagent, instrument or rule change and test rules periodically.
MistakeValidating interfaces with a few normal results only
InsteadTest every code, unit, flag, comment, less-than and greater-than result and corrected report.
MistakeAllowing critical values to be autoverified without communication
InsteadCritical values must be held or routed so that they are communicated according to policy.
MistakeBuilding unit conversions in more than one system
InsteadConvert in exactly one validated place to avoid double conversion or none.
Summary and key terms
- Middleware sits between the LIS and instruments or automation, handling routing, rerun, reflex and dilution rules, result review, QC management, patient-based QC, autoverification, specimen tracking, instrument management and audit trails.
- Instruments and information systems communicate through ASTM-type (CLSI LIS01 and LIS02) and HL7 messages, using codes such as LOINC; interfaces may be unidirectional or bidirectional with host query and must be validated.
- Autoverification releases results that pass checks of QC status, instrument flags, serum indices, measuring interval, limits, critical values, delta checks and consistency; CLSI AUTO10-A (2006) and AUTO15 (2019) guide its design and validation.
- Rules are designed conservatively, validated path by path, approved by the director, monitored, revalidated after changes and can be suspended quickly.
- Unit conventions, silent failures, over-reliance, alert fatigue, change control, cybersecurity and downtime are risks that need active management.
- Middleware
- Software between the LIS and instruments or automation that applies rules, manages QC and performs autoverification.
- Laboratory information system
- The system that manages orders, specimens, results, reports and the legal laboratory record.
- Autoverification
- Computer-based release or holding of patient results according to predefined, validated rules.
- Delta check
- Comparison of a result with the patient's previous result to detect implausible change.
- Host query
- An interface mode in which an analyzer reads a barcode and requests the test orders from the information system.
- HL7
- Health Level Seven, a family of standards for exchanging clinical information, widely used for laboratory orders and results.
- LOINC
- Logical Observation Identifiers Names and Codes, a standard coding system for laboratory tests and observations.
- Patient-based real-time quality control
- Monitoring of analytical performance through moving statistics of patient results.
- Change control
- A formal process for testing and approving software or configuration changes before they reach live systems.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Give three functions that middleware commonly performs that a basic analyzer cannot.
Show answer
Examples: applying rerun and dilution rules across instruments, autoverification, QC multirule management with result blocking, patient moving averages, workload balancing and tube routing on automation.
Why must autoverification rules be revalidated after a reagent change that alters the measuring interval?
Show answer
Rules that use the measuring interval (automatic dilution, less-than reporting, holds) may no longer match the method and could release or suppress results incorrectly.
A delta check holds a hemoglobin of 88 g/L on a patient whose result six hours earlier was 142 g/L. Name two possible explanations the technologist must consider.
Show answer
A mislabeled specimen (wrong patient) or contamination with intravenous fluid; genuine acute blood loss is also possible and must be considered with clinical information.
What should an interface validation include for results reported as below the limit of quantitation?
Show answer
Confirmation that less-than results (for example, less than 0.02 µg/L) transmit and display correctly with the symbol and are not converted to zero or truncated.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.