Dated Reminder System

cbezuidenhout wrote on Thursday, January 26, 2012:

latest commit :

https://github.com/tajemo/openemr/commit/8f229f5acf40cfa5cc42f3c5adbce7614e85ac7e

also the branch is here :

https://github.com/tajemo/openemr/tree/datedReminders

  - Craig
    Tajemo Enterprises

cbezuidenhout wrote on Thursday, January 26, 2012:

at last got the patient link working, can now select patient to link to message

branch : https://github.com/tajemo/openemr/tree/datedReminders
commit : https://github.com/tajemo/openemr/commit/bc207713b443ac38c59ce454e28010d131a88274

  - Craig
    Tajemo Enterprises

bradymiller wrote on Friday, January 27, 2012:

Hi,

Rebased everything into one commit here (I also placed another code review there):
http://github.com/bradymiller/openemr/commits/tajemo-dated-reminders_6

This is getting very close to getting committed to sourceforge. See above github commit review for issues to fix:
1. Incorporating OpenEMR theme/style into the add reminder and reminder log popups
2. Consider making the user id a parameter in the reminder functions (just a suggestion; read review for details)
3. Some other minor fixes (see review for details).

thanks,
-brady

cbezuidenhout wrote on Friday, January 27, 2012:

Hi,

Made changes, committed to
https://github.com/tajemo/openemr/commit/7b12bc26f462568546cf406b470ac850e3230e4a

also note the version.php file was not correct, re committed it again to :
https://github.com/tajemo/openemr/commit/a37c428c4ec7b0d6cfb2ae9c6f5b1d17fa21d9d3

the datedReminders branch can be found here :
https://github.com/tajemo/openemr/tree/datedReminders

I think it is close to ready now

  - Craig
    Tajemo Enterprises

bradymiller wrote on Friday, January 27, 2012:

Hi,

Here is the proposed commit that plan to commit to sourceforge (I only made several formatting mods in database.sql file in addition to Craig’s code). Let me know if any issues:
http://github.com/bradymiller/openemr/commits/tajemo-dated-reminders_final

thanks for the contribution,
-brady

bradymiller wrote on Saturday, January 28, 2012:

Hi,

Just committed this to sourceforge. Thank you Craig for contributing this awesome new feature.

-brady

arnabnaha wrote on Sunday, January 29, 2012:

Thanks for such a wonderful feature addition in openemr…but i have a few issues/questions to clear…
1. Most of us donot use the bottom screen. we turn it off as soon as we log in to the openemr. If the reminder system is in the message section, then it remains out of sight most of the time…no use being a reminder system if it doesnot remind anything…

2. There is no mechanism regarding popup/a little alarm like feature in the reminder system…suppose, I link a reminder with a patient and I forget it…now as I open the patient/ log into openemr…it should remind me with a popup as these are due…

Hope these can be added as a feature in the dated reminder system to make it more usable and complete…

Arnab Naha

bradymiller wrote on Sunday, January 29, 2012:

Hi Arnab,

I actually recommended moving it from the Calendar screen to the Messages screen, because at least in my case (and I assumed others) physicians are very tied to seeing/replying to messages/reminders/labs/reports all day. The hope is that the Messages screen will become a one stop shop to deal with reminders/messages/labs/other clinical notes/authorizations/reports (why it’s worded as a Center on the top). Of course, I could be completely wrong on this.

Also curious how many users actually turn off the bottom screen all the time. I assumed this wasn’t very prevalent. Again, I could be completely wrong on that assumption.

thanks,
-brady

bradymiller wrote on Sunday, January 29, 2012:

Hi,
Another thing to consider is placing the active number of messages/reminders/etc in the left menu next to the Messages link to show users if there is something waiting for them there.
-brady

arnabnaha wrote on Sunday, January 29, 2012:

Hi Brady…
Message screen actually blocks the view when I try input data in the forms while in an encounter…the space is less…each time i have to pull up the bottom screen or push it down…but it is helpful when i want to comapre anything…i get a split view…but thats rare…so i decided to uncheck the bottom screen…now…i loved that idea of the active messages showing up in the left menu as a indicator of something new/pending is present…this can serve the purpose very well…if this can be done then popups wont be needed to remind about the reminders…otherwise the reminder screen will not serve its purpose…and everytime we have to get  back to the message screen to check whether there are any reminders or not…

Arnab Naha

