Get Patient
curl --request GET \
--url https://api.sandbox.metriport.com/medical/v1/patient/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sandbox.metriport.com/medical/v1/patient/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sandbox.metriport.com/medical/v1/patient/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.metriport.com/medical/v1/patient/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.metriport.com/medical/v1/patient/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.metriport.com/medical/v1/patient/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.metriport.com/medical/v1/patient/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyimport { MetriportMedicalApi } from "@metriport/api-sdk";
const metriport = new MetriportMedicalApi("YOUR_API_KEY");
const patient = await metriport.getPatient("018a80c4-292a-7486-a1234-76yuhe23yu14");
Patient
Get Patient
Gets a Patient.
GET
/
medical
/
v1
/
patient
/
{id}
Get Patient
curl --request GET \
--url https://api.sandbox.metriport.com/medical/v1/patient/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sandbox.metriport.com/medical/v1/patient/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sandbox.metriport.com/medical/v1/patient/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.metriport.com/medical/v1/patient/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.metriport.com/medical/v1/patient/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.metriport.com/medical/v1/patient/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.metriport.com/medical/v1/patient/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyimport { MetriportMedicalApi } from "@metriport/api-sdk";
const metriport = new MetriportMedicalApi("YOUR_API_KEY");
const patient = await metriport.getPatient("018a80c4-292a-7486-a1234-76yuhe23yu14");
Path Params
string
required
The ID of the Patient.
Response
string
required
The ID assigned to this Patient. This ID will be used to uniquely identify this Patient in medical
documents.
string
The ID of the Patient on your internal system to associate to a Patient in Metriport.
AdditionalIdentifiers
A map containing additional external identifiers. If the patient is created or mapped in Metriport through one of
our EHR apps - this property will be populated with the ID from the EHR, and included
within the webhook payloads.
Show AdditionalIdentifiers properties
Show AdditionalIdentifiers properties
string[]
Athena patient ID. If more than one patient in Athena maps to a Metriport patient, they
will all be included.
string[]
Canvas patient ID. If more than one patient in Canvas maps to a Metriport patient, they
will all be included.
string[]
Elation Patient ID. If more than one patient in Elation maps to a Metriport patient, they
will all be included.
string[]
required
The Patient's first name(s).
string[]
required
The Patient's last name(s).
string
required
The Patient's date of birth (DOB), formatted
YYYY-MM-DD as per ISO 8601.string
required
The Patient's gender at birth, can be one of
M or F or O or U. Use O (other) when the patient's gender is known but it is not M or F, i.e intersex or hermaphroditic.
Use U (unknown) when the patient's gender is not known.PersonalIdentifier[]
Address[]
required
Contact[]
string[]
required
Array of the IDs of the Facilities where the Patient is receiving care.
import { MetriportMedicalApi } from "@metriport/api-sdk";
const metriport = new MetriportMedicalApi("YOUR_API_KEY");
const patient = await metriport.getPatient("018a80c4-292a-7486-a1234-76yuhe23yu14");
{
"id": "018a80c4-292a-7486-a1234-76yuhe23yu14",
"externalId": "1234567890",
"additionalIds": {
"athenahealth": ["43210"],
"canvas": ["1234567890"],
"elation": ["0987654321"]
},
"facilityIds": ["018a80c4-292a-7486-a1234-9uiu76yhe234"],
"firstName": "Jose",
"lastName": "Juarez",
"dob": "1951-05-05",
"genderAtBirth": "M",
"personalIdentifiers": [
{
"type": "driversLicense",
"state": "CA",
"value": "51227265"
}
],
"address": [
{
"zip": "12345",
"city": "San Diego",
"state": "CA",
"country": "USA",
"addressLine1": "Guadalajara St"
}
],
"contact": [
{
"phone": "1234567899",
"email": "jose@domain.com"
}
],
}

