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