Calendar Month View Problem

ideaman911 wrote on Wednesday, February 18, 2009:

Using 2.9.1 the calendar view month has precisely the concise view I would like, except the info is useless.  I know of nobody who memorizes patients by their DOB, yet that (rather than their name) is what is displayed.  Also displayed is the full name of the provider, along with a label.  The great news is that the type of appointment shows, color coded.  That is very useful as a planning tool for my clinician, who visits multiple facilities and does house calls as well.

My ideal would be a simple provider code, such as their User instead of Full Name, with Patient Name, and most useful would be a user-selectable field or two such as current balance or authorization status.  Those two things could provide the clinician a go/no-go decision point.

But I cannot figure out where the code is which might allow me to do so.  If anybody who knows reads this, please tell me.  I will happily fix and post it here.

Joe Holzer

cfapress wrote on Wednesday, February 18, 2009:

Hi Joe,

It seems you’re using the Default style calendar. It’s got various issues because it has been unmaintained for a very long time. Have you tried the ‘Outlook’ style calendar? The calendar view is a per-user setting so you’ll have to edit your users to change the calendar style. Try the Outlook style and see if that is a better fit for your needs. And offer suggestions for improving the Outlook style too.

More to the point, the file that is causing the display troubles in the default calendar is:
<oemr>/interface/main/calendar/modules/PostCalendar/pntemplates/default/user/patient_line.html

It’s a PHP Smarty template file so you’ve got to know the funky Smarty language to make sense of it all. I looked at the file and it appears to be trying to output the patient’s name using this logic to assign the patient’s name to a variable:
[-assign var=temppatient_name value=$event.patient_name|truncate::"$day_td_width":""-]

By simplifying that single line of code to
[-assign var=temppatient_name value=$event.patient_name-]

The patient name now appears on the month-view. If you’re comfortable editing source code you too can make the suggested change.

I’ll commit this same change to the CVS code tree so that others can benefit from the correction.

Jason

ideaman911 wrote on Wednesday, February 18, 2009:

Jason;

I will happily try what you wrote.  I have no idea how to get an "Outlook" style.  Is there some config type file I have to change to use it?

Joe Holzer

ideaman911 wrote on Wednesday, February 18, 2009:

Oops; Never Mind - I found it.

ideaman911 wrote on Wednesday, February 18, 2009:

Jason et al;  (Thanks very much Jason :wink:

For a visual person, the default/fancy Month view is a lot better to use than the Outlook version, because the Outlook version requires the user to click on each icon to see who the patient is.  The week view is similar, and the day view really doesn’t add any value vs the day view in the default or fancy version.

But the following is the full code as I now have it for the file you showed at

<oemr>/interface/main/calendar/modules/PostCalendar/pntemplates/default/user/patient_line.html

and using it provides an appointment with three clean line breaks separating the appointment time and type, Patient Name in Bold, and "p" for provider followed by the provider full name (also bold).  For a visual provider that is the best calendar view, as it nearest mirrors a "day-timer" type calendar book.  Thanks again for the help.

[-if is_numeric($event.pid) and $show_patient eq true-]
<!-- [-assign var=temppatient_name value=$event.patient_name|truncate::"$day_td_width":""-]  was next line 2/18/09  JCH  -->
[-assign var=temppatient_name value=$event.patient_name-]
     <a href="…/…/patient_file/patient_file.php?set_pid=[-$event.pid-]&pid=[-$event.pid-]" target="_top"><br/><strong>[-$temppatient_name"-]</strong></a>
         <!--  <br/>([-$event.patient_dob-])  //  Removed DOB but added name & made STRONG 2/18/09  JCH -->
[-/if-]
[-if is_numeric($event.aid) and $show_provider eq true-]
    <br/>p <strong>[-$event.provider_name-]</strong>     
[-/if-]
[-if is_numeric($event.pid) and $show_patient eq true and $show_icons eq true-]
   
   
    <a href="[-$TPL_ROOTDIR-]/patient_file/patient_file.php?go=encounter&pid=[-$event.pid-]&set_pid=[-$event.pid-]" target="_top"><img align=“middle” src="[-$TPL_IMAGE_PATH-]/encounter_hotlink.gif" border=“0” vspace=“0” hspace=“0”/></a>
    {php} $demovar = ( $GLOBALS[‘dutchpc’] ) ? ‘demographics_full_dutch.php’ : ‘demographics_full.php’; {/php}
    <a href="[-$TPL_ROOTDIR-]/patient_file/summary/[-$demovar-]?pid=[-$event.pid-]&set_pid=[-$event.pid-]" target=“Main”><img align=“middle” src="[-$TPL_IMAGE_PATH-]/demo_hotlink.gif" border=“0” vspace=“0” hspace=“0”/></a>
[-/if-]