Changes to Patient Add/Search

sunsetsystems wrote on Thursday, January 07, 2010:

This is to let folks know that I’ve changed the Patient Add/Search feature.

One change was to modify the way searching is used.  Fields with default values were a problem, since the searching was being done on those values even when you didn’t type anything in there.  So I fixed it so that when you click (focus) on a field, it changes its background color to yellow.  Only the yellow fields are used for searching, so you can easily control and see what you’re searching on, and default values do not get searched unless you click on them to cause that.

Re-focusing on a yellow field changes it back to white.

A second change was to add an option for a “short” version of the form, where only mandatory fields appear and layout group names are omitted.  See globals.php for the revised description of $GLOBALS.

Third, I fixed some problems with duplication checking.

One of these was a race condition… it was using AJAX calls to check for dups when a field loses focus, however AJAX calls are (as the name suggests) *asynchronous*.  So for example if you enter some field and then click Submit, the checking starts at submit time and doesn’t get a chance to finish before the submit is complete.  I fixed this by rearranging the logic to start the check at submit time, but to do the actual submit from the AJAX callback function.

The second problem with duplication checking is that it was not checking in a very helpful way.  For example if the patient name and SSN matched but the DOB did not, that was fine.  Not.  So I replaced the code in the invoked PHP script to do specific tests that I thought were sensible.

Changed files are:

interface/globals.php
interface/new/new_comprehensive.php
library/ajax/find_patients.php

All of this was done in the main branch.  I hope everyone is OK with this, if not let me know.  Thanks.

Rod
www.sunsetsystems.com

sunsetsystems wrote on Thursday, January 07, 2010:

Sorry about the formatting of that.  I have no idea any more what SourceForge is doing with its forums.

Rod
www.sunsetsystems.com

bradymiller wrote on Friday, January 08, 2010:

hey,

Wouldn’t it make more sense to have this page have same format (or even same page modified to edit current or create news) as openemr/interface/patient_file/summary/demographics_full.php, then could type in insurance stuff on a new patient. Could still keep your search mechanism.

The search mechanism is cool and flexible, but maybe a bit geeky for a receptionist. That being said, I can’t think of a way to improve it. Also can be hard to get rid of the yellow (need to click another field and then come back). Perhaps treat it like a multi-selector function by only yellowing(one being edited) one at a time unless the ctrl key is kept on.

Bug: the form category selector boxes are centered and don’t line up. Was better when they were at the left.

-brady

rachoac wrote on Friday, January 08, 2010:

Brady/Rod,

We’re fixing this page as part of the UI refactor … it would probably be better to wait for my changes to avoid collision.

Thakns,

Aron

sunsetsystems wrote on Friday, January 08, 2010:

Brady, yes, including insurance and refactoring with the main demographics form would be good, but that was beyond the scope of this mission.

Yes I had some trouble deciding on the UI for the search mechanism.  I think receptionists will get comfortable with the idea after using it a few times, and it seems a lot better than it was.  As for clicking and coming back to get rid of the yellow… that may need some refinement.  I switched from using onclick to onfocus because of the oddities of <select> fields (selecting a list item generally uses two clicks).  I’ll play with it some more and also tweak the centering.

Aron, these improvements are important to one of my clients so please preserve the overall functionality and the “short form” option, even though I understand you will change the look.  Let me know if you have any questions.  By the way what is your general time frame for the UI refactor?

Rod
www.sunsetsystems.com

sunsetsystems wrote on Friday, January 08, 2010:

The centering and color-toggling quirkiness are fixed now.

Rod
www.sunsetsystems.com

tmccormi wrote on Friday, January 08, 2010:

__SoapBox On__
Preserving code that is of interest to one customer is not an acceptable model for this project, in my opinion.  If the community decides that a function or feature is generally a good thing, then great.  Otherwise it’s a customization that the Vendor should manage directly and not pollute the product.   We have done many such customizations and have ZERO trouble managing to keep them in place for our customers.   Please keep that in mind in adding enhancements.   This is a major pet peeve of mine with this product.
__Soapbox__

-Tony

ytiddo wrote on Friday, January 08, 2010:

__SoapBox #2__

as i was in the middle of my own user interface refactor, i was going a different direction with this:

