Checked In prescription print change

tekknogenius wrote on Saturday, July 16, 2005:

Add options in includes/config.php for prescription paper size and dimensions to make it more configurable for those not using US Letter size paper.

Hopefully I’ll add the option to print multiple prescriptions on one sheet soon, time permitting.

Also updated a couple files that had an errant extra line which caused the dreaded header info already sent error.

innocuous wrote on Tuesday, October 04, 2005:

Has the multiple prescription printing on one sheet done yet?

tekknogenius wrote on Friday, October 07, 2005:

Still need to finish it…

voipbound wrote on Tuesday, December 30, 2008:

I would like to manipulate the output also.  How would I begin to do this?

gutiersa wrote on Tuesday, December 30, 2008:

I have modified my files to set up for Prescriptions in NJ, and also have multiple scripts printing set up. Also modified page size. I print into 4.5x5 inch size paper. Write me and I will send a copy of my files. Here is what needs to be done (completely read the following prior to making any changes to your installation):

- back up your openemr folder
- copy the following files to the specified location, but first rename the original file ( I usually append "orig" to the end of the file name, prior to the extension. Example if the file name is C_Prescription.class.php, it becomes C_Prescription.classOrig.php. This way you will know which files have been modified):
       library/classes/Prescription.class.php
       controllers/C_Prescription.class.php
- add the following line to library/classes/class.ezpdf.php at or about line 94

case ‘SCRIPT’: {$size = array(0,0,288.00,396.00); break;}

just below the line that reads:

case ‘FOLIO’: {$size = array(0,0,612.00,936.00); break;}

and before the lines that read:

        }
        switch (strtolower($orientation)){

Be sure to use an appropriate text editor (notepad is no good, notepad++ is very good and can be downloaded for free from http://notepad-plus.sourceforge.net/uk/site.htm )

Please note that the line above is custmized for my prescription size of 5.5 inches (396.00) height and 4 inches (288.00) width. You need to play with these numbers for your specific paper size.
If you don’t want to modify your file I can include my copy of it.

-modify includes/config.php at about line 89 to 97 reflect your new script paper size and margin size. the following margins are for my particular prescription size:

// select paper size for prescription printing
// see library/classes/class.ezpdf.php for complete list of paper sizes
// ex. “LETTER”, “A4”, “LEGAL” …
$GLOBALS[‘oer_config’][‘prescriptions’][‘paper_size’] = “SCRIPT”;

// change page margins for prescription printing
// note, values are in pixels (72 dots per inch)
// to convert from centimeters use the following: (centimeters / 2.54 ) * 72;
$GLOBALS[‘oer_config’][‘prescriptions’][‘left’]   = 36;
$GLOBALS[‘oer_config’][‘prescriptions’][‘right’]  = 18;
$GLOBALS[‘oer_config’][‘prescriptions’][‘top’]    = 126;
$GLOBALS[‘oer_config’][‘prescriptions’][‘bottom’] = 54;

- when printing multiple scripts, add the new prescriptions first, then go to "list prescriptions", select the scripts you want by clicking the square next to the script, then click on select multiple.

I may be contacted at: info at bhcnj dot com

hope this helps

gutiersa wrote on Tuesday, December 30, 2008:

correction

the following line above:

- when printing multiple scripts, add the new prescriptions first, then go to "list prescriptions", select the scripts you want by clicking the square next to the script, then click on select multiple.

should read:

- when printing multiple scripts, add the new prescriptions first, then go to "list prescriptions", select the scripts you want by clicking the square next to the script, then click on print multiple.

sorry for the error

voipbound wrote on Friday, January 02, 2009:

Thank you, I will surely try this mod.  I am having another problem.  some of my CAMOS prescription does not get added when I submit.  Do you know what could be the problem?

voipbound wrote on Saturday, January 03, 2009:

Great work.  Before I make the changes, may I ask if this will allow me to print 4 Rx’s on a landscape 8.5x11.  If so, I cannot wait to make the changes.

gutiersa wrote on Saturday, January 03, 2009:

it depends. If you want to

- divide the 8.5x11 page into 4 frames (although I do not know how you will place 4 frames in a landscape), or

- divide a portrait 8.5x11 into two rows of 2 frames each (CAMOS already does this) or

- place 4 paragraphs into your page, each paragraph with one medicine all under one prescription heading, then you can already do this by changing this line:

            if (++$on_this_page > 1 || $p->provider->id != $this->providerid) {

the default in openemr is 3, I changed it to 1, but you could cange it to 4

Before you replace your files with mine please remember that in NJ the prescription paper already comes preprinted, so I blocked out the Practice name, dea number lic number etc etc, and adjusted my margins; therefore your heading may be blank if you my files. You may need to modify them again to print your own heading.

gutiersa wrote on Saturday, January 03, 2009:

correction:
the line above

if (++$on_this_page > 1 || $p->provider->id != $this->providerid) {

is found in controllers/C_Prescription.class

markleeds wrote on Saturday, January 03, 2009:

Voipbound:

Were you entering prescriptions in CAMOS and looking for them in the OpenEMR prescription list? CAMOS provides an alternate way to generate prescriptions but it is not integrated with the built-in prescription module with the exception of the link recently added to allow printing with the CAMOS 4 panel format.  It may be possible to modify CAMOS so prescriptions entered will also be entered in the prescriptions table and therefore available from the list.

gutiersa wrote on Saturday, January 03, 2009:

No I do not use CAMOS, I was never able to populate the tables although I had the intention of attempting it. I still haven’t gotten around to figuring it out. It would be nice if there was sample data for primary care, so I could figure out how to populate the tables.

I am sure the camos form can be easily modified to include an sql statement to update the prescriptions table in mysql.