Overview

Getting started with our Medical API is pretty easy, you’ll just need take the following steps:

  1. Create a developer account.
  2. Generate an API key.
  3. Integrate your app with Metriport.
  4. Create Facilities and Patients.
  5. Query for Patient Documents.
  6. Get Patient Medical Data. 🔥
  7. Contribute Medical Data. 🏥
  8. Request API access.

Let’s get into it! 🤘

1. Create a developer account

Click me to go to the developer dashboard!

This will take you to the Metriport developer dashboard where you can create your Metriport account, if you don't have one already.


2. Generate an API key

After we approve your access request, take the following steps to get your API key:

  • Toggle the Sandbox switch in the Dashboard navbar to enter Sandbox mode (learn more about this here).
  • In the left hand menu, click Developers.
  • On the Developers page, you’ll be able to click the Generate API Key button.

The API key will only be displayed once. Please make sure to save it to a secure location before leaving the page.

This API Key will allow you to start making requests to the entire Metriport API on your behalf. Treat this like a password, and keep it somewhere safe! You can read the API Keys page to learn more about API key security best practices.

If you believe your key has been compromised, you can always revoke it and then generate a new one on the Developers page by clicking the trash button beside the key.


3. Integrate your app with Metriport

Note that there are two ways to receive data from Metriport:

  • Webhook: Metriport sends patient data to your app when it becomes available:
    • your application exposes a webhook (endpoint), which Metriport calls when there’s Patient data available after initiating a query;
    • to learn more about how the Webhook flow works, see our Webhooks guide.
  • API: Your app requests data from Metriport:
    • your application polls Metriport for Patients’ medical data after initiating a query to fetch a Patient’s documents;

We recommend using Webhooks to ensure you’re able to get patient data as quickly and easily as possible.


4. Create Facilities and Patients

For the remainder of the steps, you are able to either use the Dashboard UI, or the API - whatever you prefer!

Pro-tip: you can use our handy SDK on your server if you’re using Node:

import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriportClient = new MetriportMedicalApi("YOUR_API_KEY");

Now you can now create Facilities and Patients. First, you’ll need to create your Facilities.

In Metriport, a Facility is a location that a Patient receives some form of treatment. You can create multiple Facilities to represent each of your care locations. Note that for telehealth practices, these can be virtual locations.

In Sandbox mode, you can use the test NPI 1234567893 when creating Facilities.

You can create a Facility by either:

Creating Facilities using the API

See the Create Facility endpoint in our API reference.

Creating Facilities using the Dashboard

  • On the Facilities page, click Create Facility.
  • Fill in the details and submit the form to add your Facility.

Once you’ve created all of your Facilities, you can create the Patients that you treat in each facility.

In Sandbox mode, you can create Patients with pre-defined patient demographics to simulate a match and pull example clinical data - see our Sandbox guide for more details.

You can create Patients by either:

Creating Patients using the API

See the Create Patient endpoint in our API reference.

Creating Patients using the Dashboard

  • On the Patients page, click Create Patient.
  • Fill in the details and submit the form to add your Patient.

When you create a Patient, Metriport automatically links the Patient to all HIE data sources related to the Patient based on the demographic and/or identification information provided when creating the Patient.


5. Query for Patient Documents

Now, you’re able to query for your Patients’ medical Documents (outside medical records).

As we query for Documents, we automatically convert outside records (like XML C-CDA docs) into FHIR resources 🔥, deduplicate the data, standardize it, enrich it with medical code lookups and crosswalks, and store the resulting data on our servers for you to access at any time through a single endpoint.

To query for a Patient’s available Documents, you can either:

Query for Documents using the API

Start an asynchronous Document Query to initiate a query for the Patient’s medical documents from all external sources.

When this process completes, we’ll send you a medical.document-conversion webhook - see the respective section on the webhooks page for more details.

If you don’t have webhooks integrated, you can use the Get Document Query Status endpoint to check the status of the query.

Query for Documents using the Dashboard

  • On the Patients page, click on the desired Patient row to be taken to their interactive medical record chart summary page.
  • If this is the first time viewing this Patient’s chart, Metriport will automatically retrieve the Patient’s medical documents from all external sources;
  • Otherwise, you can click Refresh Patient Data anytime to get the latest medical documents from external sources.
Not all Patients will have available Documents, but they should ~95% of the time.

6. Get Patient Medical Data 🔥

The aforementioned deduplicated, standardized, and enriched FHIR data will allow you to get the source of truth for a Patient’s medical data to better understand and treat your Patients. We refer to this as Consolidated Data in Metriport.

Read our FHIR guide to learn more about how Metriport leverages FHIR.

To learn more on how to obtain a Patient’s Consolidated data via API, please see the Start Consolidated Data Query endpoint - note that this same data is also available via the Dashboard.

To render this data in a single summary document, refer to the Medical Record Summary guide.

If you need to access the raw unprocessed Documents, see the Start Bulk Get Document URL endpoint.

7. Contribute Medical Data 🏥

To uphold data quality with Metriport’s data sources, and improve patient health outcomes, it’s required that your organization reciprocates medical data exchange by making net-new patient clinical data available to the networks. Some examples of this include:

  • Remote patient monitoring observations such as weight and blood pressure;
  • Clinical progress notes from patient encounters;
  • Lab results

Metriport makes it easy to contribute this data - you can:

For more details on how to contribute data back, see the Data Contribution guide.


8. Request API access

Access to our Medical API will require you to make requests on behalf of a covered entity with an NPI number for a valid Treatment purpose of use.

To start using the Medical API for production workloads, with real patient data, you can take the following steps to request production API access:

  • In the left hand menu, click Products & Billing.
  • Click Get Started on the Medical API product.
  • Press Book an Intro Call and select a time and a date to talk to us.

After the call, we will promptly setup your account.

Wrapping up

That’s it! 🤘

You’re now well equiped to use the Metriport API to access, manage, and exchange your Patients’ medical data.

As next steps, we’d recommend scoping out our Medical API Reference in further detail to see the other things you can do with Metriport.