Can I expand the list of providers in the Schedule view?

Ed Landau
  • Ed Landau

    Ed Landau - 2014-02-13

    Hello: I am wondering if there is a way to make the list of providers in the Schedule view longer so that I do not have to scroll if I have more than 4 providers?


  • Paul Williams

    Paul Williams - 2014-02-22

    I've been doing the following mods to every patch that has come out for more than a year. It addresses something that, within 60 seconds of first laying my eyes upon OpenEMR, had me saying "That's pretty cheesy...". A provider named "Rupert Schnitzeldinger" would get 3 times the real estate, a calendar column 2 or 3 times wider, than a provider named "Bob Lee". This mod forces a standard calendar column width upon the day view of the Outlook style calendar.

    I've tested it with as few as 4, and as many as 12, providers defined. When necessary, it will collapse first names down to first initial on providers with long names, or drop the entire first name if required. I'd intended to make an improvement to replace the hard-coded value given the variable representing how many monospaced characters will fit across the entire calendar. Detecting a user's screen resolution and then adjusting the value of that static variable would be a better solution. We've a mix of 16:9 and 16:10 monitors and it has worked well for us using wide-screen resolutions of 1280x800, 1440x900,

    1600x900, up to 1920x1080. One can nitpick that it is not a perfect solution, but for minimal code changes, it yields a much more professional-appearing and flexible calendar that can accommodate a larger number of providers.

    Two modules require changes, back them up, then:

    In openemr\interface\themes\ajax_calendar.css modify .providerheader to these settings:

    / for the header row with provider names /
    .providerheader {
    font-family: "Lucida Console", Monaco, monospace;
    font-size: 0.7em;
    text-align: center;
    background-color: #EDEAFF;
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid lightgrey;
    white-space: pre;

    This switches to a monospaced font, changes how whitespace is handled, and reduces the unnecessarily large MARQUEE-SIZED font currently displaying the provider names.

    In \interface\main\calendar\modules\PostCalendar\pntemplates\default\views\day\ajax_template, delete the three lines of code between these two lines:

    // row with the dates or day-of-week (DOW)


    echo "<div class='calendar_day'>";

    And replace those 3 deleted lines with these 12 lines:

    $pname_display = htmlspecialchars($provider['fname'],ENT_QUOTES)." ".htmlspecialchars($provider['lname'],ENT_QUOTES);
    If (strlen($pname_display) > $pname_max) { // if full name exceeds $pname_max, collapse first name to first initial
    $pname_display = htmlspecialchars(substr($provider['fname'], 0, 1),ENT_QUOTES)." ".htmlspecialchars($provider['lname'],ENT_QUOTES);
    If (strlen($pname_display) > $pname_max) { // if full name still exceeds $pname_max, remove first initial
    $pname_display = htmlspecialchars($provider['lname'],ENT_QUOTES);
    $pname_len = ($pname_max - strlen($pname_display)) / 2;
    $pname_display = substr(" ", 0, $pname_len).$pname_display.substr(" ", 0, $pname_len + .5);
    echo "<td class='schedule' title='".$pname_display."' date='".date("Ymd",$caldate )."' provider='$providerid'>";
    echo "<div class='providerheader'>";
    echo $pname_display."</div>";

    About 10 lines above the "// row with the dates or day-of-week (DOW)" comment is the start of a foreach loop, above that insert these two lines:

    $pname_max = 136 / count($providers); // tune for resolution?
    If ($pname_max < 13) { $pname_max = 13; }; // tune for resolution?

    Last edit: Paul Williams 2014-05-05
  • Paul Williams

    Paul Williams - 2014-05-01

    I may or may not have just accomplished something using GitHub (other than the greying or loss of hairs). I still need to modify the users table edit for the calendar column to allow a range of numeric values (representing calendar column position). To date, I've just poked the values in manually using MySQL Workbench. We now have 10 providers on the calendar and it still looks great. A users.calendar value of 0 means what it always did, a non-zero value gets them on the calendar, and the value determines the column order. So, say we have 5 MD's wanting a specific order (seniority, etc), 2 physical therapists, and 3 RN's doing minor procedures, I might set the users.calendar values, respectively, to: 1, 2, 3, 4, 5, 11, 11, 21, 21, 21. Those with equal values will display alphabetically by name (as we were forced to display all providers in the past).

  • Brady Miller

    Brady Miller - 2014-05-11


    This can now be tested in the following "Up For Grabs" demo:

    Looks like you are basing this on codebase from a year ago. Will want to base it on most recent codebase. To allow selection of the priority setting, could place a input field in the Administration->Users gui module.


  • MD Support

    MD Support - 2014-05-15

    To make calendar usable on tablets our approach was -
    1. Hide date-selector, provider list and facilities.
    2. Dates are now selected in a popup calendar by hover/click on date navigation area.
    3. Provider(s) are selected in a popup list of providers by hover/click on provider name displayed on top of calendar.
    4. Remember user choices so each user has display that they last used.


Log in to post a comment.