Bug in patient finder pop-up for fax/scan

fred0 wrote on Wednesday, January 09, 2008:

Just started playing with fax and scanning in OpenEMR and found that there is an error thrown up in the find patient pop-up for that function. The file in question is controllers/C_PatientFinder.class and this is the diff output from the fix and original files:

$ diff C_PatientFinder.class.php C_PatientFinder.class.php-original
34c34
<       function find_action($form_id,$form_name) {

>       function find_action($form_id, $form_name,$pid) {

I’m not sure why deleting the $pid variable fixes it, but it does.

andres_paglayan wrote on Wednesday, January 09, 2008:

a thorough fix will be checking the function declaration of find_action
and see what it does with the third parameter, (if any)

andres_paglayan wrote on Wednesday, January 09, 2008:

or on a second though
better to give a value by reference like $pid=’’
just in case the function is called somewhere else with a needed third parameter

fred0 wrote on Wednesday, January 09, 2008:

Andreas,

That’s over my head unfortunately. I wish I really knew more about php, but I’ve managed just enough to find the offending line. Would love to have smarter people take a look and see if that’s the way to go or, if not, what the better fix should be.

Cheers.

sunsetsystems wrote on Wednesday, January 09, 2008:

I don’t understand the initial problem.  What version of OpenEMR is this?  I don’t see where that class is even used.

Rod
www.sunsetsystems.com

fred0 wrote on Thursday, January 10, 2008:

Ah, sorry…
Version is 2.8.3
The class was is in the fax/scan page. When you click on dispatch and then turn on "Copy pages to patient chart," in that box you click on the patient name to open a patient finder pop up window. That pop-up seems to use this class.

However, I just tried to replicate it (to get a screen grab) by putting the variable back, put now it seems to work fine so… nevermind.

On a related note, in trying to get Fax/Scan working, I discovered that ImageMagick is required for the mogrify function of the dispatch page. I looked around but didn’t see any obvious documentation of this requirement. I found it by paging though the code and finally spotting the mogrify function and googling it.