6.9.1 "Invalid Tooth ID" error
Posted: Fri Jan 01, 2010 3:13 pm
continuing from another thread:
this problem plagued us for a couple of days, preventing us from opening the chart module for several thousand patients (but leaving others working just fine).
we poked around in the data tables and found some patients with garbage in the Surf column of procedurelog, and all of these had ProcDates prior to our conversion from Dentrix some months ago. so this is probably a conversion problem from Dentrix, but i can't verify that.
you can find any of these patients in your data tables by looking with this query (uncomment GROUP BY line to get list of patients):
this correlated with the patient's that threw the error.
it seemed like OD was (in the latest chart rendering version) having trouble dealing with these garbage values. i tried to remove the garbage values with:
and while that removed the garbage, it still didn't fix the "Invalid Tooth ID" error, and we still couldn't open a lot of patient's charts.
looking through the patient records, it looked these patients all had some sort of procedure that required a tooth range, but didn't have a range in the ToothRange column. i suspect that was a glitch with the Dentrix conversion that may hit a number of OD users.
i was able to narrow the thing down by looking for patients with empty ToothRange values, where the procedure would normally require them.....
i was able to fix many of these cases with the following query:
there was a similar group of patients who had procedures requiring an arch, but having no "U" or "L" values in the Surf column of procedurelog
we were able to find them with this query:
but the problem is that i would have to go through each patient record individually to find out what arch the [usually denture] belonged to, so i compromised and set them all as "U"
this last query seemed to do the trick and hopefully we have banished the "Invalid Tooth ID" error from our OpenDental universe:
this post should be reviewed by OD team before being sure of it's user scopeRickliftig wrote:Also, I am getting a fair number of Unhandled exception errors: Tooth ID not valid
"Continue" hangs the program (just the chart part)
this problem plagued us for a couple of days, preventing us from opening the chart module for several thousand patients (but leaving others working just fine).
we poked around in the data tables and found some patients with garbage in the Surf column of procedurelog, and all of these had ProcDates prior to our conversion from Dentrix some months ago. so this is probably a conversion problem from Dentrix, but i can't verify that.
you can find any of these patients in your data tables by looking with this query (uncomment GROUP BY line to get list of patients):
Code: Select all
SELECT PatNum, ProcDate, Surf
FROM procedurelog p
WHERE Surf <''
#GROUP BY PatNum
ORDER BY PatNumit seemed like OD was (in the latest chart rendering version) having trouble dealing with these garbage values. i tried to remove the garbage values with:
Code: Select all
UPDATE procedurelog p
SET Surf = ''
WHERE Surf <''looking through the patient records, it looked these patients all had some sort of procedure that required a tooth range, but didn't have a range in the ToothRange column. i suspect that was a glitch with the Dentrix conversion that may hit a number of OD users.
i was able to narrow the thing down by looking for patients with empty ToothRange values, where the procedure would normally require them.....
Code: Select all
SELECT ProcNum, PatNum, ProcDate, Surf, ToothNum, ToothRange, ProcStatus, CodeNum
FROM procedurelog p
WHERE ToothRange = ''
AND CodeNum IN
(SELECT CodeNum
FROM procedurecode p
WHERE TreatArea = 7)
ORDER BY PatNumCode: Select all
UPDATE procedurelog p
SET ToothRange = ToothNum
WHERE ToothRange = ''
AND CodeNum IN
(SELECT CodeNum
FROM procedurecode p
WHERE TreatArea = 7)we were able to find them with this query:
Code: Select all
SELECT ProcNum, PatNum, ProcDate, Surf, ToothNum, ToothRange, ProcStatus, CodeNum
FROM procedurelog p
WHERE Surf = ''
AND CodeNum IN
(SELECT CodeNum
FROM procedurecode p
WHERE TreatArea = 6)
GROUP BY PatNum
ORDER BY PatNumthis last query seemed to do the trick and hopefully we have banished the "Invalid Tooth ID" error from our OpenDental universe:
Code: Select all
UPDATE procedurelog p
SET Surf = 'U'
WHERE Surf = '' # edited to reflect js's better query
AND CodeNum IN
(SELECT CodeNum
FROM procedurecode p
WHERE TreatArea = 6)