yehster wrote on Sunday, January 29, 2012:

One thing that Craig did well with his implementation is that he encapsulated this functionality in a way that simplifies re-use.
There is one “require” statement added to the existing messages.php file which could easily be put in a different location as a customization.

Arnab, You don’t really use the calendar much either if I remember correctly so I’m not sure where you’d want it., but someone with basic php skills could comfortably move it to any page.

Brady, I don’t like the bottom frame either.  The loss of real estate is significant, especially on a laptop, and then when I pull up firebug, boy do things get cramped.

arnabnaha wrote on Sunday, January 29, 2012:

hi…
I use the calendar screen but i would like a waiting list more than the calendar like slots for appointment as in India appointments are not really done and people just walk in your clinic and there is queue system…there is always a rush with patients here due to their huge numbers…and so, appointment slots dont work…but still i try to include the patients in the calendar as much as possible and for the rest i just use the paper…some patients definitely come with appointments and for them the calendar is suited…later i will try closing the walk in system except for emergencies…

so, as brady said…it will be perfect if the reminder be on any screen a small notification can be set up in the left menu of the new/pending messages or reminders…it will be helpful…

tmccormi wrote on Sunday, January 29, 2012:

I’m with Arnab and yehster here.  I always turn the bottom frame off and leave it that way.   Notice of new reminders should show in the titlebar.   Eventually an optional popup would. be nice.
Tony

yehster wrote on Sunday, January 29, 2012:

The reminder system uses ajax and is independent of the messages page itself, so move this one require statement into main_title.php from out of messages and viola.  It can be at the top all the time if you wanted. I think it might get crowded if you put it there though.  Blame frames for that
.

        // TajEmo Work by CB 2012/01/11 02:51:25 PM adding dated reminders
        // I am asuming that at this point security checks have been performed
        require_once '../dated_reminders/dated_reminders.php';

yehster wrote on Monday, January 30, 2012:

I had a thought about the javascript event timer and its associated AJAX call to refresh the reminders.  I don’t understand enough about the session timeout mechanism OpenEMR uses to logout users.
However, my concern is, if the Messages screen is left up and it hit the server with an AJAX call every minute or so, will the session ever be considered idle?  Will the user get logged out after the appropriate period of in activity?
Is the auto-logout method client side/server side or both.

cbezuidenhout wrote on Monday, January 30, 2012:

Hi all, we would be happy to move the reminders, as well as create a “counter” but I think it is best to come to an agreement about placement of such things, also could we have the placement as a option in the admin or preferences section ?

as for the auto-refresh, I would think (and I am not clued up with OpenEMR’s session functions) that the refresh wouldn’t be an issue as it doesn’t call top.restoreSession() but I could be wrong.

  - Craig
    Tajemo Enterprises

bradymiller wrote on Monday, January 30, 2012:

Hi,

Think the counter would be most useful (number in parenthesis to the right of the Messages link in the left nav menu). I think a function that counts and returns the number of active reminders and messages would be a good next step. As yehster mentioned, since you’ve done a good job keeping the code modularized, will be easy to change (or makes it optional) placement of the code.

For the session stuff, could go after this via the poor man method. See if user timeouts while on the Messages screen vs. not on the Messages screen. If there is no timeout on the Messages screen, then will likely need to figure something out.

-brady

bradymiller wrote on Monday, January 30, 2012:

Also,

I must of missed this in the review, but since the updateme(id) function is calling a script, I think it should have top.restoreSession(); before it does the .post call.

-brady

cbezuidenhout wrote on Monday, January 30, 2012:

created functions for counting messages, now just to implement them where desired.

see here : https://github.com/tajemo/openemr/commit/5aa218d76597eb0e0d0cbb2c9b313c3cc0ad5031

the branch : https://github.com/tajemo/openemr/tree/datedReminders

  - Craig
    Tajemo Enterprises

bradymiller wrote on Tuesday, January 31, 2012:

Hi,

Looks good, so committed your code to the sourceforge codebase. The next steps are:
1. Make a quick script that simply runs the GetDueReminderCount and echos the number (place this script in library/ajax)
2. Place a (<div></div>) element to right of Message on left menu and place a jquery call that calls the above ajax script on initial script run and every 30-60 seconds thereafter and places value within the element next to Messages link

Then will have a good mechanism to add other things (such as number of active messages) also as other types of messages are added to the message center in the future.

-brady