1. Link
  2. Get Links
GET

/medical/v1/patient/{id}/link

x-api-key*
curl --request GET \
     --url https://api.metriport.com/medical/v1/patient/{id}/link \
     --header 'x-api-key: AUTH_VALUE'

Path Params

idRequired
string

The ID of the Patient.

Query Params

facilityIdRequired
string

The ID of the Facility that is providing the Patient care.

Response

PatientLinks

The patient’s current and potential links.

import { Metriport } from "@metriport/api";

const metriportClient = new MetriportMedicalApi("YOUR_API_KEY");

const links = await metriportClient.getLinks(
  "2.16.840.1.113883.3.666.777",
  "2.16.840.1.113883.3.666.123"
);
{
  "potentialLinks": [
    {
      "entityId": "1.23.1234.123.3333",
      "potential": true,
      "source": "COMMONWELL",
      "patient": {
        "id": "1.23.1234.123.3333",
        "firstName": "Jose",
        "lastName": "Juarez",
        "dob": "1951-05-05",
        "genderAtBirth": "M",
        "personalIdentifiers": [
          {
            "type": "driversLicense",
            "state": "TX",
            "value": "47281294"
          }
        ],
        "address": {
          "zip": "44233",
          "city": "Austin",
          "state": "TX",
          "country": "USA",
          "addressLine1": "Blamanche St"
        }
      }
    }
  ],
  "currentLinks": [
    {
      "id": "123",
      "entityId": "1.23.1234.123.3334",
      "potential": false,
      "source": "COMMONWELL",
      "patient": {
        "id": "1.23.1234.123.3334",
        "firstName": "Jose",
        "lastName": "Juarez",
        "dob": "1951-05-05",
        "genderAtBirth": "M",
        "personalIdentifiers": [],
        "address": {
          "zip": "12345",
          "city": "San Diego",
          "state": "CA",
          "country": "USA",
          "addressLine1": "Guadalajara St"
        },
        "contact": {
          "phone": "1234567899",
          "email": "jose@domain.com"
        }
      }
    }
  ]
}