Changing printed prescription

docaltmed wrote on Tuesday, June 16, 2009:

I need to do two things to the printed prescription page.

First, I need to remove the "Rx" image.

Second, I need to remove the "DEA:" field.

I  tried changing the Rx.png file in /openemr/interface/pic/ to a different image, of the exact same size, by renaming the old Rx.png, giving that name to the new image. I made the permissions the same as the other image files in that folder.

After doing that, the prescription form simply printed with no image whatsoever. Moreover, when I swapped everything back to (what I thought was) the way it had been, the Rx.png image still doesn’t print.

What did I do wrong?

Regarding the DEA field, I have no idea how to begin with that.

Any suggestions would be helpful.

cfapress wrote on Wednesday, June 17, 2009:

From looking at the code I’d say you did everything correctly. Just just as a second check…

Make sure the Rx.png file has Read/Write access to everyone. In Linux the command to set the permission would be:
chmod 666 Rx.png

The Rx.png image can be any size. It’s only the name of the file and the read/write permissions that are critical. I just tried a test where I changed the Rx.png image and printed a prescription. it had the new image. Then I copied the original Rx.png image back and printed again. The big ‘Rx’ image appeared, as expected.

Be certain that you’re working with PNG images and not JPGs.

If you’d like to mess around with the code that generates the printed PDF file, look at this file:
<oemr>/controllers/C_Prescription.class.php
Around line 190 you’ll see the reference to the Rx.png image.

There is also this comment in the code about the DEA line:
"
    // A client had a bad experience with a patient misusing a DEA number, so
    // now the doctors write those in on printed prescriptions and only when
    // necessary.  If you need to change this back, then please make it a
    // configurable option.  Faxed prescriptions were not changed.  – Rod
    // Now it is configureable. Change value in
    //     <openemr root>/includes/config.php - Tekknogenius
"

Jason

docaltmed wrote on Wednesday, June 17, 2009:

Thanks, Jason. That did the trick.