List Patients in Cohort
curl --request GET \
--url https://api.sandbox.metriport.com/medical/v1/cohort/{id}/patient \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sandbox.metriport.com/medical/v1/cohort/{id}/patient"
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/cohort/{id}/patient', 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/cohort/{id}/patient",
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/cohort/{id}/patient"
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/cohort/{id}/patient")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.metriport.com/medical/v1/cohort/{id}/patient")
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 cohortId = "00000000-0000-0000-0000-000000000000";
const cohortPatients = await metriport.listPatientsInCohort(
cohortId
);
Cohort
List Patients in Cohort
Returns a paginated list of all patients that are members of the specified cohort.
Listen to this pageabout 1 min
GET
/
medical
/
v1
/
cohort
/
{id}
/
patient
List Patients in Cohort
curl --request GET \
--url https://api.sandbox.metriport.com/medical/v1/cohort/{id}/patient \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sandbox.metriport.com/medical/v1/cohort/{id}/patient"
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/cohort/{id}/patient', 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/cohort/{id}/patient",
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/cohort/{id}/patient"
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/cohort/{id}/patient")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.metriport.com/medical/v1/cohort/{id}/patient")
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 cohortId = "00000000-0000-0000-0000-000000000000";
const cohortPatients = await metriport.listPatientsInCohort(
cohortId
);
For more information, see the guide about Cohorts
Path Params
Query Params
Response
Array of patients that are members of the cohort.
Show Patient properties
Show Patient properties
The ID assigned to this Patient. This ID will be used to uniquely identify this Patient in medical
documents.
A map containing additional external identifiers. EHR IDs are populated when the patient is
created or mapped through one of our EHR apps. The
healthix ID can also
be set by customers on patient create/update, and is included in webhook payloads when present.Show AdditionalIdentifiers properties
Show AdditionalIdentifiers properties
Athena patient ID. If more than one patient in Athena maps to a Metriport patient, they
will all be included.
Canvas patient ID. If more than one patient in Canvas maps to a Metriport patient, they
will all be included.
Elation Patient ID. If more than one patient in Elation maps to a Metriport patient, they
will all be included.
Healthie Patient ID. If more than one patient in Healthie maps to a Metriport patient, they
will all be included.
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.Pagination metadata for the response.
Show Pagination properties
Show Pagination properties
import { MetriportMedicalApi } from "@metriport/api-sdk";
const metriport = new MetriportMedicalApi("YOUR_API_KEY");
const cohortId = "00000000-0000-0000-0000-000000000000";
const cohortPatients = await metriport.listPatientsInCohort(
cohortId
);
{
"patients": [
{
"id": "11111111-1111-1111-1111-111111111111",
"eTag": "1",
"firstName": "John",
"lastName": "Doe",
"dob": "1990-01-01",
"genderAtBirth": "M",
"address": [
{
"addressLine1": "123 Fake Street",
"city": "Fake City",
"state": "NY",
"zip": "12345",
"country": "USA"
}
],
"personalIdentifiers": [
{
"type": "drivers_license",
"value": "FAKE123456789",
"state": "NY"
}
],
"facilityIds": [
"22222222-2222-2222-2222-222222222222"
]
},
{
"id": "33333333-3333-3333-3333-333333333333",
"eTag": "1",
"firstName": "Jane",
"lastName": "Smith",
"dob": "1985-05-15",
"genderAtBirth": "F",
"address": [
{
"addressLine1": "456 Example Avenue",
"city": "Sample Town",
"state": "CA",
"zip": "54321",
"country": "USA"
}
],
"personalIdentifiers": [
{
"type": "drivers_license",
"value": "FAKE987654321",
"state": "CA"
}
],
"facilityIds": [
"44444444-4444-4444-4444-444444444444"
]
}
],
"meta": {
"itemsOnPage": 2,
"itemsInTotal": 2
}
}

