Data Mismatch between Definition Table Primary Key Value Defnums and Commlog Table for CommType

For requests or help with our API
Post Reply
ajaykodam
Posts: 32
Joined: Tue Aug 17, 2021 10:53 pm

Data Mismatch between Definition Table Primary Key Value Defnums and Commlog Table for CommType

Post by ajaykodam » Tue Nov 21, 2023 12:02 am

Recently, while accessing data via the API, we ran into a data issue related to Comm Log Notes. We discovered that the primary key value 'defnum' in the 'definition' table does not match the 'CommType'. This issue is prevalent for some records with more than 1 client.

For instance,
There are antiquated records in the 'CommLog' table that contain 'commType' values that do not correspond to a 'CommLogType' (i.e., a definition entry with a 'Category' of 27).

Please let me know the root cause of this.

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

Re: Data Mismatch between Definition Table Primary Key Value Defnums and Commlog Table for CommType

Post by SLeon » Tue Nov 21, 2023 9:51 am

Good morning,
ajaykodam wrote:
Tue Nov 21, 2023 12:02 am

There are antiquated records in the 'CommLog' table that contain 'commType' values that do not correspond to a 'CommLogType' (i.e., a definition entry with a 'Category' of 27).
You are seeing old commlogs in the dental office's database that do not correspond to a CommLogType/Category=27 definition but instead to a different category? Or do they not correspond to a valid defnum at all? When you say, "antiquated", how old are these commlogs and where they made within Open Dental or via the API?

ajaykodam
Posts: 32
Joined: Tue Aug 17, 2021 10:53 pm

Re: Data Mismatch between Definition Table Primary Key Value Defnums and Commlog Table for CommType

Post by ajaykodam » Tue Nov 28, 2023 6:14 am

SLeon,
You are seeing old commlogs in the dental office's database that do not correspond to a CommLogType/Category=27 definition but instead to a different category? Or do they not correspond to a valid defnum at all? When you say, "antiquated", how old are these commlogs and where they made within Open Dental or via the API?
They are not correspond to a valid defnum to respective commlogs and it happens to CommLogType/Category=27. Yes old commlogs having this issue from 2019 and 2020 most of them.

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

Re: Data Mismatch between Definition Table Primary Key Value Defnums and Commlog Table for CommType

Post by SLeon » Tue Nov 28, 2023 8:27 am

Good morning,

Thank you for that clarification. The commlog.CommType field was an Enumeration datatype and not a definition in Open Dental versions before 5.5.0. If the dental office was on an early version of Open Dental in the 2019-2020 time frame, that may explain the difference you are seeing.

The old enumeration values can be found in our older database schema.

Post Reply