Dated Reminder System

cbezuidenhout wrote on Wednesday, February 08, 2012:

latest commit : https://github.com/tajemo/openemr/commit/a3844eae735b66dc0aed8f67df75c54b95a7d832

the new branch : https://github.com/tajemo/openemr/tree/datetReminders2

  - Craig
    Tajemo Enterprises

bradymiller wrote on Wednesday, February 08, 2012:

Hi,

That commit has lots of changes already committed, so committed your original branch commit from datedReminders (added the simple mods myself) into sourceforge. See my github message for more details.

Like the new features. On the Send a Reminder screen, is the textbox containing the number near the Link To Patient needed? Just seems odd to show that; why not keep it a hidden value?

thanks,
-brady

cbezuidenhout wrote on Wednesday, February 08, 2012:

sorry, my bad.

I was using it for error checking, can be set to hidden in interface/main/dated_reminders/dated_reminders.php file, line 283

change

<input name="PatientID" id="PatientID" value="<?php echo (isset($patientID) ? attr($patientID) : 0) ?>" /> 

to

<input type="hidden" name="PatientID" id="PatientID" value="<?php echo (isset($patientID) ? attr($patientID) : 0) ?>" />

  - Craig
    Tajemo Enterprises

aethelwulffe wrote on Wednesday, February 08, 2012:

Looking pretty good.  It is probably a nice thing in a one-facility environment to have the mark as completed as optional.

I’m going to add some text to “mark as completed” to something that says “individual messages” or something like that.  Until I re-read your post, I didn’t quite get what it meant.  I thought “Why would I already want to mark it as completed?”.  I think I will also see if I can set the checkbox on as default for our application, where we are a dispersed environment as opposed to folks talking from room to room.

I think I will also see about trimming out the non-local users out of the list, and then order them alpha.  It is still hard to select people when half of the selections say things like “CVS Pharmacy” etc…  For our application, I will probably need the drop-down box larger as well, since the scroll speed is like lightning when you get a long list and a short scrollbar position.
Thanks for the update man.  I’ll also apply the last change (as per Brady’s note) for the debug message.

aethelwulffe wrote on Wednesday, February 08, 2012:

Just looked at the code…seems like the users selection IS set to edit the list….but I am still getting some local users.  Is it possible for address book types to get set to “active” in some way?  Guess I better check out the database.

Maybe some other things are weird.  I’ll try clearing my cache…??

aethelwulffe wrote on Wednesday, February 08, 2012:

….oh, and it’s dated_reminders_add.php that you must edit to get rid of the debug output.

aethelwulffe wrote on Wednesday, February 08, 2012:

Still getting some few odd users and blanks.  Guess I can tweak the search parameters some more.  I set the send as completed to “Send as separate Messages?” so that it can fit in the pop up without wrapping and without adding in table formatting.
I also increased the db to varchar(255) for the text, and changed both files named dated_reminders.php to replace 144 with 200 as I was already getting complaints about the limits “I just need a couple of more words!”.  No, they don’t know how to be brief, and no, they don’t Tweet.  Took me a while to realize there were changes to be made in both files…but that’s just 'cause I am dumb.

aethelwulffe wrote on Wednesday, February 08, 2012:

Changed dated_reminders_add.php starting line 288 to read:

       <?php echo xlt('Send to') ?> :     <select id="sendTo" name="sendTo[]" multiple="multiple">
                                            <option value="<?php echo attr(intval($_SESSION['authId'])); ?>"><?php echo xlt('Myself') ?></option>
                                            <?php //     
                                                $uSQL = sqlStatement('SELECT id, fname,	mname, lname  FROM  `users` WHERE  `authorized` = 1 AND `active` = 1 AND `facility_id` > 0 AND id != ? AND id != 1 ORDER BY lname',array(intval($_SESSION['authId'])));
                                                for($i=2; $uRow=sqlFetchArray($uSQL); $i++){  
                                                  echo '<option value="',attr($uRow['id']),'">',text($uRow['lname'].', '.$uRow['fname']),'</option>';  
                                                }
                                            ?>    
                                          </select>                                        
      &nbsp;&nbsp;&nbsp; <label for="sendSeperately"><?php echo xlt('Send as separate Messages? ') ?></label> <input type="checkbox" name="sendSeperately" id="sendSeperately" checked /> 

