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, roughtly breaking down to: a C-CDA XML (and the resulting FHIR resources), 3 PDFs, and 2 images.

The sections below will describe the pre-defined Patient demographics which you can use as a base for requests to the create Patient endpoint:

Jane Smith

{
  "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

{
  "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

{
  "firstName": "Ollie",
  "lastName": "Brown",
  "dob": "1946-03-18",
  "genderAtBirth": "M",
  "address": [
    {
      "addressLine1": "201 Armada St",
      "city": "Harrisburg",
      "state": "PA",
      "zip": "15300",
      "country": "USA"
    }
  ]
}

Kyla Fields

{
  "firstName": "Kyla",
  "lastName": "Fields",
  "dob": "1927-05-23",
  "genderAtBirth": "F",
  "address": [
    {
      "addressLine1": "332 16th St",
      "city": "Portland",
      "state": "ME",
      "zip": "04000",
      "country": "USA"
    }
  ]
}

Andreas Sims

{
  "firstName": "Andreas",
  "lastName": "Sims",
  "dob": "1952-01-01",
  "genderAtBirth": "M",
  "address": [
    {
      "addressLine1": "4430 York St",
      "city": "Jefferson City",
      "state": "MO",
      "zip": "64000",
      "country": "USA"
    }
  ]
}

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
});