Priority mechanism for issues

cmswest wrote on Tuesday, September 10, 2013:

I was hoping that another field could be added to the lists table that could influence the order in which issues are displayed so that they’re not just sorted by the oldest first?

mcaloon wrote on Tuesday, September 10, 2013:

Stephen,
Another approach would be to implement a sortable table in jQuery eliminating the need for another column in the DDL. I believe jQuery DataTables plugin is already used in the finder and calendar implementations in the tree to see some example usage. This accommodates the user’s ability to selectively manipulate which column to order the list.

Mac

mdsupport wrote on Tuesday, September 10, 2013:

Mental health users may be interested in this since they seemed to require reports, forms etc. for top n issues in specific order. This has come up before for us as well and the requirements did not fit any sort order. If pt is on norco and aspirin, they want to see norco first, period. However, using jQuery to drag and drop the issues in correct order will be a cool interface feature.

drkay wrote on Tuesday, September 10, 2013:

I would also be interested in an option to have resolved issues move to the bottom of the issues list and/or hide resolved issues.

mcaloon wrote on Wednesday, September 11, 2013:

MD Support,

Tell us more about the application using the drag and drop operations. To follow your straw man, we might have at least a “mental health issue” object that implements the draggable class and probably some kind of report class that implements the droppable class (re-rendering with the newly dropped object in sequence, etc). The server side of these interactions would have to be well designed with the user experience being the driver i would assume. Maybe a good set of use cases could be posted on this thread.

For example, I have a patient with diagnoses X in a report and now I want that patient to be used as a filter to a secondary report. I want to drag the patient to the “secondary report widget” (in some undisclosed location in the openEMR tree) and render that report.

Stephen’s initial idea in the thread is the ability to dynamically prioritize the issue list via some control. I haven’t look at the specific areas in the code yet, but there might be an opportunity for some community thinking on this as perhaps a kernel to the longer term strategy for the “UI redesign” effort which is a greater conversation spanning a number of threads.

Stephan have you located the code that processes the particular pages?

Mac

cmswest wrote on Wednesday, September 11, 2013:

My original idea is to add a field called priority in the table lists. It would be fine to rig a jquery soln. but I’m thinking that this concept of priority actually deserves it’s own field. No?

mdsupport wrote on Wednesday, September 11, 2013:

Priority has to be a field in database. As stated in earlier post, priority does not follow any logic or rules. Even if it did, it is not a good design concept to save a db column and force physicians to rearrange issues every time just because jQuery can do it.

Mac’s UI design concept is great. But in this case, idea is very basic. Instead of users entering priority sequence, they use jQuery drag feature to rearrange issues. Resulting order is saved using priority field avoiding seq numbers inconsistencies.

drkay wrote on Wednesday, September 11, 2013:

I like either drag-and-drop, or an up and down arrow next to each item to promte or demote each issue.

mdsupport wrote on Tuesday, July 14, 2015:

If anyone is still interested in current topic, this commit adds manual sequencing support for patient issues with drag and drop re-sequencing capability. List of issues can be rearranged by left click and hold to drag any issue to desired sequence. New display order is stored in background.

Disclaimer: Due to architecture differences, some tweaks may be needed.

mdsupport wrote on Tuesday, July 14, 2015:

Sorry, missed this commit which uses correct display sequence. The order fixes several annoying consequences of ordering only by begin date.

Note: You will still need to update the display order throughout the rest of codebase.