Medplum lab orders with Labcorp and Quest Diagnostics

Medplum lists Labcorp and Quest Diagnostics as documented diagnostics integrations built on Bots. This page covers the setup sequence, how orders and results are modeled, security, testing and when a lab network is the simpler route.

On this page

How Medplum lab orders with Labcorp and Quest Diagnostics work

A clinic or lab-facing team needs two flows to work: lab orders going out from Medplum to the reference lab, and results coming back into Medplum as records clinicians can review. Medplum's integration catalog lists Labcorp and Quest Diagnostics as diagnostics integrations for lab orders and results, and each is documented as a Bot and setup. The documented route is a starting point, not a finished design. The exact connection terms, account requirements, test catalog mappings and interface details come from each laboratory and from the Medplum integration documentation, so the team must confirm them in writing with each lab before any build begins.

Confirm five things early. First, which lab accounts, ordering provider identifiers and credentials your organization will hold, and who at the lab approves them. Second, whether the lab's result delivery method matches what the Bot setup expects, and what happens to results that arrive for a patient who does not yet exist in Medplum. Third, which test codes the lab accepts and how your internal order sets map to them. Fourth, who owns the Bot code, its secrets and its failure alerts after go-live. Fifth, whether your organization will use one lab, both labs, or a network that sits between them, since that choice changes the number of integrations you maintain.

The data model is the part most worth reviewing with clinicians. In Medplum, a ServiceRequest represents the lab order, a DiagnosticReport captures the result, and each individual measurement is stored as an Observation linked to that report. Decide early how a partially resulted panel, a corrected report and a cancelled order will appear in these resources, because the Bot logic and the clinician review screen both depend on those decisions. Run a test order through each lab in a non-production environment and check that the resources, statuses and linked Observations match what your clinical reviewers expect before any patient data flows.

What you need before connecting Medplum to Labcorp or Quest

Most of the delay in a lab order integration comes before any code is written. The items below decide which Medplum deployment you run, who signs what, who reviews results, and which network paths the Bot runtime can use. Confirm each one with the owner named before scoping the build.

Medplum deployment and plan tier

Decide whether you run Medplum Cloud or a self-hosted deployment, because the lab integration path can differ between them. Medplum's pricing page lists the hosted plans and the self-hosted options, so confirm with Medplum which plan tier includes this integration before you commit. Record the exact Medplum version you will run and check it against the current release notes and the upgrade guide.

Latest release at research
5.2.5
Medplum pricing

Lab agreement and account

Labcorp and Quest Diagnostics each need a contract and an account before any orders can flow. Ask each lab which interface, credentials and test catalog it will issue for your organization, and whether it expects a direct connection or a network intermediary. Settle these terms first, because they set the Bot design and the test codes your ServiceRequest resources will carry.

BAA and MSA position

Under paid Medplum cloud plans, Medplum includes standard BAA and MSA agreements, so confirm the signed versions cover your entity and the data flows you intend. Your labs will also expect a business associate position for any party that handles ePHI in transit. Map each party in the flow and confirm who signs a business associate contract with whom before any patient data moves.

Named clinical owner for results

Assign a clinician who is accountable for reviewing incoming results, handling abnormal or critical values, and deciding what reaches the patient chart and when. Without a named owner, a DiagnosticReport can sit unreviewed in a queue. Write this role into the workflow design, including coverage for out-of-hours results and who is notified when a result fails to file.

Network and credential access for Bots

The Bot runtime must reach the lab endpoints, and it needs stored credentials to authenticate. Confirm outbound network rules and any allowlisting the labs require, and decide where credentials are kept and who can rotate them. Under a self-hosted deployment, this also means checking the firewall, DNS and secrets path in your own environment before the build starts.

How an order and its results move between Medplum and the lab

