Header and footer

banaitvs wrote on Wednesday, June 19, 2013:

Hi
how can I define header and footer for patient report which are generated from report menu and by selecting the soap to be included and also for prescription. Also when I select multiple encounters in report, they are printed in reverse order- newest first. I would like it to be oldest first -can I achieve this?
Vaibhav

fsgl wrote on Wednesday, June 19, 2013:

If you have a paid version of the .pdf reader, adding header/footer is an included utility. If it is free, another application is necessary.

Order of printing can be controlled from your printer.

tmccormi wrote on Wednesday, June 19, 2013:

There is simple CSS code for this, but it only works in FireFox reliably last I checked.

Looks kind of like this … from a version of custom_report.php we created

<style>
@media print
{
	.header {
        width: 100%;
        height: 20px;
    }
    
    .header:before {
    	content: "<?php echo $titleres['lname'].', '.$titleres['fname'] . ' ' . $titleres['mname'] . ' DOB:'.$titleres['DOB_TS'].' ID:'.$titleres['pubpid'].' FACILITY:'.$facility['name']; ?>";
    }
    
    .page-break {
		page-break-before: always;
	}

    .footer {
		position: fixed;
        width: 100%;
        bottom: 0;
    }
    
    .footer:before {
    	content: "Electronically signed by <?php echo $provider_fname.' '.$provider_lname.', '.$provider_title.' '.$provider_npi.' on '.$bill_date; ?>";	
    }
    
}

@page {
    @bottom-right {
		content: "Page " counter(page) " of " counter(pages);
    }
}

.section {
    	margin-top: 40px;
    }

</style>

visolveemr wrote on Friday, June 21, 2013:

Hai,
openemr uses html2pdf plugin to convert to pdf and thus the header and footer can be defined using the <page_header> </page_header> and <page_footer> </page_footer> tags.
So, for adding the header and footer for the patient’s report printed from the reports tab of demographics screen, we need to change the “getContent” function in the file:
interface/patient_file/report/custom_report.php

were you can define the header and footer tags.

Hope This Helps.

Thanks
ViSolve
services@visolve.com