Calendar suggestion

For anyone who is interested (or wants to implement this either in their own EMR or the main system - if you have the time to work on this), here are a couple of easy fixes for the calendar, which could help many front-end users with appointment visibility.
I’ve previously posted about one of them (the left border with the color of the location of the appointment - I don’t know if it’s been implemented already in the new version). I am also adding new code to “ghost” appointments that have been cancelled or rescheduled.

It’s in openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/day/ajax_template.html file:
Find the following (around line 840) and add where I indicated. You may need to change your categories of cancelled appointments according to what you have it set to (cancelled, rescheduled, left without visit, etc) :

      // output the DIV and content
      // For "OUT" events, applying the background color in CSS.

        if ($event['catid'] != "6") {
          $background_string = "; background-color:" . attr($color);
          echo "<div data-eid='" . attr($eventid) . "' class='" . attr($evtClass) . " event' style='top:".$evtTop."; height:".$evtHeight.
          $background_string.

          //ALB from here
     	   "; border-style: ridge ridge none solid".
	   "; border-width: 1px 1px 1px thick".
	   "; border-color: black black black ". $row['color'].
               (in_array($event['apptstatus'],array('<>','x','!')) ? "; opacity: 0.5" : "; opacity: 1") . //ALB to here

          "; $divWidth".
          "; $divLeft".
          "' title='" . attr($divTitle) . "'".
          " id='" . attr($eventdate) . "-" . attr($eventid) . "-" . attr($pccattype) . "'".
          ">";

Let me know what you think…

Cheers,
Alex.

1 Like

That’s great. I’d like it to be available for weekly and monthly views as well.
Thank you
Regards
Luis

Insert the same lines into the /openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/week/ajax_template.html file (around line 850 or so) and the
openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/month/ajax_template.html file (around line 630 or so).

Cheers,
Alex.

1 Like