Navigation bug?

mdsupport wrote on Saturday, May 10, 2014:

Steps to replicate in http://demo.open-emr.org:2089/ when no patients exist -

  1. Click ‘Patient/Client’ -> Patients for dynamic_finder.php to shows ‘No matching records found’
  2. Click on ‘No matching records found’ to see Patient Demographics form
  3. You can ‘Edit’ but not save the record - since there is none.

Although very low risk, finder will need a fix. But more importantly, since $pid and $encounter are taken for granted if set, may be every page needs to validate $pid and $encounter before their use?

fsgl wrote on Monday, May 12, 2014:

A few observations:

  1. When encountering “No matching records found”, most users would check the spelling of the surname and try again. They are unlikely to click the error message taking them to the Patient Summary which has been assigned to no patient.

  2. If a user happens to wander inadvertently to that screen, there is an additional hint of wayward navigation: “You® request could not be processed, an error occured with the number of arguments passed to the function. Please try again with corrected arguments”, located below the Prescriptions widget.

  3. Most users would check that they have the correct patient and encounter date before entering data. When things become hectic, errors are bound to happen. A practice generally will have well established guidelines to handle such situations.

mdsupport wrote on Monday, May 12, 2014:

As noted in step 3, changes are not saved. So the bug was reported as low risk otherwise it would be a show stopper.

One correction: The behavior is part of ‘No matching …’ click response. So when searching a full database with unmatched filters, same result can be observed.

In general it is good idea to fix these ‘harmless’ issues in due course as a preventive measure.

yehster wrote on Monday, May 12, 2014:

There seem to be two basic places were appropriate validation checks could/should be added.

  1. On the dynamic finder screen. (No Matching Records) shouldn’t be clickable/attempt to load demographics.

  2. demographics.php should valid PIDs, and report an appropriate error when attempting to use an invalid pid.

Input validation is something we can do a better job with in general in the code base.

yehster wrote on Tuesday, May 13, 2014:

http://sourceforge.net/p/openemr/code/ci/4094ec25a63b77a3fb767d173aa95207bea44068/

Address Issue #1 from my list. Prevents “No Matching record” from being clickable in the dynamic finder. I could certainly sees someone clicking the link inadvertently especially if using a tablet/phone and suffering from fat finger syndrome.