Ajax error in Diagnosis Search ICD10


(Craig Tucker) #1

When I search for a diagnosis in the issues pannel I am getting a great deal of lag and an ajax error
I am using OEMR 5.0.1.
I’m using: Chrome and Firefox.
I’m using: Linux–Debian/Synology

FIREFOX CONSOLE:

Source map error: Error: JSON.parse: unexpected character at line 1 column 1 of the JSON data Resource URL: https://Mysite/openemr/public/assets/jquery-min-1-10-2/index.js Source Map URL: jquery-1.10.2.min.map Source map error: Error: JSON.parse: unexpected character at line 1 column 1 of the JSON data Resource URL: https://192.168.210.1:5012/openemr/public/assets/jquery-min-1-9-1/index.js Source Map URL: jquery.min.map Error Notice: DataTables warning: table id=my_data_table - Ajax error. For more information about this error, please see http://datatables.net/tn/7
CHROME CONSOLE:
`
index.js:4 GET https://MySite/openemr/interface/patient_file/encounter/find_code_dynamic_ajax.php?sEcho=8&iColumns=2&sColumns=%2C&iDisplayStart=0&iDisplayLength=15&mDataProp_0=0&sSearch_0=&bRegex_0=false&bSearchable_0=true&bSortable_0=true&mDataProp_1=1&sSearch_1=&bRegex_1=false&bSearchable_1=true&bSortable_1=true&sSearch=Major%20De&bRegex=false&iSortCol_0=0&sSortDir_0=asc&iSortingCols=1&what=codes&codetype=ICD10&inactive=0&_=1572712683193 504 (Gateway Time-out)
send @ index.js:4
ajax @ index.js:4
ua @ jquery.dataTables.min.js:36
nb @ jquery.dataTables.min.js:37
O @ jquery.dataTables.min.js:29
f @ jquery.dataTables.min.js:41
(anonymous) @ jquery.dataTables.min.js:96
setTimeout (async)
(anonymous) @ jquery.dataTables.min.js:96
dispatch @ index.js:3
q.handle @ index.js:3

Error Notice:  DataTables warning: table id=my_data_table - Ajax error. For more information about this error, please see http://datatables.net/tn/7

Apache 2.4 Log:
2019-11-02T09:40:25-07:00 MyServer [Sat Nov 02 09:40:25.284228 2019 [proxy_fcgi:error] [pid 18648:tid 807506992] (70007)The timeout specified has expired: [client 000.000.000.0:0000] AH01075: Error dispatching request to :0000: (polling), referer: https://000.000.000.0:0000/openemr/interface/patient_file/encounter/find_code_dynamic.php?codetype=ICD10
`
I have also tested the 5.0.2 upgrade and still see the lag and ajax error. I have had it ever since upgrading to ICD10 in 2015. I am wondering if I need to delete and reload that data. Every thing else zips along.


(Stephen Waite) #2

hi @Craig_Tucker, you can test it (recommend a test environment to be safe) by truncating the icd10_dx_order_code table and then in the contrib/icd10 directory removing 2019 and moving in the 2020 codes in your 5.0.2 install which should have the code changes required, 2020 I10 dx update with a work around for nested folder (#2630) · openemr/openemr@53b8ae6 · GitHub

edit: before attempting you may just want to take a peek in the icd10_dx_order_code table and see if it was a certain revision that loaded bad data, then you could just delete the codes where revision equals say 2


(Craig Tucker) #3

Thanks Stephen,

I tried updating the ICD10 and I have the same delay. I think it is a server/Nginx issue. I am having a difficult time figuring out what to change. I have tried:

proxy_connect_timeout 900;
proxy_read_timeout 900;

That is not helping. I will keep digging.


(Jerry P) #4

Don’t think this is server issue. Data table will cause this and i’d bet it’s intermittent.
I wonder if your datatable dependency was updated to newer version where jquery version used may not be supported.
Just a gut feeling:)


(Craig Tucker) #5

No, it is not intermittent. It is very stable and slow every time. How would I check for the update of the data table dependencies? Should I just delete the ICD10 tables and start all over. I did run the built in update routine for the ICD10 and it still is having the performance issues. Clearly that is not the solution.


