Skip to main content
PUT
/
medical
/
v1
/
patient
/
:id
/
treatment-relationship
Treatment Relationship
curl --request PUT \
  --url https://api.sandbox.metriport.com/medical/v1/patient/:id/treatment-relationship \
  --header 'x-api-key: <api-key>'
import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriport = new MetriportMedicalApi("YOUR_API_KEY");

const patientId = "018a80c4-292a-7486-a1234-9uiu76yhe234";
const treatmentRelationship = false;
const { treatmentRelationship: updatedConsent, message } =
  await metriport.updatePatientTreatmentRelationship(patientId, treatmentRelationship);
The treatment relationship endpoint allows you to control whether a patient has treatment relationship consent. Patients without consent cannot be assigned to treatment cohorts. Revoking consent automatically removes the patient from all treatment cohorts. Operations cohorts are unaffected.

Query Params

treatmentRelationship
boolean
required
Set to true to grant treatment relationship consent, or false to revoke it

Path Params

id
string
required
The ID of the patient whose treatment relationship consent should be updated

Response

Returns a JSON object with the following properties:
id
string
The patient’s ID
treatmentRelationship
boolean
The patient’s current treatment relationship consent. true indicates consent is granted
message
string
A human-readable message confirming the update
import { MetriportMedicalApi } from "@metriport/api-sdk";

const metriport = new MetriportMedicalApi("YOUR_API_KEY");

const patientId = "018a80c4-292a-7486-a1234-9uiu76yhe234";
const treatmentRelationship = false;
const { treatmentRelationship: updatedConsent, message } =
  await metriport.updatePatientTreatmentRelationship(patientId, treatmentRelationship);

Notes