Calendar Display Modification Help. THANK YOU

medsupporter wrote on Monday, November 08, 2010:

Hello OpenEMR Community!
I have a simple need that I’m hoping you can help us out with.
We would like the default week view of the Calendar to have the patients names displayed within the little appointment boxes just as they are displayed in the single day view.  
That is, we don’t want to have to hover over top of each of our dozens of appointments in order to see the names of the patients coming to our clinic.
I might guess that one is required to edit information within  …\htdocs\openemr\interface\main\calendar\modules\PostCalendar\pntemplates\default\views\week\default.html or an associated file to make this happen, but I’m not sure.
If someone would be kind enough to help out we would certainly appreciate it!
Thank you,
Tom

visolveemr wrote on Wednesday, November 10, 2010:

Hi,

In  …openemr/interface/main/calendar/modules/PostCalendar/pntemplates/default/views/week/ajax_template.html

Place the following code

$content .= htmlspecialchars($lname);
                    if ($GLOBALS != 1) {
                        $content .= “,” . htmlspecialchars($fname);
                        if ($event && $GLOBALS >= 3) {
                            $content .= “(” . $event;
                            if ($event && $GLOBALS >= 4)
                            $content .= “: <font color=‘green’>” . htmlspecialchars(trim($event)) . “</font>”;
                            $content .= “)”;
                        }
                    }
                    if ($catid == 1) $content .= “</strike>”;

between $content .= “<img src=’$TPL_IMAGE_PATH/user-green.gif’ border=‘0’ title=’$link_title’ alt=‘View Patient’ />”;

and

$content .= “</a>”;

Accordingly adjust $width and $colwidth, such that the appointments are not overlapping.

Hope this helps.

Thanks
ViCarePlus Team,
www.vicareplus.com
services@vicareplus.com

juggernautsei wrote on Wednesday, November 10, 2010:

Hi,
I wanted to jump in on this action because I have been looking for this fix. But the instruction are not clear. Because I found the
$content .= “<img src=’$TPL_IMAGE_PATH/user-green.gif’ border=‘0’ title=’$link_title’ alt=‘View Patient’ />”;

Statement but right after that is an

            }
            else {
                // some sort of patient appointment

statement before the $content .= “</a>”;

Is this code replacing the whole else if statement or is it being added just behind the
$content .= “<img src=’$TPL_IMAGE_PATH/user-green.gif’ border=‘0’ title=’$link_title’ alt=‘View Patient’ />”;  ?

Could you post the entire code change so that I don’t get it wrong?

thanks!

Sherwin

juggernautsei wrote on Wednesday, November 10, 2010:

BTW,

I was looking for the $colwidth in this same file and could not find it. What controls the iFrame if the calendar so that I can make it wider?

Appreciated it!

Sherwin

visolveemr wrote on Wednesday, November 10, 2010:

Hi Sherwin,

You need to just add the code between 

$link_title .= “(” . xl(‘Click to view’) . “)”;
                    $content .= “<a href=‘javascript:goPid($patientid)’ title=’$link_title’>”;
                    $content .= “<img src=’$TPL_IMAGE_PATH/user-green.gif’ border=‘0’ title=’$link_title’ alt=‘View Patient’ />”;

       and

$content .= “</a>”;

It comes around line 655.

Sorry its $colWidth(W caps).

It is found in line 373 after
// output column (date) headers
$colWidth = 100/7;
You can increase the value from 100 if you want to increase the width of each day slot.

We used openemr4.0 development tip for this code.

Thanks
ViCarePlus Team,
www.vicareplus.com
services@vicareplus.com

medsupporter wrote on Wednesday, November 10, 2010:

Thank you very much for the guidance.
I’m using version 3.2, stable release.  My ajax_template.html file seems to differ from the one you referenced.
Are you using the ajax_template.html file from version 4?
My version 3.2 file is only 499 lines long.
Below I have pasted what I believe is the relevant section with some lines above and below included.

Does this look as it should?  When I test it in the calendar it comes up blank, i believe not working.

htmlspecialchars($lname,ENT_QUOTES) . " \n"; $link_title .=
            xl(‘Age’) . “: “.$patient_age.”\n” . xl(‘DOB’) . “:
            “.$patient_dob.”\n”; $link_title .= “(” . xl(‘Click to view’) . “)”;
            $content .= “<A title=$link_title
            href=“javascript:goPid($patientid)”>”; $content .= “<IMG
            title=$link_title border=0 alt=“View Patient” src=”">"; $content .=
            “</A>”;
$content .= htmlspecialchars($lname);
                    if ($GLOBALS != 1) {
                        $content .= “,” . htmlspecialchars($fname);
                        if ($event && $GLOBALS >= 3) {
                            $content .= “(” . $event;
                            if ($event && $GLOBALS >= 4)
                            $content .= “: <font color=‘green’>” . htmlspecialchars(trim($event)) . “</font>”;
                            $content .= “)”;
                        }
                    }
                    if ($catid == 1) $content .= “</strike>”;
} else { // no patient id, just output the category name
            $content .= $catname; } $content .= “</SPAN>”; } $divTitle .= “\n(”
            . xl(‘double click to edit’) . “)”; // output the DIV and content
            echo "
            <DIV style=“divWidth: " id=’”.$eventdate."-".$eventid."’
            class=’".$evtClass." event’ title=’".$divTitle."’ ? ?.><!- end bigCal DIV ->
            <SCRIPT language=JavaScript>

Thank you,
Tom