Personal tools
You are here: Home / OSCAR Users / EMR and Case Management Resources / Report Templates / Reports patient yearly appointment totals by provider
Navigation
 

Reports patient yearly appointment totals by provider

By Pat Morphy --- Hi Dr. Klein, That was such an interesting challenge, I couldn't pass it up. Here's what I came up with: This RbT query lets you pick the date range and provider. If your date range spans more than 1 year it will give totals for each year. Feedback always welcome.

Plain Text icon Yearly appointment totals Report by Template.txt — Plain Text, 1 kB (1319 bytes)

File contents

<report title="Appointment counter" description="Reports patient yearly appointment totals by provider" active="1">

<query>

SELECT demographic_no AS 'DEMO #',
name AS 'PATIENT_NAME',
a.provider_no AS 'PROVIDER_NO',
CONCAT('Dr. ', p.last_name) AS 'DOCTOR_NAME',
COUNT(demographic_no) AS 'NUM_OF_APPT',
LEFT(appointment_date, 4) AS 'APPT_YEAR'

FROM appointment a,
provider p

WHERE appointment_date > '{start_date}'
AND appointment_date < '{end_date}'
AND p.provider_no = a.provider_no
AND p.ohip_no = {provider}
AND a.status <> 'N'
AND a.status <> 'C'
AND a.demographic_no <> '0'

GROUP BY APPT_YEAR, demographic_no HAVING COUNT(NUM_OF_APPT) > '{min_appt_num}'

ORDER BY PATIENT_NAME, APPT_YEAR;


</query>

<param id="min_appt_num" type="text" description="Min. # of Appts.">
</param>
                
<param id="start_date" type="date" description="Start Date">
</param>

<param id="end_date" type="date" description="End Date">
</param>

<param id="provider" type="list" description="Provider Name">
<param-query>

SELECT
ohip_no,
CONCAT('Dr. ',last_name) AS NUM,
CONCAT(last_name,', ',first_name, ' #', ohip_no) AS PROVIDER

FROM provider

WHERE provider.ohip_no <> ''
AND provider.billing_no <> ''

ORDER BY last_name;

</param-query>
</param>


</report>

Document Actions

 

Download button

DOWNLOAD OSCAR FOR TESTING

 

eForms button

DOWNLOAD SHARED E-FORMS


 Customize button

FIND PLUG-INS AND TWEAKS
FOR YOUR OSCAR EMR

 

Subscribe Button

SUBSCRIBE TO DISCUSSION LIST 
(SEE ALL LISTS)

  

Help button

ACCESS THE ONLINE MANUALS
(PAID SUPPORT)