Page 1 of 1

Procedure Quote -Date Range- Carrier Querry

Posted: Tue Mar 18, 2008 11:09 am
by grodrig1
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

Re: Procedure Quote -Date Range- Carrier Querry

Posted: Wed Mar 19, 2008 1:58 pm
by Jorgebon
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

Re: Procedure Quote -Date Range- Carrier Querry

Posted: Wed Mar 19, 2008 2:38 pm
by Jorgebon
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

Re: Procedure Quote -Date Range- Carrier Querry

Posted: Wed Mar 19, 2008 3:54 pm
by grodrig1
Thanks Jorge; you are the best. Worked like a charm.