For more information, see the guide about Cohorts
Path Params
The ID of the cohort to update.
The ETag value for optimistic concurrency control. If
provided, the update will only succeed if the current ETag
matches this value.
Body
All fields are optional for updates. The API performs partial updates:
Omitted fields remain unchanged - only include fields you want to modify
To update a field - simply include the new value
The name of the cohort. The name must be unique within your organization.
The color associated with the cohort. Must be one of: red , green , blue , yellow , purple , orange , pink , brown , gray , black , white . Defaults to white on creation if no color is given.
A description of the cohort and its purpose.
Examples
Partial update example:
{
"name" : "Updated Cohort Name"
}
In this example, only the name field is updated. All other fields remain unchanged.
Clearing fields example:
This removes the description and leaves the rest of the details the same.
Response
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. 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
Enable or disable scheduled data pulls for HIE monitoring. Defaults to disabled.
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.
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
Enable or disable ADT monitoring notifications. Defaults to disabled.
Pharmacy / medication history monitoring - enables retail fill data monitoring where available. Show pharmacy object properties
Enable/disable pharmacy monitoring notifications. Defaults to disabled.
Enable pharmacy data pulls at scheduled dates. 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.
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
Enable/disable laboratory monitoring notifications. Defaults to disabled.
The number of patients assigned to this cohort.
import { MetriportMedicalApi } from "@metriport/api-sdk" ;
const metriport = new MetriportMedicalApi ( "YOUR_API_KEY" );
const cohort = await metriport . updateCohort (
{
id: "00000000-0000-0000-0000-000000000000" ,
name: "High Risk" ,
description: "Patients that need frequent and robust monitoring."
}
);
{
"id" : "00000000-0000-0000-0000-000000000000" ,
"eTag" : "2" ,
"name" : "High Risk" ,
"description" : "Patients that need frequent and robust monitoring." ,
"color" : "red" ,
"settings" : {
"monitoring" : {
"hie" : {
"enabled" : true ,
"frequency" : "weekly"
},
"adt" : {
"enabled" : true
},
"pharmacy" : {
"notifications" : true ,
"schedule" : {
"enabled" : false ,
"frequency" : "monthly"
}
},
"laboratory" : {
"notifications" : true
}
}
},
"size" : 0
}