Path Params
The ID of the cohort to remove patients from.
Body
You must provide eitherpatientIds or allPatients, but not both.
Array of patient IDs to remove from the cohort. Mutually exclusive with the 
allPatients property.Property to confirm you want to remove all patients in your metriport
instance from the cohort. Mutually exclusive with the 
patientIds array.Response
Confirmation message indicating the operation was successful.
The cohort details.
Show Cohort properties
Show Cohort properties
The unique identifier for the cohort (UUID format, e.g., 
00000000-0000-0000-0000-000000000000).The entity tag for optimistic concurrency control.
The unique name of the cohort within your organization.
The description of the cohort.
The color associated with the cohort.
Configuration settings for the cohort.
Show Settings properties
Show Settings properties
Hide monitoring object properties
Hide monitoring object properties
HIE-based document monitoring - subscribes patients to HIE-based
document monitoring (non-ADT) / medical record refresh based on the cadence.
Show hie object properties
Show hie object properties
Enable or disable scheduled data pulls for HIE monitoring. Defaults to enabled.
When disabled, no scheduled pulls will occur regardless of the frequency setting.
How often scheduled data pulls should occur, can be one of 
weekly or biweekly or monthly. Defaults to monthly.See scheduled queries
for timing details.
HIE monitoring is coming soon! While this feature is not yet live, you can configure
your HIE monitoring settings now. These settings will automatically take effect when the feature launches.
ADT (Admission, Discharge, Transfer) monitoring - subscribes patients to ADT notifications
based on their primary address.
Show adt object properties
Show adt object properties
Enable or disable ADT monitoring notifications. Defaults to disabled.
Pharmacy / medication history monitoring - enables retail fill data monitoring where available.
Show pharmacy object properties
Show pharmacy object properties
Enable/disable pharmacy monitoring notifications. Defaults to disabled.
Enable pharmacy data pulls at scheduled dates.
Show schedule object properties
Show schedule object properties
Enable or disable scheduled data pulls for pharmacy monitoring. When disabled, no
scheduled pulls will occur regardless of the frequency setting. Defaults to disabled.
How often scheduled data pulls should occur, can be one of 
weekly or biweekly or monthly. Defaults to monthly.See scheduled queries
for timing details.
Pharmacy monitoring is coming soon! While this feature is not yet live, you can configure
your Pharmacy monitoring settings now. These settings will automatically take effect when the feature launches.
Laboratory / lab results monitoring - enables laboratory test results monitoring where available.
Show laboratory object properties
Show laboratory object properties
Enable/disable laboratory monitoring notifications. Defaults to disabled.
Enable laboratory data pulls at scheduled dates.
Show schedule object properties
Show schedule object properties
Enable or disable scheduled data pulls for laboratory monitoring. When disabled, no
scheduled pulls will occur regardless of the frequency setting. Defaults to disabled.
How often scheduled data pulls should occur, can be one of 
weekly or biweekly or monthly. Defaults to monthly.See scheduled queries
for timing details.
The number of patients assigned to this cohort.
Copy
Ask AI
import { MetriportMedicalApi } from "@metriport/api-sdk";
const metriport = new MetriportMedicalApi("YOUR_API_KEY");
// Remove specific patients from cohort
const result = await metriport.removePatientsFromCohort({
  cohortId: "00000000-0000-0000-0000-000000000000",
  patientIds: [
      "11111111-1111-1111-1111-111111111111",
      "22222222-2222-2222-2222-222222222222",
  ],
});
// Remove all patients from cohort
const resultAll = await metriport.removePatientsFromCohort({
  cohortId: "00000000-0000-0000-0000-000000000000",
  allPatients: true
});
Copy
Ask AI
{
  "message": "Patient(s) successfully removed from cohort",
  "cohort": {
    "id": "00000000-0000-0000-0000-000000000000",
    "eTag": "1",
    "name": "High Risk",
    "description": "Patients that need frequent and robust monitoring.",
    "color": "red",
    "settings": {
      "monitoring": {
        "hie": {
          "enabled": false,
          "frequency": "monthly"
        },
        "adt": {
          "enabled": true
        },
        "pharmacy": {
          "notifications": true,
          "schedule": {
            "enabled": false,
            "frequency": "monthly"
          }
        },
        "laboratory": {
          "notifications": true,
          "schedule": {
            "enabled": false,
            "frequency": "monthly"
          }
        }
      }
    },
    "size": 250
  }
}