The flow starts with a clinician creating a ServiceRequest in Medplum. A Bot picks up the order and transmits it to the lab, which sits outside the Medplum trust boundary. When results return, a second Bot files them as a DiagnosticReport with linked Observation resources, and the clinician reviews them in Medplum. Confirm with the lab which credentials, endpoints and transport they require, and confirm the Bot setup in the Medplum integration documentation before building.

Order and result flow across the Medplum and lab trust boundary, with items to confirm marked.

How ServiceRequest and DiagnosticReport model lab orders and results

In Medplum, a ServiceRequest represents the lab order and a DiagnosticReport captures the results, with individual measurements stored as Observation resources linked to that report. The first decision is how one order maps to reports. A single ServiceRequest can produce several DiagnosticReports when the lab splits a panel, sends reference-lab tests separately, or issues results in stages. Confirm with Labcorp or Quest Diagnostics how they group tests into accessions and reports for each test code you plan to send, because that grouping determines whether your team should expect one report or several per order and how the basedOn reference on each report should point back to the ServiceRequest.

Partial and corrected results need explicit handling. A preliminary report and a final report for the same test should not overwrite each other silently. Agree with the lab how status values such as preliminary, final and corrected are delivered, and decide whether your Bot creates a new DiagnosticReport version or updates the existing one. Corrected results from the lab should be traceable to the original, so clinicians can see what changed and when. Plan for results that arrive without a matching order, and for orders that never return a result, since both will surface in review queues if you do not model them.

Matching results to orders depends on identifiers you record at the time of ordering. Store the lab's order or accession number, the placer order number your system generates, and the specimen identifier on the ServiceRequest, using identifier systems your team documents and confirms with the lab. Do not rely on patient name and date of birth alone. Ask each lab which identifiers come back in result messages and in what form, and test a sample round trip in a non-production project before go-live. The exact field names and transport details are set by the lab's interface specification, so confirm them with the lab's onboarding team rather than assuming a mapping.

Setting up Medplum lab orders with Labcorp and Quest Diagnostics

This sequence connects a Medplum project to a Labcorp or Quest Diagnostics account so that lab orders leave as ServiceRequests and results return as DiagnosticReports with their Observations attached. Each step ends with a check you can confirm before moving on to production.

  1. Confirm the lab agreement and test catalog

    Your lab contract owner and the Labcorp or Quest contact confirm which tests you will order, the test codes each lab uses, the ordering and result formats they support, and the sandbox and production connection details. Ask for these in writing, along with the business associate terms that apply to electronic protected health information. The step is done when you hold a signed test catalog and sandbox access, and you can name the person at the lab who answers interface questions.

  2. Create the Medplum project and Bot credentials

    Create a dedicated Medplum project for lab traffic, separate from clinical records used by other workflows. Register client credentials for the Bot runtime so the Bots authenticate server-to-server, and scope their access policy to the resource types they need, including ServiceRequest, DiagnosticReport and Observation. Store the client secret in your secrets manager. The check is a test call made with those credentials that reads a ServiceRequest and is refused for a resource type outside the policy.

  3. Configure the Bot for outbound orders

    Deploy the Bot that runs when a ServiceRequest for a lab test is created or changed. It reads the order, transforms it into the format the lab accepts, and submits it to the sandbox endpoint from the catalog step. Record the lab's order identifier and acknowledgment on the ServiceRequest so the order can be tracked. The check is a ServiceRequest created in your sandbox project that reaches the lab sandbox and returns an acknowledgment stored on that same ServiceRequest.

  4. Configure the inbound path for results

    Set up the endpoint that receives result messages from the lab and the Bot that handles them. Confirm how the lab authenticates to your endpoint, how it signs or identifies its messages, and how it retries when your endpoint does not respond. The Bot creates a DiagnosticReport for each result set and links the individual values as Observation resources. The check is a sandbox result delivered to the endpoint, with the Bot's log showing the request was accepted and processed.

  5. Map test codes and identifiers

    Build a mapping table that connects each Medplum test code to the lab's order code, and each lab result code to the Observation code you store. Also map patient identifiers, the ordering provider and the order number so a returned result matches the right ServiceRequest and Patient. Decide in advance how the Bot handles an unmatched code or identifier, such as holding the result in a review queue for a person to resolve. The check is a sample order for every code in the catalog, with each returned result matched to the correct ServiceRequest.

  6. Run a non-production order and result cycle

    Place a set of test orders in the sandbox that cover the test panels you plan to offer, then let the lab return results through the inbound path. Confirm each DiagnosticReport links to its ServiceRequest and that every Observation is attached with the expected value, unit and status. Also submit one deliberately mismatched result to confirm it reaches your review queue. The check is a complete trace from order to result for each test, with a written record of any failures and their fixes.

  7. Enable production with a controlled cutover

    Swap the sandbox endpoints and credentials for production values, and confirm your business associate agreements are signed with Medplum (for hosted deployments) and with the lab. If you run Medplum yourself, document which compliance controls your team owns, since Medplum describes compliance as a shared responsibility. Start with a small set of orders watched by a named clinical reviewer, and keep a rollback plan that stops the outbound Bot. The check is a first production order and result that match end to end, with the reviewer's sign-off recorded.

