Home / Insights / Connectivity
ASTM to HL7 conversion: how analyser results become HL7 messages
Most benchtop analysers speak ASTM. Most clinical systems expect HL7 v2 or FHIR. Something has to translate between them without losing a result, a flag or a correction. This guide shows how the conversion works record by record, where it usually goes wrong, and what to test before you go live.
Written and reviewed by the Catenix team. How these guides are written and checked.
In brief
- ASTM E1394 (now CLSI LIS2) messages are built from records: H header, P patient, O order, R result, C comment, Q query and L terminator.
- An HL7 v2 result message (ORU^R01) carries the same facts in segments: MSH, PID, ORC, OBR, OBX and NTE.
- The hard parts are not the syntax but the meaning: test codes, units, reference ranges, abnormal flags, QC runs, reruns and corrected results.
- Good middleware converts with a mapping table per analyser, keeps the original ASTM message for traceability, and never sends QC as a patient result.
- Catenix converts ASTM E1394, HL7 v2 and POCT1-A2 analyser output into HL7 v2 or FHIR for LIS and EHR systems, with a wire-level audit trail.
Take it with you: POCT connectivity buyer's guide · POCT readiness checklist (PDF, no form).
Why conversion is needed
An analyser built to talk to a host computer sends results in the format its manufacturer chose. For chemistry, immunoassay and haematology analysers that is usually ASTM E1381 for the link layer and ASTM E1394 for the content, over an RS-232 cable or TCP. Laboratory information systems and EHRs, meanwhile, accept HL7 v2 messages over MLLP, or FHIR resources over HTTPS. Neither side is going to change, so middleware converts. Our ASTM E1381/E1394 guide explains the analyser side in detail and our HL7 field guide covers HL7.
Record by record
| ASTM record | Carries | HL7 v2 segment |
|---|---|---|
| H (header) | Sender, receiver, date and time | MSH |
| P (patient) | Patient ID, name, date of birth, sex | PID |
| O (order) | Specimen ID, test requested, priority, collection time | ORC and OBR |
| R (result) | Test code, value, units, range, flag, status, operator, completed time | OBX |
| C (comment) | Free text comments on a record | NTE |
| L (terminator) | End of message | No equivalent; the message ends |
In practice, the specimen ID in the O record is the key. The middleware uses it to find the order that the EHR or LIS sent earlier, and takes the authoritative patient details from that order rather than trusting whatever the analyser holds. The R records become one OBX each, in order, under an OBR for the test or panel.
Where conversions go wrong
Test codes. The analyser sends its own code, such as a channel number or a short name. The receiving system expects its own code, often LOINC in the US. Middleware needs a mapping table per analyser and per receiving system. A missing mapping should stop the result for attention, not send it with a blank code. See our guide to LOINC and SNOMED coding for lab results.
Component separators. ASTM fields use carets for components, and some analysers put dilution factors or replicate numbers into the test ID field. A naive parser that takes the last component as the test name can file a diluted result under a nonsense name. Parse by position, per analyser, and test with real messages.
Units and ranges. If the analyser reports in one unit and the EHR expects another, conversion must be explicit and tested. Reference ranges usually belong to the lab's test catalogue, not the analyser output.
Flags. Analyser abnormal flags (H, L, HH, LL, and manufacturer flags for errors or interference) must map to HL7 abnormal flags or be held for review. A result carrying an analyser error flag should not be released as a normal value.
QC. Analysers send QC runs in the same format as patient runs. The middleware must recognise them, usually by a QC specimen ID pattern or a QC lot, and file them as QC. A QC value in a patient chart is a serious error.
Reruns and corrections. When a sample is rerun, the system must decide which result stands. When a released result is corrected, HL7 v2 marks the OBX with result status C and the receiving system must replace the earlier value, not add a second one.
A worked example
An immunoassay analyser runs specimen 2611180042 for TSH and sends, in outline, a header, a patient record, an order record with the specimen ID, a result record with the test code, the value 2.15, units mIU/L and a range, and a terminator.
The middleware looks up 2611180042, finds the order placed in the EHR for the right patient, maps the analyser's TSH code to the receiving system's code, checks that today's TSH QC on that analyser passed, and checks the operator is authorised. If everything passes, it builds an ORU^R01 with MSH, the patient from the original order in PID, the order numbers in ORC and OBR, one OBX for TSH with value, units, range, abnormal flag and status F, and sends it over MLLP. It records the original ASTM text, the converted HL7 message and the acknowledgement from the receiving system.
If QC had failed, the result would be held, not sent. If the receiving system rejected the message, it would be retried and flagged, not dropped.
The same result as ASTM and as HL7 v2
Here is a simplified ASTM E1394 message for one TSH result. The link-layer framing (STX, frame numbers, checksums) is left out so the content is readable.
H|\^&|||ANALYSER^1.0|||||||P|1|20261118101500 P|1||||TEST^PATIENT||19850214|F O|1|2611180042||^^^TSH|R||||||||||SERUM R|1|^^^TSH|2.15|mIU/L|0.27 to 4.20|N||F||OP01||20261118101500 L|1|N
Each line is a record. The H record names the sender and the delimiters. The P record carries the patient as the analyser knows it. The O record carries specimen 2611180042 and the requested test. The R record carries the test, the value 2.15, the units, the range, the analyser's abnormal flag (N), the result status (F, final), the operator and the time. The L record ends the message.
After conversion, the HL7 v2.5.1 result message for the same value looks like this:
MSH|^~\&|MIDDLEWARE|LAB|EHR|CLINIC|20261118101530||ORU^R01|MSG000417|P|2.5.1 PID|1||MRN12345^^^CLINIC^MR||TEST^PATIENT||19850214|F ORC|RE|ORD7781|2611180042 OBR|1|ORD7781|2611180042|3016-3^TSH^LN|||20261118094500|||||||||||||||20261118101530|||F OBX|1|NM|3016-3^TSH^LN||2.15|mIU/L|0.27-4.20|N|||F|||20261118101500
Notice what changed and what did not. The value, units and flag pass straight through. The analyser's local code TSH has become LOINC 3016-3, because this receiver asked for LOINC. The range is written in HL7 style. The order numbers in ORC and OBR come from the EHR's original order, found through the specimen ID, and the patient identifier in PID is the EHR's own medical record number, not the analyser's. The status F is carried in OBX-11, and a later correction would be sent with C in the same field. All identifiers and names here are invented for the example.
Converting to FHIR instead
Where the receiving system offers a FHIR API, the same facts map to FHIR resources: a DiagnosticReport for the report, one Observation per result with a code, value, unit, reference range and interpretation, a Specimen for the sample, and a reference to the ServiceRequest that ordered it. Corrections update the Observation status to corrected or amended. See HL7 v2 vs FHIR for lab results.
What to test before go-live
- Every test on every analyser, with a value inside, above and below the range.
- A QC run for every QC level, confirming it files as QC.
- A result with an analyser error flag.
- A rerun of the same specimen.
- A corrected result after release.
- A result for a specimen with no matching order.
- A network drop between middleware and receiving system.
- Special characters in patient names.
Keep the test messages and the outcomes as validation evidence. Our POCT message samples and the free HL7 sample messages and checker help with this.
Questions to ask any middleware vendor about conversion
- Can we see the original analyser message and the converted message side by side for any result?
- Are test code mappings held per analyser and per receiving system, and who can change them?
- What happens to a result whose test code has no mapping?
- How are QC runs recognised for each of our analysers?
- How are reruns, dilutions and corrected results handled?
- Can you send both HL7 v2 and FHIR, and in which versions?
Before you ask, check your analysers in our analyser connection guides, which list protocols for 130 analysers, or in the open connectivity dataset. The same facts can be queried inside ChatGPT or Claude through our AI assistant connector.
Where Catenix fits
Catenix connects to analysers in ASTM E1394, HL7 v2, POCT1-A2 and proprietary formats through an on-site edge gateway, converts results with per-analyser mapping tables, files QC separately with Levey-Jennings charts and Westgard rules, holds results when QC or operator competency fails, and delivers HL7 v2 or FHIR to the LIS or EHR. Analyser not on the list? We build the driver, usually within a couple of days. It keeps the original analyser message, the converted message and the acknowledgement for every result, so you can trace a value end to end. Catenix is connectivity, workflow and record-keeping software; it does not interpret results and is not marketed as a medical device.
Questions people ask
Can I convert ASTM to HL7 with a general interface engine?
Yes, but you will need to build the analyser link layer, mapping tables, QC handling, rerun and correction logic yourself. Lab middleware ships with these for supported analysers. See interface engine vs lab middleware.
Is ASTM E1394 the same as LIS2?
Yes. ASTM E1381 and E1394 were transferred to CLSI and are now published as LIS1 and LIS2. Many analyser manuals still use the ASTM names.
Which HL7 message carries lab results?
In HL7 v2, results are usually sent as ORU^R01 messages, with one OBX segment per result. Some systems use OUL messages instead.
How is a corrected result handled in HL7?
The OBX result status is set to C (corrected) and the receiving system replaces the earlier value. Test this path before go-live.
Can the analyser's patient details be trusted in the converted message?
Use them only as a cross-check. The patient and order details should come from the order the EHR or LIS sent, found through the specimen ID, so a typo on the analyser cannot put a result on the wrong patient.
Should QC results be sent to the EHR?
No. QC runs belong in the QC record, charted and checked against Westgard rules. Only patient results should go to the EHR.
Sources and further reading
Read next
More for coordinators.
HL7, ASTM and POCT1-A2 sample messages
Fictional result messages in HL7 ORU^R01, ASTM E1394 and POCT1-A2, explained field by field, with a free browser-based HL7 message checker.
Read →ASTM E1381/E1394 guide
ASTM E1381 and E1394 are an older, serial-oriented way analysers send results. See how it works and how Catenix brings serial devices into one...
Read →Interface engine vs lab middleware
When a general HL7 interface engine such as Mirth Connect makes sense for a lab, when purpose-built lab middleware is faster and safer, and how to...
Read →Take it with you
The buyer's guide, in your inbox.
Nine pages on what POCT connectivity is, the standards in plain English, the cost of doing it by hand and eight questions to ask any supplier.
Get the POCT connectivity buyer's guide
Nine pages, vendor-neutral: what connectivity is, the standards in plain English, the cost of doing it by hand and eight questions to ask any supplier. The PDF also opens directly from the downloads page; leave an email only if you want it in your inbox.
See it done in software.
A 30-minute walkthrough on a live tenant, with your analysers and your allowable-error limits.