Appointment Status

sunsetsystems wrote on Wednesday, July 06, 2005:

A client asked me to implement an appointment status indicator in the calendar display.  I’m thinking this would be a special character that replaces the “-” that currently appears between the appointment time and the patient name for each calendar event.  The special character would be one of the following:

- = not otherwise applicable
* = reminder call completed
+ = chart pulled
? = no show
@ = patient arrived
# = left without being seen
< = visit in progress
> = checked out
$ = coding complete

So for example patient Jim Jones in the waiting room with a 9:15 appointment would appear on the calendar as:

15@Jones,Jim

Comments?

– Rod <rod at sunsetsystems dot com>

tekknogenius wrote on Wednesday, July 06, 2005:

Making it a character makes it quick to render, but kinda cryptic. Icons may be too much overhead for multiple calendars, I suppose, right? How about (again going back to a previous suggestion about long -vs- short display) the Long would have two rows for each appointment, 1st row to show as it is now, the second row would show the meaning of the symbol and perhaps the event category.

How do you envision these statuses being updated? I assume one would have to update the status as it occurs, but how? Click on appointment "special char" and change it from there or will it be a select list and change it from there? How about color? Is it a mess/or too much overhead having separate colors for each status (kinda like in previous versions)

sunsetsystems wrote on Wednesday, July 06, 2005:

Icons might look nicer, depending on the quality of the art - I’m not a good artist.  And of course the <img> tags would take up more space, not a big deal but something to consider.

The statuses would be updated with the new popup event editor, which you bring up by clicking on the numeric portion of the event display.

For a 1- or 2-doc practice you might be happer with the long display on a single line (so you see more of the calendar at once without scrolling around).

Colors would be easy to implement, this would go into the default.html template for the day/week view.  We might be better off using color to indicate event category (as before) rather than appointment status.  Remember, the event categories table has a color attribute for each event category.

– Rod <rod at sunsetsystems dot com>

avedis wrote on Wednesday, July 06, 2005:

I’m not really in a position to be answering questions on the developer forum, but I’ll make some comments from a practical/clerical point of view.

This scheme puts the secretary in the position of having to enter data several more times for each patient visit - the reminder call would probably happen a few days before the visit, pulling the chart might happen the day before, then when the patient arrives, when they go into the exam room, when they come out…yikes! I can’t imagine that there’s enough time to do all those entries in an office that’s busy enough to need a code for “left without being seen.” 

I think the only ones that make sense are for a no-show and for coding complete.

OK, looking around a bit, I see that a no-show is indicated by changing the event category for that appointment. Appointments marked as a no-show don’t appear on an Appointment-Encounter report for that date - I wouldn’t mind seeing them there, but maybe others have different ideas about that. I tried the Count No-Shows… report, but I get the following error message -

Count No Shows By Provider since Interval ago    Wednesday, July 6, 2005
Query failed: SELECT concat( u.fname, " ", u.lname ) AS “Provider Name”, u.id AS “Provider ID”, count( DISTINCT ev.pc_eid ) AS “Number of No Shows” , concat(DATE_FORMAT(NOW(),’%Y-%m-%d’), ’ and ‘,DATE_FORMAT(DATE_ADD(now(), INTERVAL 2005-07-01),’%Y-%m-%d’) ) as “Between Dates” FROM `openemr_postcalendar_events` AS ev LEFT JOIN users AS u ON ev.pc_aid = u.id WHERE ev.pc_catid =1 and ( ev.pc_eventDate >= DATE_SUB(now(), INTERVAL 2005-07-01) ) GROUP BY u.id;, You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘),’%Y-%m-%d’) ) as “Between Dates” FROM `openemr_postcalendar

sunsetsystems wrote on Wednesday, July 06, 2005:

Actually you are in a perfect position to comment on this.  Thank you!  :slight_smile:

Let’s look at reminder calls.  If you are making the calls then you need to keep track of who you have connected with and who you need to try again, right?  What steps do you perform to do that now?  If you work from a paper list, how is the list generated and how do you update it as more appointments are entered?  Is all of that that easier than clicking on an appointment, selecting a new status from a drop-list, and saving the appointment?

Yes, no-show is an event category but I think that’s an inappropriate use of categories and should be changed.  It’s more like a disposition of the event rather than the type of event – i.e. if you change the category to no-show then you lose the information about what the category was before.

Agreed, some clinics may not care about some statuses, in which case they can simply not use them.  On the other hand if some are useless then we should not have them in the system.

Yes it looks like the no-shows report doesn’t work.  I never tried to use it before.

– Rod <rod at sunsetsystems dot com>

avedis wrote on Thursday, July 07, 2005:

Well, I hadn’t given the reminder calls much thought, because I don’t do them. It does make sense to just have to enter them once, rather than go back and forth between computer and paper.

>if you change the category to no-show then you lose the information about what the category was before.

Good point. I’m still on paper, so I don’t lose that information, and I wouldn’t really want to lose it.

While I’ve got your attention on the reports page, I also got an error with the Superbill Report. If it helps, the version of mysql that I’m using is Ver 12.21 Distrib 4.0.15, for pc-linux (i686). I looked in the manual, and I think it wants separators in the dates.

Warning: Missing argument 2 for helpfuldie() in /usr/local/apache2/htdocs/openemr/library/sql.inc on line 120

ERROR: query failed: select * from forms where form_name=‘New Patient Encounter’ and date between DATE(‘20050604’) and DATE(‘20050706’) order by date DESC (You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘(‘20050604’) and DATE(‘20050706’) order by date DESC’ at line 1)

sunsetsystems wrote on Thursday, July 07, 2005:

Thanks for the feedback.

It appears the problem with the Superbill Report is that the DATE() function was not available until MySQL version 4.1.1.

– Rod <rod at sunsetsystems dot com>

sunsetsystems wrote on Friday, July 08, 2005:

I have added this option to set an appointment status, as well as the option of including appointment titles on the calendar.  Changed files are:

interface/globals.php
interface/main/calendar/add_edit_event.php
interface/main/calendar/modules/PostCalendar/pnuserapi.php
interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/default.html
interface/main/calendar/modules/PostCalendar/pntemplates/default/views/week/default.html
sql/2_7_2-to-2_7_3_upgrade.sql
sql/database.sql

– Rod <rod at sunsetsystems dot com>

rbodnar wrote on Thursday, February 16, 2012:

Does anyone know how to color code the calendar by the appointment status? I’d appreciate a reference to useful info or any suggestions on how to get started with this. Thx.