(Craig Tucker) #6

What I see is the following show revision 4 (highest level):
icd10_dx_order_code
icd10_pcs_order_code

The following show revision 3 (highest level):
icd10_gem_pcs_9_10
icd10_gem_pcs_10_9

And these show revision 2 (highest level):
icd10_gem_dx_9_10 2
icd10_gem_dx_10_9 2
icd10_reimbr_dx_9_10 2
icd10_reimbr_pcs_9_10 2

Does this mean that an error took place at revision 3 and that I should delete all entries greater than 2 and re-run the update sequence?


(Stephen Waite) #7

not necessarily since CMS stopped shipping the gems a few years ago, sounds like @sjpadgett’s advice should be considered as the root cause


(Jerry P) #8

When I get a chance i’ll look closer at this.
So since 2015 you’ve had this? Is it only searches? A screenshot of after fail be nice.
I could give a patch to trap error and maybe trace. Meantime look at the error in console and click the error line to expand. Should give a trace, screenshot that for me.


(Craig Tucker) #9

In 5.0.2 on my test server and the console log is blank. I have tried it in Chrome and Firefox. But I do get a pop up stating this:

“DataTables warning: table id=my_data_table - Ajax error. For more information about this error, please see http://datatables.net/tn/7

Then in the Apache 2.4 error log:
2019-11-17T20:57:43-08:00 MyServer [Sun Nov 17 20:57:43.380891 2019] [proxy_fcgi:error] [pid 19158:tid 868451376] (70007)The timeout specified has expired: [client 10.10.10.6:42883] AH01075: Error dispatching request to :5012: (polling), referer: https://10.10.10.1:5012/openemr/interface/patient_file/encounter/find_code_dynamic.php?codetype=ICD10

It takes over 100 seconds to complete the search for “Major Depressive”. In the process I get the pop up error about 3 times and about 3 of the Apache 2.4 error messages.

I tried it in 5.0.1 and got this in the console:

I am not sure why I am not seeing this in 5.0.2. I know that the file was updated by me to the most recent ICD10 in the Admin utility. That may have helped.

Yes, this started after the first time I loaded the ICD10 codes back in 2015. Figured it was just a glitch. But it persisted and it was not a priority for me to fix. Now I am trying to fix it because I do not want the problem to be propagated through all future builds.

I am only seeing the problem in the diagnosis search, it is not a problem in patient search or other search boxes.

–Craig


(Jerry P) #10

Okay i’m lost. Does problem still occur in 5.0.2 and not seeing error?
I’ve tested 501, 502, 503 using Major Depressive search with good results.
Can you send me a table dump of your ICD codes and i’ll try to confirm on my dev systems.

I’ve seen this error in the past but intermittently and usually not an explanation why.


(Craig Tucker) #11

I am sorry for the confusion. This problem with the ajax error has existed since the first ICD10 update for me in 2015 in all versions of OpenEMR. I am trying to update to 5.0.2 and I have that running on my test server. 5.0.1 is running on my main server. They both have the Ajax error but on my test server for some reason the console was not showing the error (yesterday). I looked at my first post and I see that I posted the same error back then for 5.0.2. I tested it this morning and I see the error in the console for 5.0.2 (so apparently it is intermittent? I was looking on a different computer so that may be a thing). But regardless I consistently get the pop up telling me of the Ajax error. Yesterday I tested 5.0.1 and I found the console error there. This morning I also looked at the Apache error log and found one more error code that I did not see yesterday:

2019-11-17T22:36:13-08:00 Stuart [Sun Nov 17 22:36:13.114053 2019] [proxy_fcgi:error] [pid 18137:tid 868672560] [client 10.10.10.6:42780] AH01071: Got error 'PHP message: PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /volume1/web/mydir/openemr/library/html2pdf/vendor/tecnickcom/tcpdf/tcpdf.php on line 17778', referer: https://192.168.210.1:5012/openemr/interface/billing/sl_eob_search.php

This error is intermittent on both the test (5.0.2) and main (5.0.1) servers.