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 !
How to sync patfields back to our system from OD ?
-
- Posts: 7
- Joined: Fri Nov 11, 2022 1:05 am
Re: How to sync patfields back to our system from OD ?
Good morning,
We can do the following to support your use case:
We can do the following to support your use case:
- 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.
- 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.
-
- Posts: 7
- Joined: Fri Nov 11, 2022 1:05 am
Re: How to sync patfields back to our system from OD ?
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 ?
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 ?
Re: How to sync patfields back to our system from OD ?
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.
Re: How to sync patfields back to our system from OD ?
Hello vinayaka2000,vinayaka2000 wrote: ↑Thu Dec 01, 2022 1:44 amThanks 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 ?
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!
Re: How to sync patfields back to our system from OD ?
Hello vinayaka2000,vinayaka2000 wrote: ↑Thu Dec 01, 2022 1:44 amThanks 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 ?
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.