Which Medplum resources carry each part of a lab order

This table maps each part of a lab order and its result to the FHIR resource that carries it in Medplum, with the fields to check at build time. Use it as a starting point for the design, then confirm every code system and field use against the Labcorp or Quest test catalog and the Medplum documentation before build.

Part of the order or resultMedplum resource and fieldWhat to confirm before build
Patient identityPatient, referenced from ServiceRequest.subject and DiagnosticReport.subjectPatient identifiers must match in Medplum and the lab's requisition, including the identifier system and value used for matching
Requesting clinicianPractitioner, referenced from ServiceRequest.requesterThe ordering provider's NPI and how the lab expects it on the requisition
Test being orderedServiceRequest.code (lab test code)Which code system the lab's test catalog uses and whether Medplum's Bot maps it to that system
Priority and statusServiceRequest.priority and ServiceRequest.statusHow the lab interprets priority values and which status transitions it sends back
Specimen instructionsServiceRequest.specimen and related notes, with the Specimen resource where the lab requires itCollection type, container, and handling rules in the lab's catalog for each test
Report status and categoryDiagnosticReport.status and DiagnosticReport.categoryWhich status values appear on preliminary versus final results, and how corrected reports arrive
Report test codeDiagnosticReport.codeThat the report code matches the ordered test code or the panel code the lab returns
Result referencesDiagnosticReport.result pointing to Observation resourcesHow the lab groups results into panels and whether each analyte arrives as its own Observation
Measured value and unitsObservation.valueQuantity with unit codesUnit system and code values for each analyte, and how the lab handles text or coded results
Reference ranges and interpretationObservation.referenceRange and Observation.interpretationWhether the lab sends ranges per patient population and how abnormal flags are coded

Direct Labcorp or Quest setup or a lab network such as Health Gorilla

With a direct setup, your organization holds the agreement with Labcorp or Quest Diagnostics, and Medplum documents a Bot and setup for each lab in its Medplum integration documentation. Your team owns the lab relationship, the interface work and the handling of results after they arrive.

  • Lab agreement and account setup: Your organization negotiates test catalog access, client account identifiers and billing with the lab. Confirm which order and result formats the lab supports for your account.
  • Bot build and secrets: Order submission and result receipt run as Medplum Bots, so lab endpoint credentials sit under your own secrets handling and rotation process.
  • ServiceRequest and DiagnosticReport mapping: Orders are modeled as ServiceRequest resources, and results are filed as DiagnosticReport resources with Observation resources linked to them. Your team designs code mapping, units and reference ranges.
  • Ongoing interface maintenance: Catalog changes, endpoint changes and result format updates land on your queue, and each one needs regression testing.
  • Control and effort profile: You keep direct control of catalogs and routing, but each additional lab adds build, monitoring and support work.

