Regarding API Subscription

For requests or help with our API
Post Reply
beacondental
Posts: 92
Joined: Wed Mar 15, 2023 8:43 am

Regarding API Subscription

Post by beacondental » Fri Sep 22, 2023 3:17 am

Hello team,

We have reviewed the API subscription and event documentation and have successfully subscribed to receive appointments. However, we are receiving batches of 1000 appointments every 5 seconds, even when there is no change in the response.
Could you please guide us on how to listen for events when an appointment is created or scheduled? Additionally, we need a list of events for both database and UI-based events in order to fulfill our requirements using various events.

Thank you.

JTS
Posts: 38
Joined: Thu Aug 18, 2022 12:56 pm

Re: Regarding API Subscription

Post by JTS » Fri Sep 22, 2023 8:55 am

Good morning,

If you're getting multiple batches with the exact same contents, you may need to specify a Workstation. Otherwise, multiple workstations will be sending the same event contents. Furthermore, if any changes are made to an appointment by any source, then that appointment will be included in the next event batch. Are the appointments being modified by any other sources?
To listen for appointment created and appointment scheduled events, all that is required is a subscription with a WatchTable of "Appointment". This subscription will see both new and updated appointments, and send an event containing both.
For a list of supported database and UI events, please see https://www.opendental.com/site/apievents.html.

beacondental
Posts: 92
Joined: Wed Mar 15, 2023 8:43 am

Re: Regarding API Subscription

Post by beacondental » Tue Sep 26, 2023 3:55 am

Good morning,

I am writing to inquire about the available options for filtering appointment data in the subscribed polling-seconds time. Currently, we are receiving a large number of appointments, including cases where a user simply double-clicks to view an appointment from the UI.

I noticed there is a "UiEventType" field in the subscription JSON. Is there an equivalent field that indicates changes in the database?

We are particularly interested in identifying newly created or updated appointments efficiently, without having to compare a large dataset every few seconds. Could you please advise if there are specific events or types we can subscribe to for this purpose?

Additionally, we are keen on listening for events such as "submitting patient referral forms" and others. Could you provide a list of events available for both the UI and the database? This information will greatly assist us in leveraging this service effectively.

Thank you for supporting us in optimizing our workflow.

JTS
Posts: 38
Joined: Thu Aug 18, 2022 12:56 pm

Re: Regarding API Subscription

Post by JTS » Tue Sep 26, 2023 8:59 am

Good morning,

The database equivalent of the "UiEventType" field is the "WatchTable" field. Subscriptions with a WatchTable specified will monitor said table for any recent additions or changes at the rate of the number of seconds supplied for "PollingSeconds".

To identify newly created or updated appointments, you would want to create a subscription with a WatchTable of "Appointment". For more information about how to create database events, please see https://www.opendental.com/site/apisubscriptions.html.

For a list of supported database and UI event types, please see https://www.opendental.com/site/apievents.html.

Post Reply