API error during new patient creation

For requests or help with our API
Post Reply
rinse-rey
Posts: 23
Joined: Tue Sep 13, 2022 12:15 pm

API error during new patient creation

Post by rinse-rey » Mon Sep 26, 2022 7:37 am

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

SLeon
Posts: 476
Joined: Mon Mar 01, 2021 10:00 am

Re: API error during new patient creation

Post by SLeon » Mon Sep 26, 2022 8:10 am

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.

rinse-rey
Posts: 23
Joined: Tue Sep 13, 2022 12:15 pm

Re: API error during new patient creation

Post by rinse-rey » Mon Sep 26, 2022 8:42 am

That makes sense, thanks for the answer and for updating the documentation.

Post Reply