Decisions6 min read
HL7 and FHIR for clinic owners: what to ask for when your system must talk to labs and devices
By Sannan MalikPublished
Short answerHL7 v2 sends event messages, such as a lab order out and a result back. FHIR exchanges resources, such as Patient, ServiceRequest, Observation and DiagnosticReport, over a web API. A clinic system often needs both. Before you sign, ask each vendor which standard and version they use, which message types or resources, who builds and runs the interface engine, and whether there is a test environment with sample messages.
Two standards, and why a clinic usually meets both
HL7 publishes both. They solve the same problem in different ways.
HL7 v2 is the older one. HL7's own comparison page describes it as messages built from reusable segments, sent when something happens, and calls it one of HL7's most widely adopted standards, prominent in inpatient settings around the world. A lab order is a message. A result is another message.
FHIR is newer. HL7 calls it a standard for exchanging healthcare information electronically, and its basic building block is a resource: a patient, an order, a single test result. FHIR describes itself as a RESTful specification, so a system reads, creates and searches resources over HTTP, much like any modern web API.
You do not get to pick one for the whole clinic. The lab, the device maker and the health information exchange each decide what they accept. My job is to make your system speak whatever each of them speaks, and your job is to find out what that is before the contract is signed.
Four integration jobs and where each one lives in the standards
This table maps the jobs a clinic owner actually cares about to the parts of each standard that carry them. The message names come from HL7's v2 message type table. The resource names come from the FHIR specification.
| Job | In HL7 v2 | In FHIR | What to ask the other side |
|---|---|---|---|
| Lab order goes out | OML, the laboratory order message; ORM is the older type, now marked deprecated | ServiceRequest, which represents an order, proposal or plan | Which message type or resource, which version, and a sample order |
| Result comes back | ORU, the unsolicited transmission of an observation; OUL for unsolicited lab observations | DiagnosticReport, which points to one Observation per result | How results are matched to your order and patient, and how corrections are sent |
| Device reading comes in | Depends on the device software | Observation, which lists device measurements such as pulse oximetry and EKG data and can reference the device | What the device or its gateway exports, and whether it sends or you must fetch |
| Exchange with a health information exchange | ADT, the admission, discharge and transfer message, plus the messages the exchange specifies | Patient and other resources, if the exchange accepts FHIR | The exchange's own specification and onboarding steps |
The ORM detail that tells you how current a lab interface is
HL7's v2 message type table marks ORM as deprecated. The laboratory order message in that table is OML. A lab may still offer only ORM, and I would not refuse a lab for that alone. But the answer tells you something. A lab that sends you a current interface specification without being chased is a lab that will be easier to test with.
The bigger risk in v2 is variation. HL7's comparison page names variation between implementations as one of the biggest interoperability challenges, and says mappings generally have to be done implementation by implementation. It also warns about Z-segments, the custom extensions a sender can add, whose meaning is opaque until the sender explains it.
So I would never price a lab interface from the words "HL7 compatible". I would price it from the lab's specification and a set of real sample messages, Z-segments included.
R4 or R5: which FHIR version to ask for
HL7's versions page lists Release 5 (5.0.0) as the current published version. Release 4 (4.0.1) is a mix of normative and trial-use content, and its own index page says it has been superseded by 5.0.0.
The part that matters for a clinic is which resources are stable. Patient and Observation are marked normative from version 4.0.0. ServiceRequest and DiagnosticReport are still marked trial use in R5, and HL7's versions page says future versions may make significant changes to trial-use content. Orders and reports are exactly the resources a lab interface depends on.
I would build against the version the other side runs today, and keep the version visible in the integration so an upgrade is a planned job, not a surprise. A FHIR server must publish a capability statement at its metadata address listing what it supports, so I would ask for that document on day one. It answers half of the questions below in writing.
Questions to put in writing before you sign
Send these to the lab, the device vendor and whoever builds your clinic system. Written answers become the scope for the integration.
- Which standard and exact version: HL7 v2 and which 2.x release, or FHIR R4 or R5.
- Which message types or resources, in both directions, with a sample of each.
- Who builds and runs the interface engine, the software in the middle that receives, translates and routes messages, and who is called when it stops.
- Whether there is a test environment, and whether test messages can be sent before go-live with dummy patients.
- How test codes are mapped: the lab's codes for each test against the codes your system uses.
- What happens when a message fails: who sees the error, and how it is resent.
- Whether the lab charges its own interface fee, and who pays it.
- For FHIR, a copy of the server's capability statement.
Where the UAE exchanges fit
If the clinic is in Dubai or Abu Dhabi, the health information exchange is a separate integration with its own rules. My post on NABIDH, Malaffi and Riayati covers which applies to which emirate and what the authority's onboarding involves. The short version from that post: DHA's interoperability standards name HL7 v2 as the recommended standard and say systems should also support FHIR and IHE profiles, and Malaffi expects an HL7 capable system. So the HL7 v2 work you do for the lab is not wasted when the exchange comes next. This is not legal or regulatory advice; the authority's current documents decide what your facility must do.
How I scope and price an integration track
A lab integration would land in a laboratory module. In my HealthOS case study, that module sits alongside radiology, OPD, pharmacy, billing and insurance workflows, built on NestJS, Prisma and PostgreSQL. Connecting it to a specific lab or device is new work each time, because the other side's specification decides most of it.
A clinic system is custom software, so it gets a fixed quote after a written scope rather than one of my app packages. Hardware integrations and specialised compliance work are quoted separately in every case, and third-party fees, including any interface fee a lab or exchange charges, are not included. I would put each interface in the scope as its own line with its own test plan, so one slow lab never holds up the rest of the system.
Questions
- My lab only offers HL7 v2. Should I still ask for FHIR?
- Not for that lab. Build what the lab supports today. I would still keep your own system's data in a shape that maps cleanly to FHIR resources such as Patient and Observation, so a future FHIR partner or exchange does not mean rebuilding the records.
- What does an interface engine do, and do I need one?
- It sits between your system and the outside world, receives messages, translates them and sends them on, and keeps a log of what passed and what failed. With one lab you can manage without a separate product. With several labs, devices and an exchange, I would want one place to see every message and resend a failed one.
- Can a device send readings straight into the clinic system?
- Sometimes. FHIR's Observation resource covers device measurements and can reference the device that took them, but many devices only export through the maker's own software or gateway. Ask the device vendor what it exports, in which format, and whether your system must collect the data or the device pushes it.
Sources
Platform rules and fees in this article were checked against these official pages on 16 November 2026. They change, so confirm before you rely on them.
Sannan Malik is a software architect and product builder with 8+ years in software, CEO of Alpha Notic FZE and a Certified Scrum Product Owner. He builds mobile apps and business software for companies in the UAE, the wider Gulf, the UK, the US, Canada and Australia.