Custom reports

darronhalliday wrote on Wednesday, October 28, 2015:

Hi Team

Congrats on the OPENEMR project.

I have been trying to modify the custom reports so that the patient’s name ID and date of birth is on every printed page.

I have looked at the links

and
http://sourceforge.net/p/openemr/discussion/202505/thread/893ce645/

Unfortunately, I am still lost.

I tried the script from line 455

Patient Report.
	<?php 
	echo 'Name' .$titleres['lname'].', '.$titleres['fname'].' ID:'.$titleres['pubpid'].'DOB:'.$titleres['DOB_TS']
	?>;
			
	</title>
		
</head>

The output in the webpage tile looks like
“Patient Report. Name ID: DOB: “

There are no patient details inserted. I believe the script in not connecting to the database.

I have also tried the script below the output title reads ““Patient Report, Array: “ Please advise.

	Patient Report:
	<?php
	echo getPatientData($pid, "fname,lname,providerID,DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS");
	?>
	</title>

</head>

Thanks for your replies.

tmccormi wrote on Wednesday, October 28, 2015:

Sadly I have tried everything I know how to make this work reliably and it does not. The browser implementations of header and footer are not up to HTML5 or CSS specs.

Short of rewriting it to create native PDF or somehow post processing the HTML to PDF converted results this cannot be done (at least not by me) :slight_smile:

–Tony

fsgl wrote on Wednesday, October 28, 2015:

Header can be added with PDFill Tool in Windows; or try Print Edit, a Firefox add-on, in Linux.

darronhalliday wrote on Saturday, October 31, 2015:

Hi

Thanks very much. I played around with the file custom_report.php from about line 455. Using the code below I was able to generate patient demographics in the browser title. See attachment. (Firefox print preview). I cannot get the rid of the “Array” term. Any Advice?

Patient Report: <?php echo $titleres = getPatientData($pid,"fname,mname,lname,pubpid,DOB,DATE_FORMAT(DOB,'%Y%m%d') as DOB_YMD");?> <?php echo 'Name: ' .$titleres['fname'].' '.$titleres['mname'] . ' ' . $titleres['lname'] . '; DOB: '.$titleres['DOB'].'; ID: '.$titleres['pubpid']; ?>

darronhalliday wrote on Saturday, October 31, 2015:

Code attached

darronhalliday wrote on Saturday, October 31, 2015:

Hi

Thanks very much. I played around with the file custom_report.php from about line 455. Using the code below I was able to generate patient demographics in the browser title. See attachment. (Firefox print preview). I cannot get the rid of the “Array” term. Any Advice?

darronhalliday wrote on Saturday, October 31, 2015:

See post. Let me know that you think

mdsupport wrote on Saturday, October 31, 2015:

Remove ‘echo’ from the assignment statement. So your code should look like:

<? php
  $titleres = xyz....();
  echo ....;
?>

darronhalliday wrote on Saturday, October 31, 2015:

Thanks a million. Removal of the first echo like you suggested worked. Thanks again.

van2010 wrote on Tuesday, March 29, 2016:

Is there a way to remove a few blank lines on the top of the page above the “Your Clinic Name”?