Procedure Quote -Date Range- Carrier Querry

For complex topics that regular users would not be interested in. For power users and database administrators.
Post Reply
grodrig1
Posts: 2
Joined: Tue Mar 18, 2008 11:07 am

Procedure Quote -Date Range- Carrier Querry

Post by grodrig1 » Tue Mar 18, 2008 11:09 am

Looking for a query for insurance codes in a given date range for a particular insurance. In other words, I need to know how many prophys where done between May 07 and Sept. 07 for Delta Dental.

Thanks

Guillermo

User avatar
Jorgebon
Posts: 502
Joined: Mon Jun 18, 2007 2:25 pm
Location: Mayaguez, PR
Contact:

Re: Procedure Quote -Date Range- Carrier Querry

Post by Jorgebon » Wed Mar 19, 2008 1:58 pm

Do you want a list of the patients who had those prophies or just a total number? If it's a total number, is it just for prophies or for all codes?
Jorge Bonilla, DMD
Jorge Bonilla DMD
Open Dental user since May 2005

User avatar
Jorgebon
Posts: 502
Joined: Mon Jun 18, 2007 2:25 pm
Location: Mayaguez, PR
Contact:

Re: Procedure Quote -Date Range- Carrier Querry

Post by Jorgebon » Wed Mar 19, 2008 2:38 pm

This query will give you a list of the patients with a count and the date of each prophy. It includes both adult and child prophies for all Delta plans.

SET @pos=0;
SELECT @pos:=@pos+1 as numberofpatients, carrier.CarrierName,procedurelog.ProcDate,patient.LName,patient.Fname
FROM patient,carrier,insplan,procedurelog,procedurecode
WHERE patient.PatNum=insplan.Subscriber
AND insplan.CarrierNum=carrier.CarrierNum
AND carrier.CarrierName LIKE '%Delta%'
AND patient.PatNum=procedurelog.PatNum
AND procedurelog.ProcDate>='2007-05-01'
AND procedurelog.ProcDate<='2007-09-30'
AND procedurelog.CodeNum=procedurecode.CodeNum
AND procedurecode.ProcCode LIKE '%D11%'
ORDER BY procedurelog.ProcDate

Is this what you need?
Jorge Bonilla, DMD
Jorge Bonilla DMD
Open Dental user since May 2005

grodrig1
Posts: 2
Joined: Tue Mar 18, 2008 11:07 am

Re: Procedure Quote -Date Range- Carrier Querry

Post by grodrig1 » Wed Mar 19, 2008 3:54 pm

Thanks Jorge; you are the best. Worked like a charm.

Post Reply