Data Mismatch between Provider Table Primary Key Value ProvNum and ProcedureLog Table for ProvNum

For requests or help with our API
Post Reply
kashgoyal
Posts: 8
Joined: Thu Jun 08, 2023 11:40 am

Data Mismatch between Provider Table Primary Key Value ProvNum and ProcedureLog Table for ProvNum

Post by kashgoyal » Fri Dec 08, 2023 7:28 am

Hi Team,
Recently, while trying to access the data via API, we came across a data issue related to Procedure log. We discovered that the primary key value ‘ProvNum’ in the ‘Provider’ table does not match the ‘ProvNum’ in ‘ProcedureLog’ table.

All these records in the ‘ProcedureLog’ table are having ‘ProvNum’ as 0 which do not corresponds to a valid entry in Provider table (i.e., a provider entry with ProvNum 0). Also all these records have proc status as 6 which means deleted. Is there any such use case in Open Dental where deleted Procedures can have ProvNum as 0?

Can you please let us know the root cause of this?

allends
Posts: 235
Joined: Fri Aug 23, 2013 11:29 am

Re: Data Mismatch between Provider Table Primary Key Value ProvNum and ProcedureLog Table for ProvNum

Post by allends » Tue Dec 12, 2023 11:11 am

In general, deleted procedures will actually be saved with a provider.
It is possible that deleted procedures will be saved to the database with a ProvNum of 0 though.
When that happens you can just assume that the procedure was canceled/deleted before it was fully added and the procedure itself can be ignored.
Allen
Open Dental Software
http://www.opendental.com

kashgoyal
Posts: 8
Joined: Thu Jun 08, 2023 11:40 am

Re: Data Mismatch between Provider Table Primary Key Value ProvNum and ProcedureLog Table for ProvNum

Post by kashgoyal » Wed Dec 20, 2023 7:03 am

Thanks for the confirmation Allen.

Post Reply