# Labs Setup and Configuration

This guide covers enabling and configuring the Health Gorilla lab integration in Welkin's Admin and Designer portals.

## Prerequisites

Before configuring Labs:

* Confirm that the Labs integration is included in your Welkin contract
* Your Welkin implementation team will coordinate with Health Gorilla to provision your organization's account
* Have your organization's NPI and billing information ready for Health Gorilla onboarding

## Admin portal configuration

### Enable the Labs integration

1. Log in to the Welkin Admin portal
2. Navigate to **Integrations → Labs (Health Gorilla)**
3. Enter your Health Gorilla credentials:
   * **Client ID** and **Client Secret** – provided by Health Gorilla during onboarding
   * **Organization NPI** – your organization's NPI number
   * **Environment** – select Sandbox for testing, Production for live use
4. Click **Save and Test Connection**
5. Confirm the connection status shows **Active**

### Configure lab network preferences

In the Labs integration settings:

* Select your **preferred lab network** (e.g., Quest Diagnostics, LabCorp, or local labs)
* Set your **default collection site** – this is the location where patients will have specimens collected if not indicated otherwise
* Configure **result delivery** settings – choose whether results are automatically associated with the patient record, or require manual review first

## Designer portal configuration

### Add the lab ordering panel to patient templates

1. Open Designer and navigate to the relevant **Template**
2. Click **Add Component**
3. Select **Labs / Health Gorilla** from the integration components
4. Configure panel options:
   * **Order panel** – allows creating new lab orders
   * **Results panel** – displays returned results
   * **Order history** – shows past orders and status
5. Save and publish the template

### Configure result CDTs (optional)

To store lab results as structured CDT data in Welkin:

1. In Designer, go to **CDT Designer**
2. Create a CDT for lab results with fields for test name, result value, reference range, units, and collection date
3. Map the CDT to the Labs integration under **Integrations → Labs → Result Mapping**
4. Set whether results are auto-saved to CDT or require manual confirmation

### Set up result notifications

To alert care team members when results arrive:

1. In Designer, go to **Automations**
2. Create a new automation triggered by **Lab Result Received**
3. Configure the notification action (task assignment, message, or notification to a specific role)
4. Save and activate the automation

## Testing the integration

1. Log in to the Care portal as an ordering provider
2. Open a test patient record
3. Click **Order Labs** and place a test order using a sandbox test code
4. Confirm the order appears with a status of **Pending** or **Submitted**
5. Use the Health Gorilla sandbox to simulate a result being returned
6. Verify the result appears in Welkin under the patient's labs section

If orders are not transmitting, check the API credentials in the Admin portal and confirm the patient's insurance or billing information is complete.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.welkinhealth.com/integrations/labs-health-gorilla/labs-setup-and-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
