As noted in the Bug Tracker, there is a problem with series visits in the calendar for 3.0.1.
The calendar allows time change for individual visits, but if a visit was created as part of a series of repeats, changing the time for an individual date within the series and selecting "Current" in fact changes only the first of the series, which is the default date in the edit window. Changing the default date to the selected date has partial effect as it creates a new single appointment on that selected date, but it leaves the prior series intact, thereby making a duplicate appointment for the selected date. Selecting to Delete that "Current" will in fact delete the first in the series, whatever date is shown in the date selection. Selecting "Future" changes all in the series to the new time, irrespective of date set, which is the same as selecting "All".
I am unable to reproduce the bug you’ve described. However, I know exactly what you’re talking about. It used to be a bug in prior versions but was fixed some time ago.
I recall the problem was in the <oemr>/interface/main/calendar/add_edit_event.php file. It was not properly setting the Date field in the pop-up window when editing a single day of a recurring event.
The current code will populate the Date field with whichever date in the series you have chosen to edit. If this is not the behavior you are seeing then please check the date of the file I previously mentioned. Mine is dated March 9, 2009.
I have just duplicated the problem as I described it in the latest CVS demo. I changed the user to prefer the "Fancy" UI and created a patient "System test". I had to logout then in again to get the fancy view. Then I scheduled for today (6/12/09) at 8 AM to repeat daily thru 6/19/09. I then went to the 6/14/09 day and clicked on the 8 AM and changed ONLY the time to 8:15, selected save and responded to the prompt to change only the "Current". What changed was the 6/12/09 appointment only, and it became only a single appointment, not a series.
I again verified that would change back to 8 AM fine. Then I again selected the 6/14/09 8 AM and now changed the date to read the 2009-06-14 instead of its original, and set the time to 8:30 AM, again changing nothing else. Saving that again prompted for All, Current, etc, and I selected "Current".
As described before I now had a solo appointment at 8:30, but still the series at 8 AM each day.
The problem is not eliminated. Sorry. Not sure what you mean by the change you note, but it is in neither the CVS nor the 3.0.1 distribution.
Partial apology; the problem I noted was based on the Default and Fancy views which my clients use. I have now tested the CVS Outlook view as well, and it DOES properly change a mid-series. Why is the logic different?
You will want to know that it does not, however, display "Out-of-Office" periods in the Month View. I have not been able to test all permutations, so this may not be an exhaustive list.
Comment: While I fully recognize the tedium involved, I again urge ALL to assure that functionality for ANY choice we enable should be equally functional for any OTHER choice available. At the very least it will save we who support clients because we cannot possibly have tested every possible permutation of every change which occurs. So if a client is NOT using the particular style we are most familiar with, fundamentals like these will nonetheless work similarly.
So how do we fix the calendar views so they each and all:
a) Properly change selected appointments in series?
b) Properly display all appointments in all views?
c) Include the same info in each style, even if only for the single-day view (though I would personally prefer it for ALL views)? I personally prefer the Fancy view because the Month view is the fastest for broad planning purposes for my providers, while allowing the day or week views are best for actual adds.
You will also want to know that the CVS shows that I must register as "In Office" for the "Available" to display any openings, as I expected. But if I selected "In Office" for full day, then within that day I select "Out of Office" for a 120 minute period at, say, 10 AM, it actually makes no appointments available after 10 AM for the whole day. That also needs fixing.
I haven’t changed any code but I can explain a few things.
1) Disparate functionality between the Fancy calendar
So far I’ve been the one with the deepest roots in the calendar code, in recent history. I’ve kept the Original and Outlook calendars working similarly but haven’t touched the Fancy calendar. I just haven’t had the time to untangle the mess that exists with the PHP Smarty code in there. It gives me a really bad headache. To this day I still cannot understand why anyone would ever bother with PHP Smarty. It’s just a wrapper around PHP, and to do anything slightly complex you’ve got to learn the PHP Smarty language. Anyway… That’s the reason the Fancy calendar is not functioning like the other two calendars. I’ve just not wanted to wade into PHP Smarty code.
2) Single events are created
This is proper behavior. I’ve been writing various calendar software for 10+ years now. It’s not pleasant because each time I’ve inherited somebody else’s version of how a calendar should function. To make the OpenEMR calendar work seemlessly with older installations I’ve had to patch things together. So, when you change the time of a single event in a series, it takes that event out of the series and into it’s own event. You will also find that when you choose to modify ‘Future’ events that your original series will be changed to stop repeating at the selected date and the new series to start at the selected date. It was the easiest way to handle this.
3) IN and OUT of office events
These two events are very special to the OpenEMR code. It treats them in a special way. You can only be IN and OUT once in a day, according to the Find-Available code. Even if the calendar shows the events properly. In your example I would suggest using a 120-minute LUNCH event to block out the period of time. It’s a work-around until somebody digs into the Find-Available code.
Honestly, if I had my way, we’d make a big shift to a PHP-only calendar system. Get rid of PHP Smarty entirely. Include some nice AJAX calls to make the interface seemless. Redesign the calendar code to be compliant with a nice standard, such as iCal, and even take into consideration different time-zones.
But I just don’t have the time to devote to such a huge undertaking.
I hope this helps to make clear the issues at hand. It doesn’t fix anything, though.
And… Finally… A question of my own…
How can I display a different provider’s schedule in the Fancy-calendar?!
I suppose I’d have to dig into the dreaded PHP Smarty code to find that answer.