This is to completely clean the message target list of inactive or non-local (unauthorized) users.  really, just checking against ‘authorized’ would have done it.  I also added in a check to take the default user out “Administrator”…that is good for us, though I don’t know about for other folks.
  I also re-ordered the results by alpha, took out middle name, and listed by last name first.

aethelwulffe wrote on Wednesday, February 08, 2012:

…still not much of a web app scripter yet…
Any suggestions on adding an option value that lets me send to ALL results of the sql rows?  >“Everyone”?

Also, it looks like using authorized means that only folks that are listed as providers are flagged.  This is just part of the “one level of providers” stuff we have to attend to in OpenEMR I guess.  Active just means that they will show up in Addressbook….argh!  To overcome this, even our front office folks are listed as providers, so it’s just me that doesn’t show up!  I can always hard-code my own ID, or try switching the whole thing to using the ACL.  Any other suggestions?

cbezuidenhout wrote on Thursday, February 09, 2012:

@aethelwulffe :

I will update the script to allow for 255 characters (this makes sense now that it is not in the calendar view anymore)

I had looked at the authorized bit and found the same “provider” issue, that is why I put the `facility_id` > 0 that removes “address book only” entries.

Agree that removing admin may be a good idea, anyone else think it is a good idea ?
I will look at the current message script and see how they found only valid users, would that list work for you, I think it is a good  starting point as it seems to meet the needs presently. Groups would also be a nice option here.

I will add a “select all users” option to the send screen (this is simple enough with some jQuery)

any suggestions for the " each recipient must set their own messages as completed ?" line’s wording. I get that for us just putting “send each message individually” makes sense, but I don’t think that it will to the users. perhaps a mouseover explaining it in detail.

I won’t be setting the " each recipient must set their own messages as completed ?" to checked by default as the main usage here remains a task list.

I will make the recipient box wider, as it doesn’t behave nicely, but to go longer means that the user would need to scroll, which I have tried to avoid. Perhaps some general re-formating of the send screen.

I really think that feedback is important here, the last thing we want is for this to become a feature that exists, but is never used, had good feedback from clients this side about this and they think it is really useful in the running of there clinics.

@Brady, I am busy clearing out my GIT and I will be recreating a new branch with the latest version of the dated reminders, if that suits you ?

Any other suggestions/queries/complaints regarding this ? Please send them now so that we can get this right.

  - Craig
    Tajemo Enterprises

bradymiller wrote on Thursday, February 09, 2012:

Hi,

Recommend including admin use, since many of the smaller installations will utilize the admin user.

I thought “each recipient must set their own messages as completed” was very clear; would keep it. I think the translators will understand this also and definitely agree this should not be turned on by default. The primary use of this will likely be dated reminders to self or to one other person (in the case of a nurse desk where several nurses cover, then will go to several people until one completes it; the groups function would be nice here). So, really think important to be concise here and avoid confusion of features that may get in the way of the intended use. This is just my opinion.

This feature will get huge use at least as I described above by pretty much everybody in the clinic (ranging from schedulers to nurses, to billers to physicians); rather than keeping a todo list, this will fulfill that role very nicely. Also sounds like it will get use as just a instant messaging service. Other useful things would be, I think:
1. a mechanism to show reminders that will be due in the future would be nice.
2. a mechanism to automatically forward reminders on certain dates would be nice (when somebody away on vacation)

-brady

cbezuidenhout wrote on Thursday, February 09, 2012:

a mechanism to show reminders that will be due in the future would be nice.

- will do, this is a usefull option, perhaps a popup dialog ? what do you think ?

a mechanism to automatically forward reminders on certain dates would be nice (when somebody away on vacation)

- how would we know to forward the message ? there is a forward option (but this is manual)

  - Craig
    Tajemo Enterprises

bradymiller wrote on Thursday, February 09, 2012:

Hi,

