# Health Gorilla MCP

> Health Gorilla MCP manages the entire clinical laboratory workflow. It lets your AI client interact with a diagnostic network to register patients, search for specific tests, submit complex lab orders, and pull structured results directly into your agent's memory.

## Overview
- **Category:** the-unthinkable
- **Price:** Free

## Description

Managing lab data used to mean jumping between systems: manually calling departments, filling out fax forms, or copying patient IDs from one spreadsheet to another. This MCP changes that. It connects your preferred AI client to the Health Gorilla diagnostic network so you can handle the full lifecycle of a patient's testing—from initial contact through result review. You first verify who the patient is and what tests are needed by using tools like `get_patient_demographics` or searching the test catalog with `search_lab_tests`. Once everything is confirmed, your agent submits the order electronically. After the lab processes the samples, you can track progress via status checks or pull structured data directly through result retrieval. Because Vinkius manages this entire catalog of services, you're not stuck building custom API connections; you just tell your AI what needs to happen, and it does it.

## Tools

### cancel_lab_order
Cancels a lab order if it's in 'received' or 'pending' status, requiring a reason for the audit log.

### create_patient_record
Registers an entirely new patient into the Health Gorilla system using basic identifiers like name and DOB.

### get_lab_results
Pulls structured, completed lab results for a specific order, including pathologist sign-off and critical value flags.

### list_orders
Lists multiple lab orders, allowing filters by patient ID or general status to review recent work history.

### list_patient_results
Gathers every available test result for one specific patient across all historical and current orders.

### match_patient
Compares a potential new patient against existing records to generate a match score, preventing duplicate accounts.

### get_order_status
Checks the current status of an existing lab order, confirming if it's collected, testing, or still pending.

### get_patient_demographics
Retrieves name, contact details, and MRN for a registered patient to confirm identity before any action is taken.

### get_provider_details
Fetches detailed information about a healthcare provider, including their specialty and network participation status.

### search_providers
Finds healthcare providers within a network using filters for specialty or location.

### search_lab_tests
Searches the entire test catalog by name or code (LOINC/CPT), showing available diagnostics and turnaround times.

### submit_lab_order
Submits a formal, detailed lab order electronically, routing it to the correct performing laboratory.

## Capabilities

### Register Patient Identity
Creates a new patient record in the system or verifies existing demographic information.

### Locate Diagnostic Services
Searches the entire catalog of available lab tests, finding specific codes and types (like LOINC/CPT).

### Submit Lab Orders
Places a complete electronic order for testing, including clinical diagnosis and necessary specimen details.

### Monitor Order Status
Checks the real-time progress of an existing lab order, noting if it's collected, testing, or completed.

### Retrieve Final Results
Pulls structured data containing final test values, completion timestamps, and pathologist sign-offs for review.

## Use Cases

### Patient Registration Verification
A nurse receives a patient with slightly different identifiers from their chart. Instead of manually calling registration, they ask their agent to run `match_patient`. The agent checks the returned match score and confirms which existing record to use, maintaining data integrity.

### Pre-Order Assessment
A physician needs a panel but isn't sure of the exact test codes. They ask their agent to search the catalog using `search_lab_tests` by category (e.g., 'metabolic'). The agent returns multiple options with turnaround times, allowing the doctor to choose the right panel.

### Post-Testing Review
A specialist needs a full picture of a patient’s health over six months. They ask their agent to execute `list_patient_results`, pulling every test, value, and date available in the system for trend analysis.

### Order Cancellation
The clinical circumstances change, and a test is no longer needed. Instead of leaving notes on a physical chart, the nurse asks their agent to run `cancel_lab_order`, documenting the cancellation reason for audit purposes.

## Benefits

- Verify identity before ordering. Instead of assuming the patient record is right, you first call `get_patient_demographics` or use `match_patient`. This prevents billing errors and ensures results attach to the correct person.
- Stop guessing on tests. Need a code? Use `search_lab_tests` to look up LOINC/CPT codes and see what services are actually available in the catalog before you write an order.
- Track progress without calling anyone. Instead of waiting on hold, your agent checks the current state with `get_order_status` or reviews a history using `list_orders`. You always know where the test is in the process.
- Build complete records instantly. By running `list_patient_results`, you pull every available piece of data for a patient, giving you a longitudinal view that's critical for chronic care follow-up.
- Place complex orders with one go. The `submit_lab_order` tool handles the entire electronic routing process—from demographics to specific test codes and clinical indication.

## How It Works

The bottom line is you use your AI client to orchestrate these medical steps conversationally, without ever leaving your workflow.

1. First, your agent gathers patient details using `get_patient_demographics` or running a check with `match_patient` to verify identity.
2. Next, the workflow uses `search_lab_tests` and `get_provider_details` to confirm test codes and credential validity before calling `submit_lab_order`.
3. Finally, after waiting for processing time, the agent calls `list_patient_results` or `get_lab_results` to get clean data ready for a report.

## Frequently Asked Questions

**How do I check if a patient exists before ordering tests using get_patient_demographics?**
You run `get_patient_demographics` first to pull existing details and confirm the record. If that fails, you should try running `match_patient` to see if they exist under a different identifier.

**Can I use list_orders to find out what tests were done last month?**
Yes, `list_orders` lets you review recent work. You can filter by date or patient ID to see a comprehensive list of all submitted orders over time.

**What’s the difference between get_order_status and list_orders?**
`get_order_status` gives you a deep dive into one specific order's current state. `list_orders`, however, shows an overview of multiple orders with optional filtering.

**Do I need to use create_patient_record before submitting a lab order?**
It’s best practice. You should run `create_patient_record` first if the patient is new, then ensure you verify it with `get_patient_demographics` right before running `submit_lab_order`.

**How do I find a test code for an uncommon panel using search_lab_tests?**
Use `search_lab_tests`. You can filter by category (like 'hematology') or use the free-text option to narrow down results and confirm the correct LOINC/CPT codes.

**When should I use `match_patient` before submitting a new lab order?**
You must run this tool first to prevent data corruption. It compares potential matches against existing records, giving you a confidence score and ensuring the test results attach to the correct patient ID.

**What are the restrictions when using `cancel_lab_order`?**
You can only cancel orders that are in 'received' or 'pending' status. If an order is already 'collected' or undergoing 'testing,' you can't use this tool; you must notify the lab directly.

**How do I analyze long-term patient trends using `list_patient_results`?**
This function pulls all test results for a specific patient across every order. It is perfect for longitudinal monitoring, allowing you to track values like HbA1c or lipid panels over months or years.