Situation
I have a patient that I am attempting to create a lab requisition from an ordered proceedure. The frame instead of showing the req displays Query Error.
OpenEMR Version
I’m using OpenEMR version 5.0.2 (1)
Browser:
I’m using: Chrome/MacOS; Firefox/MacOS
Operating System
I’m using: Apache 2.4
Logs
Did you check the logs? Was there anything pertinent in them? Paste them here (surround with three backticks (```) for readability
Seems now that the procedure I have loaded, CBC, is not showing as a selection to search for when ordering the procedure (its the only one I have a test as we are figuring what we need to order).
So, now there is no order ID for the Lab REqusition to find to even attempt a PDF.
Additionally, I now get this pulling up an old encounter form.
The first one CBC, is the only one that used to show when adding a proceedure when searching favorites. The second one, CBC no diff, does not show up at all. Now, both don’t show up when adding a procedure. Either for my as Admin or the Physician profile.
I’m going to run a fresh install and see if there are any issues along these same lines. I’ll keep you posted.
Ok, so I got the procedure to load again and populate into the procedure order form. The group CBC was still not available to grab and then populate the RBC and WBC tests (like had been done) but I can add tests and record the results.
However, I still can’t generate the lab requisition form… my guess is that it is not in the form itself, but one of the module loads (barcode, etc…)
I’m going to look at the barcode.php this weekend and see if I can see what could generate a query error. I know that I have having a problem with the Zend HTML and PDF print module for Rxs, so…
hi @kevin_ytc, we could look at the HelpfulDie function to see why it’s not spitting out the details of the sql error. Is your Admin->Globals->Security set up for Mode - Do Not Show SQL Queries ?
you could stick an error_log call in there to display the statement if needed
126 [Fri Feb 14 20:51:24.125087 2020] [php7:notice] [pid 19335] [client 192.12.184.6:58218] SQL Error with statement:que ry failed: SELECT req_id FROM requisition WHERE lab_id = ? AND pid = ?–Table 'openemr-test.requisition' d oesn't exist==>/var/www/openemr/library/lab.inc at 139:sqlQuery, referer: https://emr.yourtimeclinic.com/int erface/patient_file/encounter/encounter_top.php?set_encounter=16
That for each proceedure order that it build out when creating the Frame. However, that is only after a proceedure order has been saved… a new encounter loads correctly.
So, my thinking was that there was something squirly with the lab ID and pid, since that is called in the barcode.php… seems that with that sql error, that is exactly what is going on,.
What should the table structure look like?
Would disabling / reenabling work?