How Medplum HL7 ORM and ORU interfaces connect orders and results to a LIS, PACS or EHR
A team that needs orders placed from Medplum and results returned to Medplum has to agree one thing before any build starts: which receiving system consumes the messages and what it expects. Medplum's orders and results guide maps the HL7 v2 order message, ORM^O01, to the FHIR ServiceRequest resource, and it covers ORU observation results that come back into the platform. The same guide notes that some customization is usually needed for each organization that consumes these messages, so a LIS, a PACS or an EHR should be treated as a distinct interface with its own profile, not as a generic endpoint.
The practical work sits in three places. The first is the outbound order path, where Medplum's ServiceRequest fields (identifiers, requester, subject, code and requested timing) must be mapped to the ORM^O01 segments the receiving system reads, such as the order control and placer identifiers. The second is the inbound result path, where ORU observations must be mapped to DiagnosticReport and its Observation results, including status and abnormal flags. The third is result routing: deciding which results reach which Patient record and which care team, and what happens when a message cannot be matched. Ask the receiving system's team for its written interface specification and sample messages before mapping begins, and confirm the local codes it uses for tests and observations.
Customization per receiving system is where most of the effort and risk sits, so scope it explicitly. Confirm with the vendor or the organization's interface team which segments, optional fields and acknowledgment behavior the receiving system requires, and test with real message samples in a non-production environment. The Medplum HL7 Agent, Bots and the HL7 client and server components that carry these messages should be confirmed against the current documentation for your Medplum version, because the supported setup depends on the release you run. Plan the test cases around rejected orders, duplicate results, corrected results and orders that arrive out of sequence before going live.
What a Medplum order and result interface needs before build starts
A Medplum ORM and ORU interface depends on five things settled before any mapping work begins: the Medplum deployment, its hosting path, the receiving system's HL7 profile, the network route between systems, and where the Medplum Agent sits. Each card below is a decision or check that shapes the build and the test plan.
Medplum version and upgrade plan
Record the exact Medplum server version the interface will run on, and decide whether it tracks the latest release or a fixed minor line. Medplum ships major versions annually, minor versions two to three times a year and patch versions weekly, so the version chosen sets which patches and changes the interface must absorb. Confirm the version-specific behavior of the orders and results features in the release notes before mapping starts, since a later upgrade must pass through each minor version in sequence.
- Patch release cadence
- Weekly
Self-hosting path and environment
Choose the hosting option that matches your infrastructure standards. Medplum's documentation recommends AWS with CDK and CloudFormation, and also describes Ubuntu via an APT repository, Docker, Kubernetes, DigitalOcean, building from source, and Terraform-based GCP and Azure deployments, where GCP and Azure are marked Beta. The server runs on Node.js with PostgreSQL and Redis, so confirm that your database and cache services meet your backup and availability requirements before the interface goes live.
Self-hosting docsReceiving system HL7 v2 profile
Each receiving LIS, PACS or EHR must be described by its exact HL7 v2 version, the message types it accepts, its supported segments and fields, and any local Z-segments. Medplum's guide notes that some customization is usually needed for each organization that consumes the messages, so this profile drives the mapping work. Ask each vendor to confirm its HL7 v2 version, whether it accepts ORM^O01 and returns ORU^R01, and which optional segments such as OBR and OBX fields it requires.
Orders and results guideNetwork path and certificates
Map every connection the interface needs: from Medplum to the receiving system for orders, and from the receiving system back to Medplum for results. Decide whether traffic crosses a firewall, a VPN or a DMZ, and which side initiates each connection. Plan the MLLP or TLS certificates, their issuers, their renewal dates and the trust stores on each end, and confirm port and firewall rules with the network team before testing.
- Directions to plan
- Two
Medplum Agent placement for on-premises receivers
When the LIS, PACS or EHR sits inside your data center or clinic network, decide where the Medplum Agent runs and which host it uses. The Agent is the on-premises component that carries HL7 traffic between the receiving system and Medplum, so it needs network reach to the receiver, a stable host, and an operator who owns its updates. Confirm its install options and outbound connectivity with the Medplum Agent documentation before choosing the host.
Medplum GitHub repositoryTest environments and sign-off owners
Define a non-production Medplum deployment and a test instance of each receiving system before any live message flows. Name the owner on the lab or radiology side who approves message samples and result formats, and the owner on the clinical side who signs off routing rules. Agree these owners and environments in writing so that mapping decisions have a defined approver and a place to be tested.
Configuration sequence for ORM^O01 and ORU interfaces
This sequence takes an ORM^O01 order path and an ORU result path from agreed specification to verified message exchange, with a checkpoint at each step so problems surface before go-live. Each step names who does the work and what proves it is finished.
Confirm the interface specification with the receiving system
Before any configuration, obtain the interface specification from the LIS, PACS or EHR team that will receive orders and send results. Confirm the HL7 version, the segments and fields they require, which identifiers they use for patient, order and placer numbers, how they expect result status and abnormal flags, and whether they return acknowledgments. Medplum's orders and results guide notes that some customization is usually needed for each organization that consumes the messages, so treat this document as the input to every later step. This step is done when the receiving team has signed off a written specification and named a test contact for message exchange.
Define order and result triggers
Decide which events in Medplum create an outbound order message and which inbound messages should create or update results. For orders, this usually means which ServiceRequest states lead to an ORM^O01 being sent. For results, it means which ORU observation messages are accepted and which DiagnosticReport records they produce. Record the trigger list alongside the specification so the sending and receiving teams agree on when a message is expected. This step is done when the trigger table is reviewed and the receiving team confirms that each trigger matches an order or result type they handle.
Map ORM^O01 segments to ServiceRequest
Build the field mapping from the outbound order message to the FHIR ServiceRequest that represents it. Start from the mapping in Medplum's orders and results guide, then compare each populated segment against the receiving team's specification and note any gaps, such as local codes, required ordering provider identifiers or specimen details the receiving system expects. Document every mapping decision in one table that both teams can read. This step is done when a sample ServiceRequest carries every field the specification requires and the mapping table has no unresolved rows.
Configure the outbound ORM path
Set up the path that carries ORM^O01 messages from Medplum to the receiving system. This is where the self-hosted deployment's Agent connectivity, transport choice and Bot logic that builds the message come together, and the exact settings depend on the Medplum version and the Agent setup in your environment. Confirm the endpoint, credentials and message encoding with the receiving team before enabling it. This step is done when a test order leaves Medplum through the configured path and the path logs the outbound send.
Configure the inbound ORU path and DiagnosticReport mapping
Set up the path that receives ORU result messages and converts observation segments into a DiagnosticReport with its linked Observation resources. Map result status, reported time, performing laboratory and abnormal flags against the specification. Decide how result routing works for each receiving system, such as which patient or ordering provider the result attaches to when identifiers conflict. Agree the handling of corrected or amended results with the receiving team. This step is done when a test ORU is accepted and the resulting DiagnosticReport is linked to the correct ServiceRequest.
Load test messages and check acknowledgments
Run a set of test messages through both paths: a normal order, an order with optional fields omitted, a result that matches an open order, a result with abnormal flags, and a malformed message that should be rejected. For each message, record whether the receiving system returned an accepted acknowledgment and whether the data appears as expected in Medplum. Share the results with the receiving team and resolve every rejection before moving on. This step is done when each test case has a recorded outcome and the receiving team confirms the acknowledgments match the agreed behavior.
Verify results in the Medplum app before cutover
Open the test ServiceRequest and DiagnosticReport records in the Medplum app and confirm that a clinician or lab reviewer can see the order status, the result values, the abnormal flags and the links between them. Check that the records are visible only to the users your access model allows, and that the activity is captured in the audit trail you rely on for review. Confirm the result is visible where the ordering clinician expects it. This step is done when a reviewer signs off the test records and the open questions from the earlier steps are closed or assigned.
How the order and result messages move between Medplum and the receiving system
A ServiceRequest created in Medplum becomes an ORM^O01 order message, and the ORU observations the receiver sends back are filed as a DiagnosticReport with Observation resources. The outbound path starts when a clinician or workflow saves a ServiceRequest. A conversion step, built on the HL7 client components Medplum documents, maps the FHIR fields to the order segments the receiving system expects, then transmits the message. Your team needs to confirm which transport the receiver accepts and which identifiers (placer order number, patient identifier, ordering provider) it requires before any mapping is written. The inbound path works in reverse: the ORU^R01 message is parsed, each OBX result becomes an Observation, and those Observations are grouped under a DiagnosticReport that points back to the original ServiceRequest.
The Medplum Agent or an HTTPS connection carries the traffic between the two systems, and the choice depends on where the receiver sits. An Agent installed inside your network opens an outbound WebSocket connection to Medplum, so no inbound port needs to be opened on the hospital or lab side. A direct HTTPS endpoint suits receivers that are already reachable from Medplum. Confirm with your network and security teams which path your firewall and segmentation rules allow, and record the decision because it changes the monitoring and certificate work that follows.
Acknowledgments and errors need explicit handling at both ends. An ORM^O01 order should receive an ACK from the receiver, and a failed or rejected order must surface in Medplum rather than disappear, so the ServiceRequest status and a retry or alert path must be designed together. On the inbound side, an ORU that fails parsing or references an unknown order should be held for review instead of silently dropped. Ask the receiving lab or PACS team which ACK codes they return on rejection, how they handle duplicate messages, and whether resends are safe. These answers determine the retry logic and the audit trail you will need for clinical review.
How orders and results flow between Medplum and a receiving system
The flow starts when a clinician places an order as a Medplum ServiceRequest, which is transformed into an HL7 ORM^O01 message and sent to the LIS, PACS or EHR through the Medplum Agent or an HTTPS endpoint. The receiving system returns ORU results, which are transformed into DiagnosticReport and Observation resources. The dashed boundary marks the on-premises network, where the receiving system and any Agent sit. Check the message mapping and acknowledgments at each hand-off, since each receiving system usually needs its own customization.
Order and result message flow between Medplum and a receiving system across the on-premises boundary.
Mapping ORM^O01 and ORU segments to ServiceRequest and DiagnosticReport
This table lists the HL7 v2 segments that carry orders and results and the FHIR resources they typically populate in Medplum. Use it as a starting map for design discussions, not as a final specification, because each receiving LIS, PACS or EHR defines its own field usage and code sets. Confirm every row against the Medplum orders and results guide and the receiver's interface specification before build.
| HL7 segment or field | FHIR target | What to confirm | Common failure point |
|---|---|---|---|
| ORC (order control, placer and filler numbers) | ServiceRequest identifiers and status | Which placer and filler identifiers the receiver uses and which system owns the order number | Filler number reused or missing, so results cannot be matched back to the order |
| OBR (observation request, universal service ID) | ServiceRequest.code and ServiceRequest.category | Test code system, such as the local code set or a national terminology, and whether OBR-4 is sent in full | Local test codes without a mapped LOINC or other standard code |
| OBR priority and requested date fields | ServiceRequest.priority and occurrence | Priority code values and time zone handling for requested and collection times | Priority values from the sender that do not match FHIR request priority codes |
| ORC requester and ordering provider fields | ServiceRequest.requester and ServiceRequest.performer | Provider identifier type and whether a Practitioner resource already exists in Medplum | Provider not found, causing the order to be rejected or stored without a requester |
| PID and PV1 (patient and visit) | Patient and Encounter references on ServiceRequest and DiagnosticReport | Patient identifier domain, matching rules and whether visit data is required for the receiving system | Duplicate patients created because the identifier domain was not agreed |
| OBX observation value, units and reference range | Observation resources linked from DiagnosticReport.result | Value types, units system and how abnormal flags map to Observation.interpretation | Units or value types differ by lab, so results cannot be trended or compared |
| OBR result status and OBX status | DiagnosticReport.status and Observation.status | Status code meanings for preliminary, final and corrected results in the sender's specification | Corrected or amended results overwriting the original without an audit trail |
| Acknowledgment and message control ID (MSH, MSA) | Not a FHIR resource; tracked in Bot or Agent logs | Acknowledgment mode and retry behavior the receiver expects | Messages retried without de-duplication, creating duplicate orders or results |
Customizing result routing for each receiving system
Medplum's orders and results guide notes that some customization is usually needed for each organization that consumes the messages, so the effort scales with the number of receiving systems. The cards below cover the decisions that differ from one lab, PACS or EHR to the next and should be agreed with each receiver before build begins.
Sending and filing rules by receiver
Each receiver needs its own rules for which ServiceRequests are sent, to which endpoint, and where incoming ORU results are filed in Medplum. A reference lab may need every order, while a PACS may only need imaging orders and a referring EHR may only need results for its own patients. Write these rules as a table per receiver, list the trigger events each one accepts, and test them with orders from each service line before go-live.
Orders and results guideLocal test code translation
Labs and imaging systems identify tests with their own codes, which often differ from the codes in the ordering catalog. Build a mapping from your local order codes to each receiver's codes, and keep the mapping in a versioned table that the interface team owns. Ask each receiver which code system it expects, and record unmapped codes as errors instead of sending a guessed code.
Code system choices per receiver
Some receivers accept LOINC for observations and orders, others expect a local dictionary, and some need both in the same message. Confirm the code systems, the coding order in each segment, and the display text rules with each receiver's interface specification. Map these choices to the FHIR coding on ServiceRequest and DiagnosticReport so that results can be matched back to the original order.
Ordering provider identity
The ordering provider must be identifiable to the receiver, usually through an identifier format it already recognizes, such as a national or local provider number. Confirm which identifier each receiver requires, how it is mapped from the Medplum Practitioner resource, and what happens when a provider has no identifier. Missing or mismatched provider identity is a common reason a lab rejects or delays an order.
Preliminary and corrected results
Results may arrive as preliminary, final, corrected or cancelled, and receivers differ in how they send these status changes. Decide how each status updates the DiagnosticReport in Medplum, whether a corrected result replaces or supersedes the earlier version, and how the clinician is notified. Test each status transition with the receiver's sample messages, because a corrected result that is filed as a new final result can mislead the care team.
Common failures in HL7 order and result interfaces
This table lists the failures teams most often meet when ORM^O01 orders leave Medplum and ORU results return from a LIS, PACS or EHR, with the likely cause and a general fix for each. Use it to triage a failing interface, then confirm the exact behavior of the receiving system before changing mappings.
| Failure | Likely cause | General fix |
|---|---|---|
| ORM order rejected by the receiving system | The order message omits a segment or field the receiver marks as required, such as patient identifiers, ordering provider or requested test code in OBR | Compare the sent message against the receiver's interface specification field by field, then populate the required fields in the ServiceRequest mapping. Confirm the receiver's required segments with its interface team. |
| ORU result does not file | The result's observation code is not in the receiving system's local code table, so the lab or EHR cannot match it to a test | Add a mapping from the standard code in OBX-3 to the local test code, and agree on a fallback route for unmapped codes. Confirm how the receiver expects code system identifiers. |
| Duplicate results appear | The sending system retransmits a result after a missed acknowledgment, or a resend is triggered by a retry rule, and the receiver has no duplicate check | Key each DiagnosticReport on a stable identifier from the source message and make the write idempotent. Confirm how the sender assigns message control IDs and how the receiver handles resends. |
| No acknowledgment returned | A network path, firewall, TLS certificate or listener fault stops the ACK from reaching the sender, so the sender assumes the message failed | Check the listener, certificate chain and firewall rules on both ends, and log each inbound and outbound message ID. Confirm the ACK timeout and retry behavior with the sending system's vendor. |
| Result or order attached to the wrong patient | Patient identifiers differ between systems, such as a local MRN, an assigning authority mismatch or a name and date of birth variant | Match on the identifier domain the sender actually uses, and route unmatched messages to a review queue instead of creating a new patient. Agree the matching rules with each partner. |
| Result arrives before the order exists | The ORU is sent for an order that was never received or was rejected, so there is no ServiceRequest to link to | Hold or queue unlinked results for review, and check the order's acknowledgment status before retrying. Confirm how the lab handles results for unknown orders. |
| Character encoding or delimiter errors | Special characters, accented names or escape sequences are not handled consistently between the sender and the parser | Confirm the character set declared in MSH-18 and the encoding characters the sender uses, then test with real sample messages from each partner. |
Questions buyers ask about Medplum HL7 order and result interfaces
What drives the cost and effort of connecting each receiving system?
Each receiving system adds its own mapping and testing work, so the number of receivers and how different their message profiles are matter most. Medplum's orders and results guide notes that some customization is usually needed for each organization that consumes the messages. Cost rises with unusual local code sets, custom Z-segments, required fields that differ between a LIS, a PACS and an EHR, and the number of result types each system must accept. Ask any partner for a written scope that lists each receiver, its message types (ORM^O01 and ORU), its segment mapping to ServiceRequest and DiagnosticReport, and the test cases it must pass. Most of this cost is one-time build work, with some recurring effort when a receiver changes its interface.
Can our own team build Medplum HL7 order and result interfaces without outside help?
Yes, a team with HL7 v2 and FHIR experience can build these interfaces in-house, and Medplum's HL7 client and server and its orders and results guide give a starting point. The work requires knowing how each receiver populates OBR, OBX and ORC segments, how results are coded, and how acknowledgments behave. Teams that lack this knowledge often underestimate mapping edge cases and receiver-specific rules. Consider an outside partner when your team has no HL7 v2 background, when many receivers must go live together, or when the work must be reviewed against your compliance program. Ask for a written scope that states who maintains the mappings after go-live.
What does the receiving system's team need to provide?
The receiving team must supply its interface specification, the test endpoint or message sink, the expected order and result profile, and named contacts who can answer mapping questions. Without these, the build relies on guesses about identifiers, result codes and status values. Ask the receiver for sample messages that cover normal, corrected and cancelled results, their acknowledgment rules, and the networking path between the systems. Confirm who approves the final mapping and who signs off the cutover. Agree on these items in the written scope before build work starts, since a missing specification is the most common cause of delayed testing.
How long does testing take, and what changes it?
Testing duration depends mainly on how ready the receiving system is, not on the Medplum side. A receiver with a documented interface, a working test environment and responsive staff can complete message exchange and result validation faster than one that must first confirm its own mapping. Plan for separate rounds covering order transmission, acknowledgment handling, result filing, corrected results and error paths. Ask any partner to state the test environment each receiver will use, the test cases in scope, and the criteria for moving to production. No duration is supplied for this topic, so request a timeline from the written scope rather than relying on a general estimate.
Could a network such as Health Gorilla or a lab-specific setup be simpler?
Often yes, when your goal is ordering tests with a few reference laboratories and receiving their results. Medplum's sibling integrations cover Health Gorilla and documented Labcorp and Quest Diagnostics setups, which can reduce the number of direct interfaces you build and maintain. A direct HL7 interface gives you more control over message content and local systems, such as an in-house LIS or a PACS that is not on a network. Compare the number of receivers, required message customization, data residency needs and recurring fees before choosing. Ask each option for its supported message types, its cost model and what it requires of a self-hosted deployment.
What risks should we check before sending orders to a LIS or EHR?
The main risks are wrong patient matching, orders sent with incomplete or mismatched identifiers, results filed to the wrong ServiceRequest, and silent failures when acknowledgments are missing. Each risk comes from mapping choices and from how a receiver handles errors. Check how the interface identifies patients and orders, how it records rejected messages, and how it alerts staff to unmatched results. Under the HIPAA Security Rule, which covers electronic protected health information that covered entities and business associates transmit, interface traffic needs access controls, audit logging and encryption where the rule requires them. Ask your compliance team to review the design before go-live.
Does DeployOpen build and support these interfaces inside our infrastructure?
DeployOpen plans, implements, integrates and supports self-hosted open-source platforms inside the client's own infrastructure, including cloud accounts, data centers and air-gapped networks. For this topic, that means designing segment mappings from ORM^O01 to ServiceRequest and from ORU results to DiagnosticReport, customizing each receiving system, and planning result routing in your environment. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. DeployOpen does not issue compliance attestations or certifications, so any review of the interfaces for regulatory purposes would be performed by your own assessors or independent auditors.
How DeployOpen scopes and delivers Medplum HL7 order and result interfaces
DeployOpen treats the ORM^O01 order and ORU result flows as interface work that depends on each receiving system, so scope starts with the LIS, PACS or EHR that will consume and return messages. We build, test and document the mappings, routing and acknowledgments inside infrastructure you control, then hand them over with the runbooks your team needs.
How we scope
- Written scope lists each order source, receiving LIS, PACS or EHR, and message type covered by the interface.
- Segment-to-resource mapping is agreed up front, from ORM^O01 fields to ServiceRequest and ORU observations to DiagnosticReport.
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before any build work starts.
How we build
- Customization for each receiving system is built and tested separately, since per-organization mapping rules are usually required.
- Result routing rules are configured so each DiagnosticReport reaches the correct patient, ordering provider and inbox.
- Test messages cover malformed fields, missing identifiers, corrected results and acknowledgments before any live feed is connected.
How we hand over
- Deliverables include the mapping specification, Bot and routing configuration, test cases and results, and a list of open items.
- Runbooks explain how to trace an order from ServiceRequest to acknowledgment, and how to reprocess a failed ORU message.
- Your team receives documentation for access, logging and configuration changes made in your environment during the build.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers for interfaces that change over time.
- Retainer work can cover Medplum version upgrades, receiving-system changes and retesting of mappings after each change.
- Before a Medplum upgrade, we can retest order and result flows against the updated server in a staging environment you control.

