Notifications
Clear all
Topic starter
Prior to creating one, I wanted to see if anyone has a report/inquiry/SQL query for pulling the top 100 diagnosis codes billed within a date range.
Thanks!
Posted : June 28, 2016 2:38 am
This should work for you.
SELECT distinct top 150(Code),COUNT(Code) as count,pvd.Description
FROM patientvisitdiags pvd
left outer join PatientVisit pv on pvd.PatientVisitId = pv.PatientVisitId
where pv.Visit between 'date 1' and 'date 2'
group by code,pvd.Description
order by count desc
Posted : June 28, 2016 3:52 am