Reporting- Generate a patient report capture in encounters

I would like to generate reports of observation of individual patient which captured in different encounters with patient personal information (first name,last name,gender etc). I seen reporting module.Reporting module mostly used for cohort records. I come up with the following approaches .Let me know which approach is best also share your approaches.

Approach 1: Using X-reports : X-reports is community module which is using reporting module for populating data in reports and provide feature to render report in pdf format. This module also provide report designer tool for designing the reports like other reports template tools.


  • Fast and easy implementation for textual data
  • Configuration over implementation shall be followed.
  • Uses reporting module internally which help us maintaining different type of datasets and queries.
  • Report designer tool is available.


  • Not so much ui enrich like Apache fop and jaspers report.

Approach 2: Using a Preview page: In this approach after the link is clicked by the user from the current visit actions, s(he) is redirected to a custom page that has the details of the patient in the manner depicted in the documen. On this Preview page, there shall be a button to print/download the report in the PDF format.


  • Uses a Preview page that could be easily developed using the gsp technology in OpenMRS .
  • Css and javascript could be used to print and save the content of the current page


  • Requires one more click per request, i.e. to go to the interim page and then click on download

  • External javascript /jquery library will be used for converting page into pdf.

Approach 3: Apache fop: This is report template rendering tool which read XML-fo file and render output pdf, psetc. Apache fop tag syntax is very similar to html and css.


  • UI enrich (support html and css similar syntax.
  • Easy tag syntax.
  • Number of output format support (pdf, png, etc.)
  • Internal implementation based on reporting module of OpenMRS


  • Need to create a module which generate reports using Apache fop.
  • No report designer tools available like jaspers report studio ,Xreports designer tool etc.

@sameermotwani11 @lilian @mksd @mseaton

Are you trying to include a summary report of prior observation in a current encounter? Or simply generating a report of prior encounters for printing/export? There has been quite a lot of work on the latter, but not on the former.

We are trying generate a report of prior encounters and export generated reports in pdf format

I think you want the reporting module. would point you to some discussions. @mseaton can probably point you to the best place.

@akanter thanks