Ajax_template.html.php

mike-h30 wrote on Sunday, July 05, 2009:

How is the file "ajax_template.html.php" generated?  I noticed that it is not there from a clean openemr download.  It is located in

/interface/main/calendar/modules/PostCalendar/pntemplates/compiled/%%514/%%514181353

I want to edit the variables “$lname” and “$fname” by removing the “ucfirst” and “strtolower” functions so that the patient’s first and last name are displayed as they are in their respective database fields.  We have some patients that have their maiden name included in their last name ( i.e. Johnson-Smith).  It displays as “Johnson-smith” on the calendar although it is in the database field as “Johnson-Smith”.

$lname = addslashes(ucfirst(strtolower(substr($event[‘patient_name’], 0, $commapos))));
$fname = addslashes(ucfirst(strtolower(substr($event[‘patient_name’], $commapos + 2))));

Thanks.

-Mike

cfapress wrote on Monday, July 06, 2009:

Hi Mike,

You’ll need to edit a few files for this change. They are all found in folders of this directory:
<oemr>/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/

day/ajax_template.html
day_print/outlook_ajax_template.html
month/ajax_template.html
month_print/outlook_ajax_template.html

Look in each file for the strtolower function and change it to suit your needs.

Jason