How to sync patfields back to our system from OD ?

For requests or help with our API
Post Reply
vinayaka2000
Posts: 7
Joined: Fri Nov 11, 2022 1:05 am

How to sync patfields back to our system from OD ?

Post by vinayaka2000 » Wed Nov 30, 2022 9:26 am

Hello !

I have a use-case where in I have to sync back all data from the patfields table back to our lead management system, when they are updated in OD. I have identified that we might be able to use "POST subscription" API to create a new webhook, the only tables that can be watched for updates are patient and appointment. But, I need the patfields table.

So, the only way out is to query a GET Patfields using a specific patNum and FieldName.
However, I would not know the exact patNum since I'm trying to develop a batch job where in I have to sync the patfields table data when patfield table is updated from OD back to our system.

Can you please help us with this? Much obliged !

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

Re: How to sync patfields back to our system from OD ?

Post by SLeon » Wed Nov 30, 2022 10:38 am

Good morning,

We can do the following to support your use case:
  1. Enhance the existing PatFields GET method. We can make the PatNum and FieldName optional parameters and add SecDateTEdit as a new parameter. This would allow you to only get PatFields that have changed since a certain datetime. We would add the SecDateTEdit field to the returned list of PatFields as well. You could keep your data up to date manually using this method.
  2. Enhance ApiEvents to allow PatField subscriptions. This would be a database event (similar to patients) that fires whenever a change has been made to the PatField table. You could keep your data up to date automatically with this method, depending on how you set up your webhook service.
Depending on your application, you may choose to use one or both of the above implementations. Does this cover your intended use case?

vinayaka2000
Posts: 7
Joined: Fri Nov 11, 2022 1:05 am

Re: How to sync patfields back to our system from OD ?

Post by vinayaka2000 » Thu Dec 01, 2022 1:44 am

Thanks for the reply!
The second implementation would be better in our case since the webhook can be triggered automatically without any intervention. Just wanted to know the ETA for the patfield subscription feature being added to the API ?

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

Re: How to sync patfields back to our system from OD ?

Post by SLeon » Fri Dec 02, 2022 8:08 am

We will develop both of these options, but prioritize the latter subscription one for you. I would expect this to be complete in roughly three weeks' time.

justine
Posts: 168
Joined: Tue Dec 28, 2021 7:59 am

Re: How to sync patfields back to our system from OD ?

Post by justine » Wed Jan 04, 2023 8:35 am

vinayaka2000 wrote:
Thu Dec 01, 2022 1:44 am
Thanks for the reply!
The second implementation would be better in our case since the webhook can be triggered automatically without any intervention. Just wanted to know the ETA for the patfield subscription feature being added to the API ?
Hello vinayaka2000,

PatFields has been enhanced. Please see updated documentation:
https://www.opendental.com/site/apipatfields.html

To use the enhanced PatFields, please update to 22.4.6.

As for the rest of your request, adding the ability to utilize Events and Subscriptions with PatFields is currently in development. We will update this post when it is complete.

Thanks!

justine
Posts: 168
Joined: Tue Dec 28, 2021 7:59 am

Re: How to sync patfields back to our system from OD ?

Post by justine » Fri Jan 06, 2023 9:55 am

vinayaka2000 wrote:
Thu Dec 01, 2022 1:44 am
Thanks for the reply!
The second implementation would be better in our case since the webhook can be triggered automatically without any intervention. Just wanted to know the ETA for the patfield subscription feature being added to the API ?
Hello vinayaka2000,

The PatField table can now be monitored via an API Subscription. This enhancement will be available for use in our next beta version, 22.4.8, which is estimated to be released next week.

Post Reply