Changing Appointment Display in Calendar

firmanet wrote on Wednesday, October 12, 2011:

I would like to see patient name, age, sex and reason for visit in the appointment slot in the daily calendar. I know you can go to global settings and choose “Appointment Display Style” options from the pull down. What I want to know is how to add new parameters to that list. Any help would be appreciated. Thanks

bradymiller wrote on Thursday, October 13, 2011:

Hi firmanet,

This will require coding to the calendar scripts. Since there is already an option controlling this behavior, best thing is to search for where it is used in the codebase. The option in the code is $GLOBALS (this stores the choice from the “Appointment Display Style” option) , so can basically search the codebase (use grep command in linux) for ‘calendar_appt_style’ to see where the  coding modifications would be needed (and since only want in daily calendar, can then only focus on those scripts). Although this would be straightforward for a developer, does require ability to modify the code. If you (or somebody else) does this, would also be very useful to add this new format to the list in “Appointment Display Style” (ie. $GLOBALS).

Just as a quick example, using grep command with ‘calendar_appt_style’ gave this output in the daily ajax calendar scripts:

/var/www/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day_print/ajax_template.html:            if ($comment && $GLOBALS['calendar_appt_style'] < 4) $title .= " " . $comment;
/var/www/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day_print/ajax_template.html:                if ($GLOBALS['calendar_appt_style'] != 1) {
/var/www/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day_print/ajax_template.html:                    if ($event['title'] && $GLOBALS['calendar_appt_style'] >= 3) {
/var/www/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day_print/ajax_template.html:                        if ($event['hometext'] && $GLOBALS['calendar_appt_style'] >= 4)
/var/www/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day_print/outlook_ajax_template.html:            if ($comment && $GLOBALS['calendar_appt_style'] < 4) $title .= " " . $comment;
/var/www/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day_print/outlook_ajax_template.html:                    if ($GLOBALS['calendar_appt_style'] != 1) {
/var/www/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day_print/outlook_ajax_template.html:                        if ($event['title'] && $GLOBALS['calendar_appt_style'] >= 3) {
/var/www/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day_print/outlook_ajax_template.html:                            if ($event['hometext'] && $GLOBALS['calendar_appt_style'] >= 4)
/var/www/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/ajax_template.html:            if ($comment && $GLOBALS['calendar_appt_style'] < 4) $title .= " " . $comment;
/var/www/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/ajax_template.html:                    if ($GLOBALS['calendar_appt_style'] != 1) {
/var/www/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/ajax_template.html:                        if ($event['title'] && $GLOBALS['calendar_appt_style'] >= 3) {
/var/www/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/ajax_template.html:                            if ($event['hometext'] && $GLOBALS['calendar_appt_style'] >= 4)

hope this helps get you started,
-brady

bradymiller wrote on Thursday, October 13, 2011:

Sorry about above code block; formatting appears all screwed up.
-brady