Page 1 of 1

API error during new patient creation

Posted: Mon Sep 26, 2022 7:37 am
by rinse-rey
Hi There,

I have seen a new error on the API when I try to create a new patient with a First Name and Last Name that already exist in the database.

The error is: A Patient with that information already exists in the database

In the past, I never saw this error. Did something change on the database schema of OD?

I'm using OD version 22.2.31

Re: API error during new patient creation

Posted: Mon Sep 26, 2022 8:10 am
by SLeon
Good morning,

The error message you are seeing is not new and is meant to prevent duplicate patients from being added via the API. Our Patients POST method will return this message when you attempt to create a patient with the exact same FName, LName, Birthdate, and either Email or phone number as an already existing patient. The phone number matching checks for any match amongst the HmPhone, WkPhone, and WirelessPhone fields (meaning an incoming "WkPhone":"123456789" will return this message if it finds a "WirelessPhone":"123456789"). I have update our documentation to make this more clear.

There have not been any changes in the schema for this version involving patients. If you believe you are erroneously seeing this response, please let me know, and include a copy of the request you are sending.

Re: API error during new patient creation

Posted: Mon Sep 26, 2022 8:42 am
by rinse-rey
That makes sense, thanks for the answer and for updating the documentation.