API Events | PatFields Events do not fire when PatFieldValue is cleared

For requests or help with our API
Post Reply
rinse-dental
Posts: 78
Joined: Wed Apr 06, 2022 12:04 pm

API Events | PatFields Events do not fire when PatFieldValue is cleared

Post by rinse-dental » Fri Apr 26, 2024 7:13 pm

Current behavior: PatField Events do not trigger when a PatFieldValue is cleared or otherwise set to an empty string. At least one char must be in the field in order for an event to trigger.

Desired behavior: PatField Events trigger anytime New PatFieldValue != Old PatFieldValue.

I haven't fully tested the other events; however, Patient Events do appear to trigger if the FName or LName are cleared.

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

Re: API Events | PatFields Events do not fire when PatFieldValue is cleared

Post by SLeon » Mon Apr 29, 2024 8:02 am

Entering an empty string value for a PatField in the Open Dental program results in the deletion of that row. Subscriptions work by querying the database for items in the table (eg patfields) that have changed since the last batch of events are sent. Specifically for the patfield table, the query grabs rows where the SecDateTEdit is greater than the subscription.DateTimeStart. Because deleted items are no longer in the table, they are not returned in this dataset.

rinse-dental
Posts: 78
Joined: Wed Apr 06, 2022 12:04 pm

Re: API Events | PatFields Events do not fire when PatFieldValue is cleared

Post by rinse-dental » Mon Apr 29, 2024 9:22 am

Okay, thanks. Please consider this a request for a PatFields Delete Event API.

Thank you!

Post Reply