For future reminders, could place a ‘View’ button (this would basically replace the Log button for non-admin users; is this currently only showing for admins or everybody?), that shows in a popup:
-all DUE reminders (not just limited to 5)
-Label ‘Future Reminders’ with following buttons next to this ‘Tomorrow’ ‘Week Ahead’ ‘Two Weeks Ahead’ ‘One Month Ahead’ ‘All Future Reminders’

For the forwarding, lets put this off, I’ll add it to an Active Project plan for integrating this Reminders/Messages/Authorizations/etc. center (if I have time, hope to implement this project before the next release):
http://www.open-emr.org/wiki/index.php/Active_Projects#Message_Center

-brady

cbezuidenhout wrote on Thursday, February 09, 2012:

I like the concept of future reminders, the log button currently displays for all users, need to decide on ACL for viewing logs and then just place it in and remove the over-ride

         $isAdmin =acl_check('admin', 'users');  
          
            
          // Temporary for allowing all users to see this
          $isAdmin = true;   

  - Craig
    Tajemo Enterprises

bradymiller wrote on Thursday, February 09, 2012:

Hi,

For ACL, what you have above is good:
http://www.open-emr.org/wiki/index.php/Access_Controls_Listing#Users.2FGroups.2FLogs_Administration_.28users.29

Since the development demo uses admin user, will still be able to test/use this function on the demos even with the above ACL being used.

-brady

aethelwulffe wrote on Thursday, February 09, 2012:

Yeah, I wouldn’t make an exception for the Admin as a default.  We (here) don’t need it at the top of an alpha list though…It gets in the way enough as is it.
  The main reason I changed the checkbox wording was to make it fit.  Neither phrase explains what the checkbox is all about without you already knowing what the function is already though.  A hover description would serve well there, rather than a larger box or a slightly larger wording that might not be taken as you may think.
“each recipient must set their own messages as completed ?”
Direct Spanish Translation:  “every receptacle must put its own messages as completed”…
I think maybe you better transliterate….heheheheh.  Sounds like the recycle bin.  :)  Try asking someone that does not know what the box does already what that is supposed to mean……Myself, I didn’t get a chance to ask before I got feedback :slight_smile:

I’ll look into why your sql options still dredged up trash on our install.  The messages module probably makes use of that wonderful asterisk in the lname field to differentiate address book users from local users.  As it is, you will find issues if you test against a real (read “trashed”) database.

  I think that if you are going to restrict the log, yet name it “My old Messages” or whatever, then perhaps each person SHOULD be able to view the log, but just their messages.  We have used this add-on for a few days now.  There are over 1000 log entries……
Maybe I’ll write a script to flush completed and re-index the tables.

bradymiller wrote on Thursday, February 09, 2012:

Hi,

Could place user specific log stuff on the not yet existent ‘View’ popup (see above). Perhaps a ‘View all completed reminders’ thing on that popup. For this ‘View’ popup may want to consider a paging mechanism :slight_smile: I guess it never ends…

Agreed there will likely be initial confusion on the “each recipient must set their own messages as completed” message, and likely no message that is one sentence long will solve this; suggest placing some sort of help icon to the right of it and then hover a long explanation of this option there.

-brady

aethelwulffe wrote on Thursday, February 09, 2012:

We could…now I’m trying not to be all wild and crazy here, so stop me if I’m going off the deep end…update the html MANUAL every time we add a new feature, and have two session variables "$_what_the_heck_are_we_looking_at_TOP, and $_what_the_heck_are_we_looking_at_BOTTOM, and always have a context interface the feature that is displayed in that frame, where you can always hit a help icon in the frame for a pop-up that links to the section in question.  Titles, insufficient labels etc… could be turned into links for the manual.

cbezuidenhout wrote on Thursday, February 23, 2012:

some improvements, mainly interface changes

also added a user level log for users to check messages they have sent and messages sent to themselves.
also improved the layout of the log by grouping messages,

http://github.com/bradymiller/openemr/commits/tajemo-dated-reminders-improvement_1

some other minor changes, let me know what you think.

Thanks
  - Craig
    Tajemo Enterprises

bradymiller wrote on Thursday, February 23, 2012:

Hi,
Placed a code review on github (just search the page for ‘bradymiller’ to see my entries). Just a couple recs there and then should be ready for commit.
thanks,
-brady