curl --request POST \ --url https://api.sandbox.metriport.com/medical/v1/patient/:id/external/sync \ --header 'x-api-key: <api-key>'
Copy
Ask AI
import { MetriportMedicalApi } from "@metriport/api-sdk";const metriport = new MetriportMedicalApi("YOUR_API_KEY");const metriportPatientId = "018a80c4-292a-7486-a1234-76yuhe23yu14";const synchronizedIds = await metriport.syncPatient( metriportPatientId, "healthie");
Patient
Sync Patient
Create a link between Metriport Patient and external system.
POST
/
medical
/
v1
/
patient
/
:id
/
external
/
sync
Sync Patient
Copy
Ask AI
curl --request POST \ --url https://api.sandbox.metriport.com/medical/v1/patient/:id/external/sync \ --header 'x-api-key: <api-key>'
Copy
Ask AI
import { MetriportMedicalApi } from "@metriport/api-sdk";const metriport = new MetriportMedicalApi("YOUR_API_KEY");const metriportPatientId = "018a80c4-292a-7486-a1234-76yuhe23yu14";const synchronizedIds = await metriport.syncPatient( metriportPatientId, "healthie");
This endpoint can be used in situations where the Patient synchronization with external systems/EHR cannot be automatically performed, either because there’s no capability on said system or because the Patient was created before the integration took place.In these situations, customers are asked to create the Patient in Metriport and call this endpoint to synchronize the Patient with the EHR.
If not included, Metriport will check if the Patient is
mapped to a single external ID to infer the EHR to sync
with. If included, it must be elation or healthie.
Results in HTTP status code 400 if Metriport cannot
determine a single EHR.