Important Content Update Message
We are currently updating the OP Help Center content for OP 20. We appreciate your patience as we continue to make these updates. To locate the version of your software, navigate to: Help tab > About.

SQL: CPT Frequency of Dates


Shows CPT codes with frequency for a given time period.

A sample image of this SQL report run in the Database Viewer is shown below:


The report gives both the frequency and total units for each CPT code.   Frequency is the number of times it was billed during the period; total units is the total number of units billed during the period.  These numbers will be the same for CPTs that can only be billed once per day per patient (e.g. 99213); however, codes which are often billed in multiple units (e.g. 90461) will have a much higher “total units” count than “frequency” count.


To highlight and copy the code below to your clipboard, simply click the Copy button.

select cptcode, count(cptcode) as frequency, sum(units) as total_units from (
select patno, date1, cptcode, units from archive_transactions where date1 between :Start_date and :end_date and archive_Flag = 1) 
group by cptcode
order by total_units desc