We are currently updating the OP Help Center content for the release of OP 19, which is a member of the certified OP 14 family of products. OP 19’s 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: Today’s No Shows with Previous No Show Activity

About

This report shows list of patients who no-showed today, along with their no-show list prior to today.

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

Caveats

Includes both hard (“No Show”) and soft (“No Show*) statuses.

Code

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

select a.*, old_no_show from
(
select patno, fname, lname, appt_date from schedule
inner join register on register.patno = schedule.patno
 where cast('today' as date) = appt_date and patno >99 and visit_status like '%No Show%'
) a
left outer join (select list(appt_date) as old_no_show, patno from schedule where visit_status like '%No Show%' and appt_date < cast('today' as date) and patno in 
(select patno from schedule
inner join register on register.patno = schedule.patno
 where cast('today' as date) = appt_date and patno >99 and visit_status like '%No Show%') group by patno
) s on a.patno = s.patno