Health Gorilla is an interoperability service that enables healthcare providers to order lab tests and diagnostics through a unified API. Medplum provides a first-party integration with Health Gorilla in order to optimize this experience, minimizing errors and enhancing the patient experience.

tip

Need help? This is an advanced integration. [Contact our team](mailto:info+healthgorilla@medplum.com?subject=Health%20Gorilla%20Integration%20for%20Medplum) for implementation support.

This guide provides an overview of Medplum's Health Gorilla labs integration and a list of recommendations for systemizing lab ordering.

For more information about the FHIR resources involved in the integration, see [Sending Orders](/content/docs/integration/health-gorilla/sending-orders/index.html) and [Receiving Results](/content/docs/integration/health-gorilla/receiving-results/index.html). To backfill or recover results that were not delivered by webhook, see [Sync Resources from Health Gorilla](/content/docs/integration/health-gorilla/sync-resources-from-health-gorilla/index.html). See our [Changelog](/content/docs/integration/health-gorilla/hg-changelog/index.html) for information about integration upgrades.

## Prerequisites

In order to integrate with Health Gorilla for labs, your organization must:

- Be a provider organization, i.e., with a clinician licensed to review lab orders,
- Have an account number with a [connected lab](https://developer.healthgorilla.com/docs/list-of-connected-labs), such as Quest or LabCorp.

## Lab Integration Eligibility: Do I Qualify?

Medplum integrates with labs like Labcorp and Quest Diagnostics through Health Gorilla to bring lab ordering and results directly into your workflow. Before we can submit a request for an API connection between your lab and Health Gorilla on your behalf, there are a few things worth confirming so the process goes smoothly.

### Eligibility Checklist

- **An existing relationship with a lab rep**: Setting up this API connection ultimately depends on your lab representative approving and processing the request on the lab's side. Before starting, you should already have an account with the lab and a point of contact there. We'll ask you to loop them in directly once the request is submitted, so having that relationship in place ahead of time avoids delays.
- **Transaction volume**: Labs generally require a minimum order volume to justify standing up a dedicated API connection. If your organization doesn't yet meet a lab's internal volume threshold, they may deny the request outright. If you're not sure whether you meet this bar, your lab rep can tell you.
- **Parallel Interface Support**: If your lab account is used with an existing API-based connection to another EHR, you may also want to check with your lab rep that the new API-based connection will not impact any existing ones. This is usually possible, but worth confirming with your lab rep.

### What Happens Next

If you meet the criteria above, reach out to your Medplum contact to start the process. We'll create your Health Gorilla tenant, collect your lab details, and submit the API connection request - but note that lab-side timelines vary, and your involvement (especially with your lab rep) is often the key to moving things along.

## Requisite information for successful lab order

Below is a decision tree that helps determine what information must be collected for a successful lab order with this integration.

- Ensure correct demographic information for patient
- Select Performing Lab
- Fill out Choose a lab panel, e.g., Hepatic Function Panel
- Are specimens collected onsite?
- Enter Ask On Entry questions e.g., Fasting? Y/N, and collected date and time
- Are you synchronizing patient insurance to lab provider?
- Ensure Coverage is collected
- Attach requisition to specimen and send to lab
- Medicare patient?
- Show the ABN and capture diagnosis codes
- Receive results via API
- Leave the collected date and time blank
- Give patient requisition
- Lab collects insurance/specimen
- Release results to patient following state resulting protocol

Information on how to systemize the collection of this information is included below.

### Ensure correct demographic information for patient

[FHIR profiles](/content/docs/fhir-datastore/profiles/index.html) are used to ensure that the correct patient demographic information is collected for every patient.

### Select performing lab

In order to use Health Gorilla's integration, you must retain an account number with the lab directly. This can be done programmatically (see [Sending Orders](/content/docs/integration/health-gorilla/sending-orders/index.html) for more details).

### Choose a lab panel

To standardize the labs or the sets of labs (i.e. blood glucose level, standard STD test set, etc) that can be selected by clinicians, care managers can set up [PlanDefinitions](/content/docs/api/fhir/resources/plandefinition/index.html), that are then instantiated into [ServiceRequests](/content/docs/api/fhir/resources/servicerequest/index.html) when they are ordered for a specific patient. For more information, see our [order structure FHIR data model](/content/docs/integration/health-gorilla/sending-orders#fhir-data-model/index.html).

### Ensuring Coverage are collected

When attaching insurance information to the lab order, ensure that the correct Coverage resource is attached. See [Sending Orders](/content/docs/integration/health-gorilla/sending-orders/index.html) for more details.

### Show ABN and capture diagnosis codes for Medicare patients

When billing lab orders to Medicare, two features are needed: (1) Advanced Beneficiary Notice (ABN) and (2) Diagnosis codes.

The Advanced Beneficiary Notice (ABN) is a PDF that is generated by the Health Gorilla system for orders that are placed for patients with Medicare coverage. Patients should be informed for their expected cost before testing, and these documents give an indication of their out-of-pocket costs for the lab test. For a sample ABN document, see [sample PDF's](/content/docs/integration/health-gorilla#sample-health-gorilla-pdfs/index.html).

In the majority of Medicare orders, patients need diagnosis codes added to their order to receive coverage for the tests. These are ICD-10 codes, and a sample `ValueSet` with common ICD-10 codes can be [downloaded](https://drive.google.com/file/d/1cFHGBud9IlGH86yilxe-KkDxGUbGr2Mn/view?usp=drive_link).

### Attach requisition to sample and send to lab

If collecting specimens on site, you'll need to provide the collection details and attach a printed specimen with barcode to the specimen to ensure correct chain of custody and turnaround times. See [sample PDF's](/content/docs/integration/health-gorilla#sample-health-gorilla-pdfs/index.html) for an example of a PDF that should be printed and attached.

## Sample Health Gorilla PDF's

The below table includes a list of sample documents for PDF's provided by Health Gorilla during the lab order requisition process. Please [contact our team](mailto:info+healthgorilla@medplum.com?subject=Health%20Gorilla%20Integration%20for%20Medplum) for access.

| Sample PDF | Purpose |
| --- | --- |
| [Sample Req w/ collected date](https://drive.google.com/file/d/1gVvhw-2OnW9IlwZU2ly13jZGbGMAyW0O/view?usp=drive_link) | Requisition for specimens collected onsite, with collection date and time. To be attached to the specimen when sending to lab. |
| [Sample PSC Hold](https://drive.google.com/file/d/1EIwAmFxrgdvRNBbL3p9pm4RarKXUS-ET/view?usp=drive_link) | Requisition for specimens collected offsite, to be shared with patient. |
| [Diagnosis samples](https://drive.google.com/file/d/1cFHGBud9IlGH86yilxe-KkDxGUbGr2Mn/view?usp=drive_link) | Sample diagnosis codes, for Medicare patients. |
| [Sample ABN](https://drive.google.com/file/d/1l6VbtqdlkDbCJr_DPQwfKOpoaRo2giTM/view?usp=drive_link) | Sample ABN document, for Medicare patients. |
| [Sample Req with multiple insurance](https://drive.google.com/file/d/1QMrLkP71ysQEMIi3EOKx0BWeJOATUeCw/view?usp=drive_link) | Requisition for patients with multiple insurance. |

## Migrating to Health Gorilla Labs

When migrating your existing lab workflows to the Medplum Health Gorilla integration, there are several steps and phases to ensure a smooth transition.

### Customer Requirements

To begin the setup process, you will need to provide the following to the Medplum team:

- **Lab Account Numbers**: Obtain and share your Quest or Labcorp account numbers.
- **Temporary Access**: Provide a Forward Deployed Engineer (FDE) with temporary access to your Medplum project to install the necessary bots and resources.

### Migration Phases

Migrations are typically rolled out in phases to minimize disruption to your clinical operations:

#### 1. Receive-Only Mode

Often, the first step is to enable the integration in **"receive-only" mode**. This allows you to start receiving structured FHIR results into your Medplum system while continuing to place orders through your existing system or legacy EMR.

#### 2. Syncing Placeholder Orders

When operating in receive-only mode, incoming results will lack a corresponding order in Medplum, which normally results in [`unsolicited-diagnostic-report` or `unknown-patient` issues](/content/docs/integration/health-gorilla/receiving-results#resolving-orders-with-results/index.html).

To avoid this and ensure results are properly matched to the correct patient:

- **Sync Placeholder Orders**: You should sync at least "placeholder" orders (`ServiceRequest` resources) from your legacy system into Medplum.
- **Include Identifiers**: Ensure these placeholder orders include an order ID (such as a Placer or Accession number) that can be matched against the incoming results.
- **Link to Patients**: Point these placeholder orders to a valid `Patient` resource in Medplum.

By doing this, the `receive-from-health-gorilla` bot will successfully match the incoming result's Placer/Accession number to the placeholder order, automatically linking the result to the correct patient and avoiding unsolicited reports.

#### 3. Ordering from Medplum

In the final phase, you transition to placing lab orders directly from your Medplum application. To accelerate the development of the ordering interface, you can use the [`useHealthGorillaLabOrder` hook](/content/docs/integration/health-gorilla/sending-orders#creating-an-order-form-in-react/index.html) from the `@medplum/health-gorilla-react` package. This headless UI hook helps manage the complex state required for creating an order, including searching and selecting lab tests, answering Ask on Entry (AOE) questions, and completing the order workflow.

## Glossary

In a lab implementation, you'll see the following abbreviations.

| Term | Meaning | Details |
| --- | --- | --- |
| PSC | Patient Service Center | In a Quest workflow - if you place an order without a specimen and not to a specific center, it is a PSC workflow and the patient can walk into many Quest locations to have the order filled |
| AOE | Ask on Entry | For a given lab test, there may be special questions only needed for that test - these are called Ask on Entry or AOE questions |
| ABN | Advanced Beneficiary Notice | This is a document produced for Medicare patients indicating how much they are likely to pay out of pocket |
| ICD-10 | Diagnosis Code | These are codes submitted with orders that indicate what medical conditions patients have |
| QNS | Quantity Not Sufficient | When a report comes back with QNS, there was not enough specimen to do the test |
| TNP | Test Not Performed | This is seen on diagnostic reports where tests were not performed |
| NTI | No test indicated | This is another error case in the workflow usually related to missing or unclear labeling of specimens |
| NSPR | No specimen received | Another error workflow where specimens are not available |
| Patient Bill | Patient responsible for paying | This encompasses two cases: one where the patient pays out of pocket and the other where a patient shows their coverage card to the lab |
| Third Party Bill | Insurance responsible | In this case, a patient's insurance is billed |
| Account Bill | Owner of lab account responsible | This is common in clinical research and concierge care |

## Getting a Lab Account

If your organization does not yet have an account with a national lab, you can sign up directly:

- [Contact a Labcorp national lab account representative](https://www.labcorp.com/clinical-drug-testing/support/contact-labcorp-account-representative)
- [Sign up for a Quest national lab account](https://questdiagnosticscommercial.my.site.com/AASU/s/)
