Does anyone know how to customize the letterhead generated by the report function. I wanted to be able alter the standard output (showing facility id) and replace with my hospital’s standard letterhead template which includes a logo.
It may be easier for Paul to just insert a single image of the hospital letterhead with the logo.
Would he delete lines 465 to 468?
Documents can store the image. Does Paul need to name that image as “practice logo” and change line 460 if the format is not .gif?
Just experimented on the 4.1.1 Demo, .png files are supported in addition to .jpeg files. Png files have higher resolution and better color retention.
Paul, please backup your data before you start customization.
In event that you are unaware, there is a utility for writing consult letters.
Go to Patient Summary. In the left Navigation Menu, toward the bottom, Popups will light up. Click Letter from the drop down menu and a dialog will appear. See attachment.
Text can be easily changed in the sample letter but another forum member will have to tell you how to add an image to the template. Can’t merely copy an image from Documents.
Thank you Stephen and fsgl. I am trying it out- just need to tweek it a bit. On initial upload of the logo, there was a big size discrepancy between the logo (87k) and the the generated document. Any suggestions before I trial and error?
The current location of the ‘practice_logo’ file will affect all sites in a multi-site setup - Unless the custom_report.php file is replicated inside each site subdirectory, along with the site-specific images, the suggestions above will impact all sites
despite using php comment prefixes (// or /…/ or #), results from lines 465-8 continues to appear, along with the above prefixes. Can remove them by eliminating those lines all together.
Once I reduce the logo to 960x200 pixels or less (standard width of letter doc is 960 pxls), there is a formatting problem in which patient name and encounter date appear to right of logo. Couldn’t fix it with extra “\n”
please i need help on this topic. I place the logo in openemr/custom
the logo is a .png and i named it letterhead.png also i edited the file as directed in the instruction above. Yet image is not showing in the printable version of patient report. Also,as i comment out line 465-468 in the custom_report.php, the address of the clinic that usually shows is no longer there yet the logo is not showing. Please What can be done?
looks good to me, what shows on the generated report? a broken link?
in the 4.1.3 code, custom_report has been upgraded to avoid placing in custom dir and instead uses the $OE_SITE_DIR variable, however, apache doesn’t have access to the /var/www that preceded the openemr root, so that has to be tweaked
@fsgl, i have done your suggestion but was not working. Though there is no link between it and the report letterhead melee. Whats the way forward sir.
@stephen, yea thats the situation, i even changed the location to "…/…/…/interface/pic/letterhead.png and then place the image in the directory, no result. So what do i do, you were not definitive in your response sir. Thanks
sounds like a permission problem but on windows that seems unlikely, you can place a few echo statements in your code to make sure the file path is accurate
What happened when you try to print the document from Report? Provide more details & if need be, screenshots.
In either case Stephen will have to help with the new script (“tweaking”) for your Windows 7 (?) machine.
If you are using 4.1.3; there is another option, Templates for Patient Documents, which does not involve coding because the template is generated from OpenOffice Writer.