Duplicate Recalls

For users or potential users.
Post Reply
V Suite
Posts: 136
Joined: Sun Aug 19, 2007 6:56 pm

Duplicate Recalls

Post by V Suite » Sun May 30, 2010 12:32 am

On running Database Maintenance, I get this message,

"Warning! Number of patients with duplicate recalls: 236. including: .... {names}"

What does duplicate recall mean, and how do I fix it, or do I need to?

Thanks

User avatar
jordansparks
Site Admin
Posts: 5746
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Duplicate Recalls

Post by jordansparks » Sun May 30, 2010 6:51 am

That message was intended to catch one or two stray duplicates. That's the first time I've seen more than that. Here's how to fix it: Open a patient listed. Family module. Double click on recall grid at top. Delete the obvious duplicate. Repeat for each of the other patients.
What version are you using, though?
Jordan Sparks, DMD
http://www.opendental.com

V Suite
Posts: 136
Joined: Sun Aug 19, 2007 6:56 pm

Re: Duplicate Recalls

Post by V Suite » Sun May 30, 2010 4:41 pm

Thanks Jordan

Version 6.9.31.

Not sure when that came about, maybe when I setup Perio recall and some non-standard recalls (implant & denture). The first patient had both Perio & Prophy.

The list only shows 16 names. So I'll need to delete them one by one to see the rest. I don't want to go through patient by patient. Is there a query to list all the affected patients with all the recalls so I can understand what happened better?

Thanks

User avatar
jordansparks
Site Admin
Posts: 5746
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Duplicate Recalls

Post by jordansparks » Mon May 31, 2010 9:26 am

First,

Code: Select all

SELECT * FROM recalltype
Look at the RecallTypeNum for perio and for prophy, and plug them into the query below

Code: Select all

SELECT FName,LName,COUNT(*) countDups
FROM patient 
LEFT JOIN recall ON recall.PatNum=patient.PatNum 
AND (recall.RecallTypeNum=[periotype] OR recall.RecallTypeNum=[prophytype]) 
GROUP BY patient.PatNum HAVING countDups>1
So, for example,

Code: Select all

SELECT FName,LName,COUNT(*) countDups
FROM patient 
LEFT JOIN recall ON recall.PatNum=patient.PatNum 
AND (recall.RecallTypeNum=3 OR recall.RecallTypeNum=1) 
GROUP BY patient.PatNum HAVING countDups>1
Jordan Sparks, DMD
http://www.opendental.com

Post Reply