Page 1 of 1
Duplicate Recalls
Posted: Sun May 30, 2010 12:32 am
by V Suite
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
Re: Duplicate Recalls
Posted: Sun May 30, 2010 6:51 am
by jordansparks
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?
Re: Duplicate Recalls
Posted: Sun May 30, 2010 4:41 pm
by V Suite
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
Re: Duplicate Recalls
Posted: Mon May 31, 2010 9:26 am
by jordansparks
First,
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