In my opinion, instead of searching on the defaults of all fields, there should be two defaults in the layouts page, a search layout, and an entry layout this way i can default my clients to ‘single’ (as they are mostly under the age of 18), but search for a default of “any”.

new feature addition to the codebase is fine IMO, as long as BEHAVIORS can be preserved. the yellow distracts and annoys me, due to me being colourblind. how do i turn it OFF?

new features and changes that are not disableable can really turn people off of a project real quick.

I’ve already adopted a “silo methodology” to development, due to the issues i’ve had getting patches reviewed. Why am i even bothering with a review process, if theres no barrier to me just importing wht i want feature wise willy-nilly, and announcing after i’ve done comitted?

*highly frustrated*

__end soapbox__

Justin Doiel

sunsetsystems wrote on Friday, January 08, 2010:

Tony,

We are getting off-topic here and if you want to open a discussion about this, perhaps a new thread is in order.

However I’ll just say that the very nature of open source is that individual users add to its development.  If someone wants something, they can add it in and everyone benefits from the result.  Normally these go into a common code base.

In this particular case there are hundreds of sites involved, the client has already sponsored a huge number of critical improvements, and the features added are (a) very generally useful and (b) optional.  I’m just asking that they not be thrown away.  I don’t think that’s too much to ask.

Rod
www.sunsetsystems.com

ytiddo wrote on Friday, January 08, 2010:

Rod,

in normal open source projects, there is a review process. I’ve been working through OpenEMR’s Review Process for 9 months now.

I am not operating in a ‘commit code to the tree, tell others, fix based on feedback’ model. in fact, you asked me to put together my own OpenEMR demonstration VPS, so that you’ll take a look at my changes.

What have i done so wrong as to require such scrunity to my stand-alone addons, versus your code changing the search and demographics systems everyone uses breezing right through?

Justin Doiel

sunsetsystems wrote on Friday, January 08, 2010:

Justin,

What I did was fix stuff that didn’t work - I have not reinvented the search wheel!  The thing with colors was the least invasive way I could think of to deal with default values in searches.  I’m not going through an approval and review process to fix every little bug.  And furthermore I’m willing to change it if there is consensus as to how that should be.  That’s the main reason I started this thread.

Sorry you don’t like yellow.  I’ll make that customizable.  The search feature as a whole is already optional, has been from the outset, and the original “new patient” page is untouched.

I don’t understand your proposed design but I’m happy to discuss it if you’ll describe it in more detail.

Can you refresh my memory about that VPS?

Rod
www.sunsetsystems.com

ytiddo wrote on Friday, January 08, 2010:

Rod,

Regarding the feature at hand, i think an option for turning on/off colourizing the button, and an option to allow changing the colourization used on fields would be appropriate.

regarding the VPS,

my apologies. reviewing my email, it was brady who asked me to stick up an online demo.

I’ve spent quite a long time writing difficult XSLT code to try and solve a common problem, but have gotten no feedback of any sort other than “Eeew, java”(even though my software is run on a machine entirely seperate from the openemr server)!

Worse, i find that I’m having to extol the virtues of my approach, versus a hypothetical form system i’m going to have to finish off in order to implement mine! When i’m sitting on 2,000 lines of usable code, meant to replace the forms generator currently in the tree, somethings wrong.

I no longer even try and submit bug fixes to openemr, i’ve had that much difficulty with the current submission process.

I am real upset with the current submission system. i receive no notification when others commit code that may break code i’m working on. I have a vague idea what others are working on, but am given no oportunity to review their work.

this is not people working together.

my apologies for unloading so directly at you rod, its meerly that your ease of getting software commited highlights my utter failure to get my code reviewed. (plus, having dug through a lot of OpenEMR code, i feel tony’s frustration regarding customer specific extensions all over the place!).

My code is afforded such a review process, that i’m required to put together demo environments to get my code LOOKED AT. Yours apparently receives little, if any, review. I understand you’ve been with the project longer, but am i wrong in asking for the ability to review your work?

Justin Doiel

sunsetsystems wrote on Friday, January 08, 2010:

We’re all going to have to get used to this working-together business.  In the old days it was mostly just me and I would not have even started a thread like this.  :slight_smile:

