curl --request DELETE \
--url https://api.sandbox.metriport.com/medical/v1/cohort/{id}/patient \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"patientIds": [
"<string>"
],
"allPatients": true
}
'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
});
Bulk remove patients from a cohort.
curl --request DELETE \
--url https://api.sandbox.metriport.com/medical/v1/cohort/{id}/patient \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"patientIds": [
"<string>"
],
"allPatients": true
}
'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
});
patientIds or allPatients, but not both.
allPatients property.patientIds array.Show Cohort properties
00000000-0000-0000-0000-000000000000).Show Settings properties
Hide monitoring object properties
Show hie object properties
weekly or biweekly or monthly. Defaults to monthly.Show adt object properties
Show pharmacy object properties
Show schedule object properties
weekly or biweekly or monthly. Defaults to monthly.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
});
{
"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
}
}
},
"size": 250
}
}