Overview
Metriport offers a Sandbox environment so you can develop your medical applications more easily. This environment
allows you to try out the Medical API with some example de-identified clinical data (see section below for more details).
After you get access to the Medical API, you can go to the Developers page and toggle the switch under the Sandbox section to
activate Sandbox mode.
Example Clinical Data
The Sandbox environment will give you access to comprehensive example clinical data for several
test patients - this data will be representative of what you can expect to see in production:
- C-CDA documents in XML format.
- FHIR resources in JSON format.
- Various de-identified unstructured clinical documents in PDF format.
- Various de-identified images in formats like TIFF and JPEG.
To access this data, you just need to create Patients that match some pre-defined
demographics.
In Sandbox mode, any Patient you create with a first
name that matches one of the pre-defined Patients below
will be populated with the corresponding test data.
When querying for consolidated data in sandbox mode using
a conversionType, if you pass a patient that is not one
of the pre-defined Patients below, we will always return a
pre-defined file.
You can expect about 6 example documents per Patient,
roughly breaking down to: a C-CDA XML (and the resulting
FHIR resources), 3 PDFs, and 2 images.
The sections below list the pre-defined sandbox personas and their demographics. Use these as the base
for requests to the create Patient endpoint. The first name (e.g. Jane, Chris, Kyla) determines which persona’s data is returned; you can use the full JSON below or your own patient details with a matching first name.
Jane Smith
Jane Smith has a history of depression and other mental health conditions.
{
"firstName": "Jane",
"lastName": "Smith",
"dob": "1996-02-10",
"genderAtBirth": "F",
"address": [
{
"addressLine1": "123 Arsenal St",
"city": "Phoenix",
"state": "AZ",
"zip": "85300",
"country": "USA"
}
]
}
Chris Smith
Chris Smith has chronic kidney disease (CKD).
{
"firstName": "Chris",
"lastName": "Smith",
"dob": "1995-01-01",
"genderAtBirth": "M",
"address": [
{
"addressLine1": "123 Atlantis Rd",
"city": "Chicago",
"state": "IL",
"zip": "12345",
"country": "USA"
}
]
}
Ollie Brown
Ollie Brown has generalized anxiety disorder (GAD).
{
"firstName": "Ollie",
"lastName": "Brown",
"dob": "1946-03-18",
"genderAtBirth": "M",
"address": [
{
"addressLine1": "201 Armada St",
"city": "Harrisburg",
"state": "PA",
"zip": "15300",
"country": "USA"
}
]
}
Andreas Brown
Andreas Brown has type 2 diabetes and kidney disease.
{
"firstName": "Andreas",
"lastName": "Brown",
"dob": "1952-01-01",
"genderAtBirth": "M",
"address": [
{
"addressLine1": "4430 York St",
"city": "Jefferson City",
"state": "MO",
"zip": "64000",
"country": "USA"
}
]
}
Kyla Fields
Kyla Fields has chronic hypertension and diabetes.
{
"firstName": "Kyla",
"lastName": "Fields",
"dob": "1927-05-23",
"genderAtBirth": "F",
"address": [
{
"addressLine1": "332 16th St",
"city": "Portland",
"state": "ME",
"zip": "04000",
"country": "USA"
}
]
}
Webhook Testing
In sandbox mode, you can test real-time patient notifications by sending sample payloads through the dashboard.
Patient Notifications
Test your webhook integration with realistic patient notification events:
- Patient Admit: When a patient is admitted to a healthcare facility.
- Patient Transfer: When a patient is moved between departments/units.
- Patient Discharge: When a patient is discharged from a facility.
How to Test
In your Metriport dashboard, go to the webhook settings and use the “Test events” section. Select from Patient Admit, Patient Transfer, or Patient Discharge, then click “Send Payload” to test your webhook integration.
The interface allows you to:
- Select notification type from the dropdown (Patient Admit, Patient Transfer, or Patient Discharge)
- Preview the sample payload that will be sent to your webhook
- Send the test payload with one click to verify your webhook handles patient notifications correctly
SDK
To connect to the sandbox using the SDK just provide the options parameter with sandbox = true:
import { MetriportMedicalApi } from "@metriport/api-sdk";
const metriportClient = new MetriportMedicalApi("YOUR_API_KEY", {
sandbox: true
});