I thought we had some consensus re XSLT?  Neither Brady nor I understand it very well, but we are looking forward to seeing what it is.

I’m sorry you are upset with the policies.  We’re all trying to do the best we can for the project, and as admins Brady and I are stuck with vetting new developers until some more proven techno-weenies are on board.

I have just checked in a change adding an option to globals.php to select the “search color”.  In your case I’d suggest something like #777777.  If you enable the search feature then I think *some* color is required, otherwise the feature would be almost as broken as before.

Rod
www.sunsetsystems.com

blankev wrote on Friday, January 08, 2010:

It wasn’t until recently that I, as a doctor, was confronted with the problems of websites and color blindness. As a medical professional I should have had supported solutions for this problem a long time ago. If you want to see what difference it makes goto:

http://colorfilter.wickline.org/?a=1;r=;l=0;j=1;u=www.archimedes-lab.org/colorblindnesstest.html;t=t

there you can see the same screen as seen by different types of color blind persons. May be we should pay more attention to this fact and keep the colors simple so the Open EMR is also available for color blind professionals.

Pimm

ytiddo wrote on Saturday, January 09, 2010:

Pimm,

A better colour vision test I’ve found is at http://www.opticien-lentilles.com/daltonien_beta/new_test_daltonien.php .

I hadn’t seen the “no-colourblindness test”, that was new to me, thanks for the link. :wink:

Rod,

I appreciate the difficulties that come with the changes involved in working with a larger team. I’ve posted some more documentation on my xml form generator at http://openmedsoftware.org/wiki/OpenEMR_Xml_Form_Generator . I hope that by providing more documentation, i can help to prevent misscomunications like this from happening in the future.

Justin Doiel

sunsetsystems wrote on Saturday, January 09, 2010:

Hi Justin, it looks like your form generator is mostly independent and non-invasive to OpenEMR, so it would be an easy decision to add it in to the “contrib” area.  Just let me know when you are ready for that.

Anyone want to try it out?

Rod
www.sunsetsystems.com

markleeds wrote on Saturday, January 09, 2010:

I think that it is reasonable that those who have consistently contributed the most over a long period of time should have seniority and authority in the project.  At this time those people would be Rod and Brady.

bradymiller wrote on Saturday, January 09, 2010:

Justin,

There’s a lot going on right now, so sorry your frustrated in your silo world.

Here’s a list of your patches:
Patches

Most got done within several days. Rod dealt with one you had on 10/14 in a different manner. I didn’t do anything about 10/19 because you posted it wouldn’t be applicable to general users (hopefully i didn’t misunderstand that)

There’s now an active page on wiki to follow all of the projects, so hopefully this will improve things.

To follow cvs commits i use the cvs history command relatively frequently, and look at the new code via sourceforges web cvs stuff.

Your line with the word extol ind of lost me. Unclear what do you mean by hypothetical form system?

I think I may of misunderstood your xml project. I was under the impression you were doing a total refactor of all the screens (demographics, history, etc.), so thought a demo would be a good idea (we did the exact same thing for Tony and Aron’s refactoring project) so Rod and I could figure out more info on what you were doing. If it’s actually just a form builder, then I agree with Rod that placement in contributions when your finished makes sense.

keep coding, it’s good for your health

-brady

ytiddo wrote on Sunday, January 10, 2010:

Brady,

Kindof. Sortof?

I’ve factored the ability to generate pages like the history page (and working on the demographics page) using this form generator, so, in my local version, the history page code has been dropped, in favor of a new history page, written by my form generator.

this is so that i can replace the demographics page and history pages with something closer to what my agency needs, and actually comes with at least one plus:

the ability to link a specific revision of a history page into an encounter, for auditing purposes.

I’ll continue coding on.

Sorry, but operating on a project with no mailing lists is highly annoying. obviously, I was working on a refactor project at the same time as two others, and was out of the loop on what was going on on their side of the world. however, instead of fixing the demographics and history page, i set out writing template generators for all the pages i needed, and now am set to template generate the old forms, not the new ones. this is so that encounter forms get ACLs, search, etc…

I should be set to demo this system on a VPS some time this week. I’m still working on merging differences between the ‘manual’ system grown out of the old forms, an the layouts system.

Justin Doiel