Page 1 of 1

Production by Procedure Code

Posted: Tue Dec 18, 2007 8:53 am
by asanders
How do I print production by procedure code? Thanks.

Posted: Tue Dec 18, 2007 11:04 am
by KimberlyBlunschi
This is definitely a report that we would love to have in our office.

Posted: Tue Dec 18, 2007 11:55 am
by drtech
I think this is the one that used to give me that info. I can't test it right now though because it is broken with the new database setup since the ADA code deal changed..I don't have the time today, but if someone knows how to fix this to work with the new Code Tables then it should be a good report.

SELECT definition.ItemName,
procedurelog.ADACode,
procedurecode.Descript,
Count(*),
AVG(procedurelog.ProcFee) AS $AvgFee,
SUM(procedurelog.ProcFee) AS $TotProcFee,
CAST((SUM(procedurelog.ProcFee)/(SELECT SUM(procedurelog.ProcFee) FROM procedurelog WHERE procedurelog.ProcStatus = '2' AND procedurelog.ProcDate>='2006-01-01' AND procedurelog.ProcDate<='2007-01-01')*100) AS DECIMAL(6,2)) AS Percentage

FROM procedurelog,procedurecode,definition

WHERE procedurelog.ProcStatus = '2'
AND procedurelog.ADACode=procedurecode.ADACode
AND definition.DefNum=procedurecode.ProcCat
AND procedurelog.ProcDate>='2007-01-01' AND procedurelog.ProcDate<='2008-01-01'

GROUP BY procedurelog.ADACode
ORDER BY definition.ItemOrder,procedurelog.ADACode

Posted: Tue Dec 18, 2007 12:43 pm
by kapricorn
I'm not sure if I am missing something or not.

Go to reports
go to proceedures
enter the date range
choose grouped by proceedure code

It should give what you are asking for.

Posted: Tue Dec 18, 2007 12:57 pm
by drtech
ha, yeah...that is similar to the report I was trying to do the hard way :p