Skip to main content
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 { MetriportMedicalApi } from "@metriport/api-sdk";

const metriport = new MetriportMedicalApi("YOUR_API_KEY");
const cohortId = "00000000-0000-0000-0000-000000000000";
const cohortPatients = await metriport.getCohortPatients(cohortId);
For more information, see the guide about Cohorts

Path Params

id
string
required
The ID of the cohort whose patients are to be returned.

Query Params

fromItem
string
Optional pagination parameter to start from a specific item.
toItem
string
Optional pagination parameter to end at a specific item.
count
number
Optional number of items per page (max 100).
sort
string
Optional sort parameter (e.g., “id=asc,createdAt=desc”).

Response

patients
Patient[]
required
Array of patients that are members of the cohort.
meta
ResponseMeta
required
Pagination metadata for the response.
import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriport = new MetriportMedicalApi("YOUR_API_KEY");
const cohortId = "00000000-0000-0000-0000-000000000000";
const cohortPatients = await metriport.getCohortPatients(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
  }
}