CAMOS print four panel from Rx SQL error

hresto wrote on Friday, September 26, 2008:

I’m testing version 2.9.0 and when I select the “Print Four Panel” from the Rx menu, I get the following error when trying to print a prescription:

Select CAMOS Entries for printing

ERROR: query failed: select x.id as id, x.category, x.subcategory, x.item from form_CAMOS as x join forms as y on (x.id = y.form_id) where y.encounter = and x.pid = 1 and x.activity = 1

Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘and x.pid = 1 and x.activity = 1’ at line 1

_________
The unusual thing is that sometimes it works, but most of the time it does not.

markleeds wrote on Friday, September 26, 2008:

I am not sure but it may be due to the fact that some CAMOS files were not updated for 2.9.0.  Sorry.

Try downloading this .tar.gz file, extract and replace existing CAMOS directory.

http://openemr.cvs.sourceforge.net/*checkout*/openemr/openemr/interface/forms/CAMOS/CAMOS.tar.gz

hresto wrote on Saturday, September 27, 2008:

Thanks, that did the trick.

xiaoanri wrote on Saturday, September 27, 2008:

can this file be extracted under windows and if so, which program? i tried winzip, did not work. thanks.

hresto wrote on Saturday, September 27, 2008:

Well, I spoke too soon. It is broken again, even after installing the new CAMOS.tar.gz and changing the owner to apache:apache. It’s weird because the problem is intermittent. I even grabbed the latest openemr from the CVS.

hresto wrote on Saturday, September 27, 2008:

Download WinRAR (search Google) it untars and unzip *NIX files.

markleeds wrote on Saturday, September 27, 2008:

You would get that error when there is no active encounter.  This is should not be problem when used from within an encounter.

Is there a screen where you find that link and you are not in an encounter?

Either way, you should not have to worry about this happening.  I’m going to fix this.  Does it seem like a useful feature?  I don’t know if it was appropriate to put a link in the main program to a feature built into a plug-in form.

hresto wrote on Sunday, September 28, 2008:

Ok, I went to "Encounter" and CAMOS printing worked from there. Interesting enough, when I went back to the "Rx" form which list the prescriptions, CAMOS printing also worked. I guess that the initialization of CAMOS in "Encounter" fixed the problem ir "Rx".

As far as being a link in other forms, it shows up in “Rx”. As far as a useful feature, I am still trying to understand how CAMOS is used in the business process of this program. I’ve only been evaluation Openemr for the last 5 days.

Thanks for your help and quick response. I am evaluating this program for use in a Health Care and Corrections environment. It will need to have a MAR (Medication Administration Record) component as well as the ability to link to a mainframe for tracking of inmate location at anytime.

markleeds wrote on Sunday, September 28, 2008:

I think I figured out why you get this error so easily and I never get it.

I use the Old-style layout, just because it’s what I am used to.  You are most likely using the radio button navigation left menu.  I think this is the default with a new installation.

I just tried out the radio button layout (the concurrent layout) which you are probably using, and it is easy to go to the rx list page without being in an encounter.  This causes the error.

With the old style layout, which I use, it is impossible to get to the rx list page without being in an encounter.

I will take a look and try to fix it so it works either way.  In the mean time, make sure you are in a patient encounter first.

markleeds wrote on Monday, September 29, 2008:

Try the same link above to download.  You should not get that error now.

hresto wrote on Tuesday, September 30, 2008:

Perfect!!!! Thank you.