PUT
/
medical
/
v1
/
patient
/
:id
/
hie-opt-out
curl --request PUT \
  --url https://api.sandbox.metriport.com/medical/v1/patient/:id/hie-opt-out \
  --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 hieOptOut = true;
const { hieOptOut, message } = await metriport.updatePatientHieOptOut(patientId, hieOptOut);

The HIE opt-out endpoint allows you to control whether a patient participates in data sharing and pulling through health information exchanges. When a patient is opted out, they will not participate in data exchange through the networks.

Query Params

hieOptOut
boolean
required

Set to true to opt the patient out of HIE data sharing, or false to opt them in

Path Params

id
string
required

The ID of the patient whose HIE opt-out status should be updated

Response

Returns a JSON object with the following properties:

id
string

The patient’s ID

hieOptOut
boolean

The patient’s current opt-out status. true indicates the patient is opted out of HIE data sharing

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 hieOptOut = true;
const { hieOptOut, message } = await metriport.updatePatientHieOptOut(patientId, hieOptOut);