Before you estimate effort, confirm with the lab which interface version, onboarding steps and support contacts apply to your account.

Reviewing results before they reach the chart

Review is a design decision for the clinical owner, not something the Bot does by default. When a Labcorp or Quest result is filed, the DiagnosticReport and its linked Observation resources exist in Medplum, but nothing in the documented setup decides whether a clinician sees a preliminary result, a corrected result or a final one before it is treated as part of the chart. The team needs to agree those states, define how the DiagnosticReport status is set and displayed, and decide which abnormal flags (taken from the interface's interpretation codes) are surfaced in the review queue and which only appear on the report. Confirm with the clinical lead and the laboratory vendor exactly which status values and flags their feed carries, since the mapping differs between result feeds.

Each result should have a named reviewer, a defined time window for acknowledgment and an escalation path if the window passes. Corrected results need their own handling: the team should decide whether a correction replaces the earlier report, creates a new linked report, or flags the earlier one for re-review, and confirm that the earlier version stays auditable. Notification rules also belong in this design. Ask who receives an alert when a result arrives for a patient with no open order, whether that is the ordering clinician, a pool inbox or a compliance queue, and how that alert is kept out of the general chart.

Test the unmatched case before go-live. Send a result that references no existing ServiceRequest, a result for a patient who has no open orders, and a result with a status change after the original was filed. Check that the Bot does not silently create an orphan report in a place a clinician will not look, that the notification reaches the owner you agreed on, and that the event is recorded in the audit trail. Record each test case, its expected outcome and who signed it off, because the review workflow is the part of the integration a clinical auditor is most likely to ask about.

Security controls for lab orders and results on Medplum

Lab orders and results carry protected health information across your network, the lab's systems and Medplum. The six controls below cover the contracts, access, sign-in, secrets, audit trail and encryption that have to hold together, and the shared responsibility split that decides who owns each one.

Business associate contracts

The HIPAA Security Rule requires a business associate contract under 45 CFR 164.314 that obliges the business associate to comply with the Security Rule, flows the same terms down to subcontractors handling ePHI, and requires reporting of security incidents. Confirm which parties need one for your deployment: the lab, your hosting provider and any integration partner that touches orders or results. There is no HIPAA certification, so ask each party for evidence of its controls rather than a certificate.

45 CFR 164.314 text

Access control for orders and results

Decide which roles can create a ServiceRequest, which can read the DiagnosticReport and Observations, and which can only see results after clinician review. Medplum access policies and projects are the enforcement points, so test each role against a real order and a real result in a non-production project. Confirm that ordering staff cannot read results for patients outside their care team.

Medplum compliance docs

Multi-factor sign-in for clinicians

Clinicians who place orders or release results need strong sign-in. Medplum supports its own identity provider, external providers and multi-factor authentication, but identity provider options differ between plans, so confirm which ones your plan includes before design. Check that MFA applies to every path that reaches the ordering app, including admin and support accounts.

Medplum authentication docs

Lab credentials and Bot secrets

The Bot that sends orders to the lab and the one that files results each hold credentials for an external system. Store them in a secrets manager you control, scope them to the minimum the lab grants, and plan rotation with the lab's team. Keep Bot code and configuration free of credentials, and confirm who can read or change Bot secrets in your Medplum project.

Audit logging of order events

Every order sent, result received, result viewed and Bot run should leave a traceable record, including who or what acted and when. Medplum can write AuditEvent resources and server logs, so confirm which events are captured, where logs are forwarded and how long they are kept. Test that a single lab result can be traced from receipt to clinician review.

Medplum self-hosting docs

Encryption in transit and at rest

Lab traffic should use TLS on every hop, and the Medplum database, cache, backups and file storage should be encrypted at rest. The HIPAA technical safeguards treat encryption as an addressable specification, so document the decision and the reason for each choice. Confirm the transport the lab requires, such as a specific endpoint or certificate, before you set up the Bot.

Security Rule safeguards matrix

Common failures when lab orders and results do not match

This table lists common ways Medplum lab orders and results drift out of step with Labcorp or Quest Diagnostics, with the likely cause and the first check for each. Read it as a triage list: start with the symptom your team sees, then work through the first check before changing Bot code or lab configuration. Vendor-specific error handling and acknowledgment behavior must be confirmed with each lab, since the lab's interface rules govern what it returns.

SymptomLikely causeFirst check
Order never reaches the labThe Bot did not run, failed on a network call, or the lab account or interface details are wrongCheck the Bot execution log for the ServiceRequest, then confirm the lab account identifiers and endpoint with the lab
Result filed without a matching ServiceRequestThe result arrived with an order identifier that Medplum never stored, or the order was created outside the Bot flowCompare the order identifier on the DiagnosticReport basedOn reference with the ServiceRequest identifiers in Medplum
Duplicate DiagnosticReports after a retryA retried delivery was treated as a new result because no idempotency key or identifier check ran firstSearch DiagnosticReport by identifier and status to see whether the same lab report ID already exists
Patient identifiers differ between systemsThe lab matched on a different identifier, name spelling, date of birth or sex value than the one stored in MedplumCompare the Patient identifiers and demographics on the order and the result against the Patient resource in Medplum
Test codes not recognized by the lab catalogThe ServiceRequest code uses a local or outdated code system that does not map to the lab's test catalogCheck the code system and code on the ServiceRequest against the lab's current test directory before resending
Bot credentials expired or lack permissionThe client credentials or project access policy changed, or the token lifetime ended before a scheduled runReview the Bot's client configuration and the access policy in its project, then test a single call with the same credentials

Questions buyers ask before hiring help with Medplum lab integration

What drives the cost and effort of a Labcorp or Quest setup?

Scope, lab onboarding and the number of message types drive most of the effort. A Labcorp or Quest setup involves mapping orders to ServiceRequest, mapping results to DiagnosticReport and Observation resources, building and testing Bots, and getting the lab's account, credentials and test catalog configured. Each lab's onboarding steps and test volume change the work, so the reader should ask the lab which interfaces, test codes and result formats apply before budgeting. One-time costs cover design, build and validation. Recurring costs cover hosting, monitoring, credential rotation and updates when the lab changes its catalog or interface. A fixed-scope quote should itemize each of these, and DeployOpen prepares that written scope before work starts.

Can our own team set up Labcorp or Quest lab orders in-house?

A team with FHIR and Medplum Bot experience can build the setup in-house, provided it has a clinician or lab-literate owner and access to the lab's onboarding materials. The work requires understanding how Medplum models orders and results, writing and testing Bots, handling credentials securely and validating results against the lab's test catalog. Teams without that experience usually spend more time on mapping decisions and validation than on code. Medplum's Integration docs list Labcorp and Quest as documented Bot setups, which gives the in-house team a starting point. Whether to build or hire help depends on the team's capacity and how much validation time it can staff.

What does the clinical and lab team need to provide?

The clinical team must define which tests are ordered, which providers can order them and how results are reviewed and acknowledged. The lab team must supply account setup, test codes, the result format and the contacts for onboarding and testing. Both teams need to agree on how abnormal or critical results route to a clinician and how unmatched results are handled. Ask for the lab's test catalog, the ordering requirements for each test, and a named owner on each side. Missing decisions in these areas are the most common reason setups stall during testing.

How long does Labcorp or Quest onboarding and testing take?

The duration depends mainly on the lab's onboarding process and how long joint testing takes, not on the Bot code itself. Timelines move with the lab's account approval, credential issuance, sandbox availability and the number of test scenarios that must pass before production. Ask each lab for its current onboarding steps and the earliest date it can provide a test environment, then plan the build around those dates. DeployOpen does not give fixed durations for lab onboarding, and a written scope should state the milestones and which steps depend on the lab.

When is a network like Health Gorilla the simpler path?

A network such as Health Gorilla is simpler when the organization needs several labs or wants fewer direct lab connections to build and maintain. Direct Labcorp or Quest work makes sense when the organization has a contract with that lab, needs its specific test catalog and wants direct control over the interface. Medplum documents a first-party Health Gorilla integration for lab orders and results, and its Enterprise plan requirement for self-hosted deployments should be confirmed with Medplum before deciding. Compare the number of labs, the contract terms, the ongoing maintenance and the result formats each path supports.

What changes when Medplum is self-hosted instead of on Medplum Cloud?

On a self-hosted deployment, the organization owns the hosting, secrets, Bot execution environment, backups and upgrades that Medplum Cloud would otherwise handle. Credentials for the lab connection must be stored and rotated in your infrastructure, and the Bot runtime, network paths and logs need to be monitored. Medplum's self-hosting docs describe several deployment options, and Medplum states that compliance is a shared responsibility between Medplum and its customers. Confirm with the lab which network connections and certificates it requires, and plan the upgrade path, since Medplum requires each minor version to be applied in sequence.

What should a fixed-scope quote for lab integration include?

A useful quote lists the labs in scope, the message types and test codes, the Medplum resources used for orders and results, the Bots to be built and the validation plan. It should also state the lab onboarding steps the vendor will coordinate, the test environments needed, what the client's clinical and lab teams must provide, and the handover and support terms after go-live. Ask whether the quote covers HIPAA-related documentation, the business associate agreement terms with each lab, and post-launch fixes. DeployOpen agrees scope, deliverables and timelines in writing before work starts and prices follow from that scope.

Does lab result handling need a compliance review?

Yes. Lab orders and results are electronic protected health information when the organization is a covered entity or business associate, so the HIPAA Security Rule applies to them. Your contracts with the lab and any network should include the business associate terms required by 45 CFR 164.314, and the organization should document access, audit logging and incident reporting. There is no HIPAA certification, so the goal is evidence that the controls work. Confirm your obligations with your privacy and legal teams, and treat this as a readiness topic rather than a compliance outcome that the integration alone delivers.

How DeployOpen scopes and delivers the Medplum lab integration

DeployOpen plans, builds, tests and documents the Medplum lab order and result flow inside your own infrastructure, with the Labcorp or Quest Diagnostics connection agreed before work starts. The result is a written scope, a working Bot setup, and the evidence your compliance and security teams need to review it.

How we scope

  • Engagements are fixed-scope, with the lab partner, test catalog and order types agreed in writing before work starts.
  • The written scope names which ServiceRequest and DiagnosticReport fields, Observation links and result routes are included.
  • We confirm with your lab account team which connection method, credentials and onboarding steps apply to your organization.
  • Ongoing support, upgrades and continuous testing can be added as a retainer once the initial scope is delivered.

How we build

  • We deploy and configure the Medplum server and Bots in the cloud accounts, data centers or air-gapped networks you control.
  • Order and result Bots are built against documented Medplum patterns, with credentials kept in your secrets management.
  • We test order submission, result filing and failure handling with lab sandbox data before any live patient records flow.
  • Access to ordering, result review and PHI is tested for role, policy and audit logging before handover.

How we hand over

  • Deliverables include the written design, Bot source, configuration records and a mapping of each lab message to its FHIR resources.
  • Test results, known limitations and open items from the lab partner are documented so your team can review them independently.
  • Runbooks cover order cancellation, failed result delivery, credential rotation and how to reprocess a missed result.
  • Your team is trained on operating the flow, so routine changes to tests or result routing stay under your control.

How we support

  • Support covers Medplum version upgrades, Bot changes when the lab updates its interface, and periodic security testing of the flow.
  • Upgrades follow Medplum's documented sequence of minor versions, with a rollback plan agreed before each change.
  • Compliance evidence, such as access reviews and audit log samples, is prepared for your assessors, who issue any certifications.
  • Confirm with the lab partner which support obligations and turnaround expectations apply to your account before go-live.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.