Query Error when creating Lab Requisition


(Kevin Robinson) #1

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

Did not have a php error in the php error log.


(Stephen Waite) #2

Hi @kevin_ytc, please post the details of the query error, thank you.


(Kevin Robinson) #3

Where do I find those? That is where I am stuck…thanks!


(Stephen Waite) #4

gotcha, try Admin->Globals->Logging-> User Debugging Options

another nice add from @sjpadgett


(Kevin Robinson) #5

Ok, I set errors to all and get nothing! :slightly_smiling_face:

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.


(Stephen Waite) #6

could you post a shot of your procedure configuration?


(Jerry P) #7

If the Header class is not loaded in form/script the User Debug won’t work


(Kevin Robinson) #8

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.


(Kevin Robinson) #9

How would I know if that is running? Is it the _header.php file that should be called from the Form.php?


(Jerry P) #10

Both procedure form and configuration loads user debug. So not popup, prob not getting errors.
A couple things.

  • Ensure your orders in configuration have a correct Order From provider setup.
  • Ensure code is populated
  • Check provider setup Procedure->Provider.
  • Address Book needs entry for lab type of provider used in provider setup.

This is all so even if internal clinic.


(Kevin Robinson) #11

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…)

Attached some screen shots…


(Kevin Robinson) #12

Procedures are working fine, second part to this is the query error when attempting to load a lab requisition form.

Found that the load_form.php is attempting to load the requisition form, but I don’t know how it is called in either the load_form or forms code.


(Kevin Robinson) #13

Annddd… I did some more testing and cut out the barcode portion of the requisition

/forms/requsition/new.php

and the lab requisition form works now. So, something in the barcode.php is not working.

focus narrows


(Stephen Waite) #14

there’s been some recent work on pdf parsing to html, wonder if this is the culprit


(Kevin Robinson) #15

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…


(Kevin Robinson) #16

Annnd I have no idea where the query error would be in barcode.php… does it call another function?


(Stephen Waite) #17

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