E-Sign Issues

arnabnaha wrote on Monday, October 20, 2014:

Hi
I did an encounter with a patient today and after billing out the patient I tried to lock the encounter using e-sign. After clicking e-sign, the pop up appeared but when I entered my password and clicked “sign”, nothing happened. I guess its broken in windows…please help!

fsgl wrote on Monday, October 20, 2014:

Working in 2089 Demo.

Any error messages?

arnabnaha wrote on Monday, October 20, 2014:

Hi fsgl…
Thanks for the input…I am not getting any error messages in openemr. Just that on clicking the sign button, simply nothing happens.

arnabnaha wrote on Monday, October 20, 2014:

arnabnaha wrote on Monday, October 20, 2014:

The apache error log doesnt show any issue but the php error log shows this:

[20-Oct-2014 23:08:46 Asia/Kolkata] ERROR: OpenEMR SQL Escaping ERROR of the following string: form_history_form

[20-Oct-2014 23:10:28 Asia/Kolkata] ERROR: OpenEMR SQL Escaping ERROR of the following string: form_history_form

This error log appears when I click the sign button in the e-sign popup that appears

arnabnaha wrote on Tuesday, October 21, 2014:

please help…please

bradymiller wrote on Tuesday, October 21, 2014:

Hi,

Check out this thread:
https://sourceforge.net/p/openemr/discussion/202506/thread/9687253b/?page=2

-brady
OpenEMR

arnabnaha wrote on Tuesday, October 21, 2014:

Thanks brady…figured it out…the issue is old…will fix it permanently

arnabnaha wrote on Tuesday, October 21, 2014:

Hi Brady

Issue persists even after using kevin’s Idea…which was

https://sourceforge.net/p/openemr/discussion/202506/thread/9687253b/?limit=25&page=2#6990

now it gets worse - after updating the registry, the forms table and the form directory in openemer forlder, the form data doesnt show up, the form look have changed and also it doesnt save anymore. So I decided to revert back the changes.

Please help now…

arnabnaha wrote on Tuesday, October 21, 2014:

NOOOO…I GIVE UP…Please help…tried a lot…changed the directory name, all the registry directories and also the formdir in form table…for all the forms made by xmlformgen. Forms work fine but esign on those forms just dont work. E-sign works on the non xml-formgen forms like vitals, new encounter forms etc.

PHP error LOG:

[21-Oct-2014 17:20:44 Asia/Kolkata] ERROR: OpenEMR SQL Escaping ERROR of the following string: form_historyform

[21-Oct-2014 17:21:38 Asia/Kolkata] ERROR: OpenEMR SQL Escaping ERROR of the following string: form_historyform

fsgl wrote on Tuesday, October 21, 2014:

Never say die.

Will wade through Ken’s thread to see if there are other guideposts & hints.

fsgl wrote on Tuesday, October 21, 2014:

Google search of the sql escaping error message:

  1. SQL injection.
  2. Escape sequence.
  3. Escape characters.

It’s possible that some escaping issues slipped through.

arnabnaha wrote on Tuesday, October 21, 2014:

Thanks fsgl…what should I do next then?

fsgl wrote on Tuesday, October 21, 2014:

If Brady knows where to look in the code, he’ll let us know.

We’ll have to give him a chance to get back from his day job.

arnabnaha wrote on Tuesday, October 21, 2014:

sure…lets wait for him…

yehster wrote on Tuesday, October 21, 2014:

Does the table form_historyform exist in your database?

The way that “table names” are escaped, is by seeing if there is a match with “show tables.”

Also, the eSign API prepends form_ to all table names, so if the correct table is just ‘historyform’ then that is the source of your problem with eSigning.

The assumption that made here, may be what’s failing for you.

arnabnaha wrote on Tuesday, October 21, 2014:

Hi kevin…
I checked in the phpmyadmin…it shows the table name as form_history not as form_historyform. what should i do to change it? is it causing the issue?

arnabnaha wrote on Tuesday, October 21, 2014:

EUREKA…THANK YOU SO MUCH KEVIN…GOT HOLD OF THE ISSUE…FIXING IT UP…

yehster wrote on Tuesday, October 21, 2014:

The eSign API is looking for a table called form_historyform because that’s what the directory is called, but that doesn’t match what the table seems to be called. (Assumption made in the comments is being violated in this case.)

Try adding this into the Signable.php class I linked to above and see if that fixes after the line which does something similar for the encounter form.

    if ( $this->_formDir == 'historyform' ) {
        $table = "form_history";
    }

arnabnaha wrote on Tuesday, October 21, 2014:

No kevin, it doesnt work that way…