We are currently updating the OP Help Center content for the release of OP 14.19 or OP 19. OP 19 is a member of the certified OP 14 family of products (official version is 14.19.1), which you may see in your software (such as in Help > About) and in the Help Center tabs labeled 14.19. You may also notice that the version number in content and videos may not match the version of your software, and some procedural content may not match the workflow in your software. We appreciate your patience and understanding as we make these enhancements.

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