New_search_popup.php&close

Situation
After update to latest stable the add new patient form is going 404.
The requested URL /openemr/interface/new/new_search_popup.php&close was not found on this server.
We set owner to www-data and even tried completely open permissions with no change in ability to see the page in the GUI.

OpenEMR Version
5.0.1
Browser:
Chrome, Firefox, Explorer

Operating System
I’m using: apache2 LAMP stack on Debian

Logs
Did you check the logs? Was there anything pertinent in them? Paste them here (surround with three backticks (```) for readability

1 Like

Update Found issue with this one. There is a link
openemr/interface/new/new_search_popup.php&close which is showing not found as the &close on the end is not a valid destination. If you cut it to have
openemr/interface/new/new_search_popup.php instead link works correctly.

By removing the &close in the link structure found in file /openemr/interface/new/new_comprehensive.php the link functions as expected and allows the file permissions and owner to be set as default when installed.

1 Like

Hi @Jeremiah_Ocasio ,

Which link/button that you click within OpenEMR is doing this?

thanks,
-brady

Hello @brady.miller the link is under create new patient when saving in demographics. It appears to be in the debian update files as we did a test server and the same link issues occurred.

On a similar note. New patient/search within frames menu type Aldo hora 404 on demographics.php
Switching to Tabs resolves the problem.

dear doctor Brady,
I also experience this error. I do not do anything including anything. What I did just adding records in the “Commune” list and then I am trying to add a new patient, when I click the button “Create new patient”, I got this error. Please help. Thank you .

dear doctor Brady,
I did some modification as “@Jeremiah Ocasio” told -> “By removing the &close in the link structure found in file /openemr/interface/new/new_comprehensive.php the link functions as expected and allows the file permissions and owner to be set as default when installed.” -> it is running well as before.
The strange thing why it gave me that error although I do not do any modifications.

Ran into this issue today. Removing the &Close as described corrected it. Thank you for posting!

I have my instance of OpenEMR installed using Amazon AWS. I am running into this same issue. How can I edit the /openemr/interface/new/new_comprehensive.php file?

Hi @brady.miller ,

Just reporting that this issue seemed to “reappear” in the latest 5.0.2 version (Linux / PHP 7.3) when clicking on New Patient > Create New Patient button. This was reported by my client by getting the same “Not Found” error message. Removing “&close” from url in line 920 in /interface/new/new_comprehensive.php file did fix this issue for my client. Thanks.

url+="&close"
>>>
url

was probably intended to be

        url+="&closeBeforeOpening=1"

Hi All,

Issue is not with url+="&close" its already exist in 5.0.1 but issue with below sql query
SELECT * FROM layout_options WHERE form_id = ‘DEM’ AND uor > 0 AND field_id != ‘’ AND (edit_options LIKE ‘%D%’ OR edit_options LIKE ‘%W%’ ) ORDER BY group_id, seq its not returning any result, every one can execute this query on there database you will get empty result for this query and query is exist in new_comprehensive.php code.

Every one please check there layout for demographics you will see there will no Dupl check function in the options column and that are the main issue with above error. Just add Dupl check options in dempgraphics layout for fname,lname,DOB etc fields. Then issue will be automatically get resolved.

Thanks,
Nilesh

SELECT * FROM layout_options WHERE form_id = 'DEM' AND uor > 0 AND field_id != '' AND (edit_options LIKE '%D%' OR  edit_options LIKE '%W%' ) ORDER BY group_id, seq;

works on 5.0.2

@stephenwaite query is working fine but its not returning any result that’s the issue and code expect some result from the query there above mentioned error is appearing.

hi @Nilesh_Hake, here’s the json of the returned result for v5.0.2

[
{"type":"header","version":"4.8.4","comment":"Export to JSON plugin for PHPMyAdmin"},
{"type":"database","name":"openemr"},
{"type":"table","name":"layout_options","database":"openemr","data":
[
{"form_id":"DEM","field_id":"fname","group_id":"1","title":"","seq":"2","data_type":"2","uor":"2","fld_length":"10","max_length":"63","list_id":"","titlecols":"0","datacols":"0","default_value":"","edit_options":"CD","description":"First Name","fld_rows":"0","list_backup_id":"","source":"F","conditions":"","validation":null},
{"form_id":"DEM","field_id":"lname","group_id":"1","title":"","seq":"4","data_type":"2","uor":"2","fld_length":"10","max_length":"63","list_id":"","titlecols":"0","datacols":"0","default_value":"","edit_options":"CD","description":"Last Name","fld_rows":"0","list_backup_id":"","source":"F","conditions":"","validation":null},
{"form_id":"DEM","field_id":"pubpid","group_id":"1","title":"External ID","seq":"5","data_type":"2","uor":"1","fld_length":"10","max_length":"15","list_id":"","titlecols":"1","datacols":"1","default_value":"","edit_options":"ND","description":"External identifier","fld_rows":"0","list_backup_id":"","source":"F","conditions":"","validation":null},
{"form_id":"DEM","field_id":"DOB","group_id":"1","title":"DOB","seq":"6","data_type":"4","uor":"2","fld_length":"10","max_length":"10","list_id":"","titlecols":"1","datacols":"1","default_value":"","edit_options":"D","description":"Date of Birth","fld_rows":"0","list_backup_id":"","source":"F","conditions":"","validation":null},
{"form_id":"DEM","field_id":"financial_review","group_id":"5","title":"Financial Review Date","seq":"4","data_type":"2","uor":"1","fld_length":"10","max_length":"20","list_id":"","titlecols":"1","datacols":"1","default_value":"","edit_options":"D","description":"Financial Review Date","fld_rows":"0","list_backup_id":"","source":"F","conditions":"","validation":null},
{"form_id":"DEM","field_id":"deceased_date","group_id":"6","title":"Date Deceased","seq":"1","data_type":"4","uor":"1","fld_length":"20","max_length":"20","list_id":"","titlecols":"1","datacols":"3","default_value":"","edit_options":"D","description":"If person is deceased, then enter date of death.","fld_rows":"0","list_backup_id":"","source":"F","conditions":"","validation":null}
]
}
]

Hi @stephenwaite issue is with @TechMed demographics layout not in your demographics layout. if they are replacing url+="&close" with url they will get fixed it but they will not going to get the duplicate patient list on create new patient. They will never going to get the duplicate patient list with popup on create new patient.

1 Like

@brady.miller helped me fix the code handle no dupes bug in url by stephenwaite · Pull Request #2707 · openemr/openemr · GitHub

1 Like

@Nilesh_Hake You’re right. That was causing the problem

It happens because you have DUP CHECK for one or more fields and if all those fields are not required what happens is that if you haven’t entering anything in those fields it will happen.

    var fieldadded = false;
   for (var i = 0; i < flds.length; ++i) {
       var fval = $('#form_' + flds[i]).val();
       if (fval && fval != '') {
           fieldadded =true;
           url += separator;
           separator = '&';
           url += 'mf_' + flds[i] + '=' + encodeURIComponent(fval);
       }
   }
   if (flds != '' && fieldadded) {
       url += "&close";
   } else {
       url+="?close";
   }

Something like this will fix it.