Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS »
Discussion: OpenMRS Talk »
Real-Time: IRC Chat

Documentation

Skip to end of metadata
Go to start of metadata

There are been various approaches to creating Patient Summaries (Patient Summary Module) or Clinical Summaries (Clinical Summary Module) in the past. Unfortunately, these modules are not compatible with the latest versions of OpenMRS but the need to create patient-centric summary reports still exists. As a workaround, you can create a patient summary using the Reporting Module.

Creating the Patient Clinical Summary

  1. Build a Data Set Definition (or multiple data sets) to contain all of the data for the fields you want to include on your patient summary. You should specify a parameter to pass the person into the Data Set. For example, you could create an SQL Data Set backed by an SQL query. This example SQL uses the CIEL Concept Dictionary concept ID's.

    SQL Data Set Definition Example - Clinical Summary  Expand source
    SQL Data Set Definition Example - ID Card  Expand source
  2. Create a Custom Report (Advanced) which calls the Data Set (or data sets) you created in step 1. This will also need to have a parameter of type 'person'. The person parameter in the report should be mapped to the person parameter in the data set. For example...

  3. Create an 'HTML/Text-based Template' type of Report Renderer (sometimes referred to as an Output Design Template or a Report Design). From the report, click the down arrow under the Output Designs section. Choose 'HTML/Text-based Template and click Add Another. Enter a name and description.  Then write some HTML to format your report. The Report Definition and Script Type can remain unchanged. In your definition, variables can be labeled with pound sign before and after like #patient_name#.

    A sample HTML definition which works with the SQL example above would be like...

    Report Template Definition  Expand source

Running the Patient Summary

It would be ideal to be able to click to run the report directly from the patient dashboard. That functionality is requested at  RA-381 - Implementation-defined patient reports should be available through the RA user interface In Backlog . Until then, you can run the summary report through the Legacy UI. You can automatically redirect to the Legacy UI report screen when you submit a form (for example a discharge form), or you can create an empty app on the main dashboard.  The URL of the report should include something like 'eportId=76cfc87a-9e88-4d39-acc7-ed68d4beb1f7' where the reportId specifies the UUID of the report you created.  The jason configuration for an app to run a report would look something like this...

json Configuration of App  Expand source

The interface to run the report looks like this. Choose the patient (by name or identifier), and select the "Output To:" to reflect the HTML/Text renderer you created. Then click Request Report.

Note: The user will need to open the generated report of extension 'null' in their web browser.

If you are running Reporting 0.11, because of the work in REPORT-782 - Enable the passing of parameters via the URL when running a report Closed , you can specify the person ID in the URL and call the report from an HTML form. For example, you print the Patient Discharge Summary after the discharge form is successfully submitted. In HTML Form Entry, use the <redirectOnSave> tag and specify the report parameters. For the example above the following works...

HTML Form Redirect Example

Of course, you need to change the UUID's of the reportDefinition and TextTemplateRenderer to match the report that you want run.

Notice that the parameters are separated with an ampersand (&) when passing parameters into a report. In the case of HTML Form Entry, the &amp; code should be used instead.

See more info at How to run a Reporting Module report through a URL.

The final report example using the SQL and HTML template above would look like ICU_Discharge_Sum.pdf that was printed to PDF from the web browser.

Related Resources