UI Improvements

yehster wrote on Friday, August 16, 2013:

Use of css does require basic discipline on developer side. When a new functionality is added, developers need to scrupulously declare the class of all UI elements but not the styling details. Unfortunately, the current code has hard declarations. This means if one wants a black and white theme with large font, there are many screens where devloper/sponsor’s choice of color and font choice will override your choices.

On this point I agree.
We should be insistent that styling of elements directly should be avoided for any future code submisions. Also any css elements should be separated from the .PHP file in a .CSS file

robertdown wrote on Friday, August 16, 2013:

Sounds good. I’ll wrap the globals page and the facilities page and get those committed. I’ll have a 2nd for the new external package. And then I’ll start expanding.

robertdown wrote on Friday, August 16, 2013:

Brady really sums it up well. There are really 2 projects going on here, a new modern theme, and improving the actual interface (this involves actually changing the actual PHP files that render the page. For example, the work I’m doing right now on the edit_globals page falls in the UI Modernizations category - I have reworked the way the tabs are rendered, swapped select boxes for a more user friendly javascript based solution (http://ivaynberg.github.io/select2/#basics) and making the page responsive (I think this is absolutely mandatory in today’s web)

It kinda seems everyone is on the same page, which is always good.

robertdown wrote on Friday, August 16, 2013:

Yeah, the modernization will likely require a global header script, I’ll get to that after I wrap the globals page and facilities page. Maintaining compatibility with all themes is something I’m trying very very hard to do.

robertdown wrote on Friday, August 16, 2013:

This is an interesting point. I’ve noticed as I work through the code that there are a lot of hard-coded styling. I’ve really examined why it is there and only leave it if it’s absolutely mandatory (which I don’t think I’ve found any situation yet requiring inline-styling [although I’m sure they exist]).

I’m all for no inline-styling from now on.

deschel wrote on Saturday, August 17, 2013:

Thanks for showing me “@import”, which is equivalent to “include” in the css file. I was looking for this type of function for quite some time and could not find it.

Robert, this should solve your problem, so that you do not need to refer to the file of “bootstrap.css” in multiple php/html files, and you don’t need to create a universal header file for to include “bootstrap.css”.

In your file “modern_theme.css”, you can include the line:
@import “bootstrap.css” to pull all of the bootstrap styles into it.

I still like my earlier suggestion of incorporating the parts of bootstrap.css that you need and copying them, but if you want to go along with the other way of just including “bootstrap.css” this sounds like an easy solution.

Thanks MD Support for showing me this. I’ll probably be using this css function in the future.

David

robertdown wrote on Sunday, August 18, 2013:

The bootstrap.css file is required for the modernization project, not just the new theme. Plus, there’s a bootstrap.js, select2.js, and other javscript files that are needed.

A global header file is best practice anyway - so I think it should be implemented.

robertdown wrote on Monday, August 19, 2013:

See https://bitbucket.org/rdown/openemr/commits/39fa91bc7843777a33859366b8daca67e7944124 for a good point to integrate changes for the edit_globals.php page. There’s still more I’d like to do to this page, but it’s more backend stuff that won’t affect the way the page looks and I haven’t figured out exactly how I want to tackle it.

So for now, I’m considering the edit_globals page as “modernized.”

The above commit has already been rebased and squashed into 1 commit and here is a review of what has changed

The select2, html5shiv, bootstrap and updated jquery js libraries were added, along with the bootstrap.css, font-awesome.css and modernization.css, and all the changes to the edit_globals page itself.

bradymiller wrote on Tuesday, August 20, 2013:

Hi Robert,
Good to see the code moving forward. Placed some comments/suggestions on your bitbucket commit.
-brady
OpenEMR

robertdown wrote on Monday, August 26, 2013:

Responded - https://bitbucket.org/rdown/openemr/commits/39fa91bc7843777a33859366b8daca67e7944124#general-comments

commits fixing the error are linked to in the comments

sunsetsystems wrote on Monday, August 26, 2013:

Just to throw in another wrinkle …

I’ve been looking at developing a patient portal as one or more Joomla 3 components. As a portal would ideally be part of a larger web site and Joomla appears to be the world’s most popular open source content management system with very active developer and user communities, this seems like a very nice match.

Joomla comes with a modern MVC framework, is fully object oriented, secure, highly modular, and seems to be keeping up with best practices in UI and other areas of development.

Rod
http://www.sunsetsystems.com/

robertdown wrote on Monday, August 26, 2013:

I have to admit, I haven’t used Joomla since it’s 1.x codebase, so I’m not up to date with it.

A patient portal component sounds neat.

As I rework some of the admin areas, I’m leaning the code towards an MVC style implementation, but it would have to be another baby-step project.

I’d call the modernization project bleeding-edge, but if you want to see essentially a nightly build check you https://bitbucket.org/rdown/openemr/src/6f3a0fc499be0e964a04aa785c2544535c69a514/?at=updated-ui-facilities (This branch is obviously just for the facilities page)

specifically, you can see what I’m trying to do with:
https://bitbucket.org/rdown/openemr/src/6f3a0fc499be0e964a04aa785c2544535c69a514/interface/usergroup/facilities.php?at=updated-ui-facilities
and
https://bitbucket.org/rdown/openemr/src/6f3a0fc499be0e964a04aa785c2544535c69a514/interface/usergroup/usergroup_model.php?at=updated-ui-facilities (Ignore the top docblock, Eclipse created that, I’ll insert the appropriate information before I actually offer up the commit)

As you can see, I’ve moved all the html code to views/facilities.phtml which allows better abstraction of the logic from the view (while keeping the ability to sprinkle in some PHP when we need translation support). I’m also using angularjs to retrieve a lot of the content (https://bitbucket.org/rdown/openemr/src/6f3a0fc499be0e964a04aa785c2544535c69a514/library/js/usergroup.js?at=updated-ui-facilities).

If you viewed /interface/usergroup/facilities.php in your browser it’d return the view, but if you sent ajax headers with it and sent a GET request you’d get a list of facilities in JSON form. If you sent a POST header it’d update/save a facility. You get all of this just from viewing that one facilities.php page (In this case it’s acting as a controller).

robertdown wrote on Saturday, September 07, 2013:

Ok, my modernization project has really mushroomed into something a lot bigger.

I want to propose we begin the transition to a the Zend Framework 2, a full featured MVC, event-driven OO framework and Doctrine, a full featured ORM.

I know this debate has come up before, with lots of opinions flying everywhere, so let me list my reasons for thinking this is the way to go.

  1. The MVC design theory is one of the top design theories right now. So much so, that there’s even a .NET MVC.

  2. Right now we have business logic mixed in with views, which makes it difficult for new developers to contribute to the project. The separation of models, controllers, and views would allow for more developers.

  3. MVC structure provides a cleaner code-base to maintain.

  4. Because Zend Framework 2 is a modularized system, the transition can happen over time. We don’t need to move everything at once. It can be something that happens slowly and thoroughly.

  5. Unit testing is easier. Zend provides it’s own unit testing, based on PHPUnit.

It basically boils down to this: MVC is widely used today, easier to maintain, and can provide better unit testing.

As an example of how much better this could be, I’m rewriting the facilities section using Zend and Doctrine. I’ll provide a link to the commit for everyone to take a look at.

Honestly, this seems like a no-brainer, especially considering it can be transition to in small parts, not all at once.

mdsupport wrote on Saturday, September 07, 2013:

Sections like Globals or facilities are used probably a few times in life of an installation. Your demo approach will have lot more credibility if it addresses high frequency use items. Some suggestions -

  1. calendar/appointments
  2. demographics
  3. issues management
  4. better yet, replacement/enhancement of Layout Based Forms.

sunsetsystems wrote on Saturday, September 07, 2013:

Also, Robert, have you actually looked up the past discussions and read them? You should be aware of the points raised, especially re Zend.

Rod
http://www.sunsetsystems.com/

robertdown wrote on Saturday, September 07, 2013:

You’re right, a facilities demo is weak. I’ll demo ZF2/Doctrine using one of your suggestions.

Rob, I have read through the previous Zend/MVC discussions. I think ZF2 is flexible enough to do anything we need.

cesarusmaximus wrote on Tuesday, September 17, 2013:

I am also looking into changing the user interface for OpenEMR. My
motivation is the following: I am supporting a doctor who already has a
commercial EMR. However this doctor wants to branch out into other areas
and needs an EMR/CMS that would suit the present and future needs.

After some research I settled on OpenEMR since it is the one that is
most supported of all of them, despite the fact that it is written in
some technologies that I haven’t used too much before: PHP and JS. After installation and playing a little bit with it, I think that with the current GUI it would be a hard sell to this particular doctor who is used to a more integrated interface.

I tried experimenting with different JS frameworks, but into the end I settled on Bootstrap and JQuery. I tried to create the scheduler screen using Bootstrap, JQuery and a slew of other JavaScript components that i found on the web. Into the end I came up with a mockup that looks like the following. I tried to make the interface as easy to use as possible. In my opinion a GUI should be self explanatory.

I think that the left side menu being there all the time it just takes important space without doing much. Therefore I put it under a slide in menu that will be brought on the screen on request. The same goes for the left side calendar. Most of the time it does not do much. In case that a full month calendar is needed it can be brought on the screen by a button. After the day is selected it goes away. I also hid the messages into another slide screen that comes in from the right. Once the messages are read they can be hidden back. If a new message comes the counter in the navigation menu it flash or it will be colored in a different color.

I am tying to implement a button for finding the first available appointment for a particular facility with a particular provider.

The providers are selected by a drop down in which the check box is ticked. The facility comes from a drop box also, but in this case it is exclusive.

I need to implement a search button also.

These are some of my ideas, I welcome any suggestions. I am trying to have this posted someplace on the web so people can play with it and give me some feedback.

Thank you.

jcahn2 wrote on Tuesday, September 17, 2013:

Ahoy Little Ceasar,
Cool as the other side of the pillow! I am not seeing the single day view for multiple providers.
After you have chewed on the calendar for a while, I can’t wait to see what you can do with the patient summary screen. IMHO that’s the big enchilada.
Jack

mdsupport wrote on Tuesday, September 17, 2013:

Cesarus, like earlier comment, day view is used more often and has complex logic to handle time slots, multiple appointments with same provider at the same time (double/triple booking), appointments spanning across time slots etc.

Also,

  1. look at the ‘Find Available’ button for current way to find open slots. If you are building a new page, try using JSON to get information from existing code.
  2. The ‘Hide Menu’ link toggles menu display. That takes much space - so if you have better code, please contribute.

cesarusmaximus wrote on Tuesday, September 17, 2013:

Jack,
You are not seeing because I could not find a free control that displays multiple resources. The only one that I could find is agenda control from http://dhtmlx.com/ and it costs a cool $500 for a single install. Just imagine the schedule can handle multiple providers :). As I said it is a mock up.

I take your patient summary screen as a challenge. Give me some time and I will come up with it.