Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added JSON UI configuration details

What this module does

This module provides a user interface for the Reporting Module in the Reference Application 2.x user interface.

Documentation / How-To

Info

In its current state, you must You may write your own module code to use this module – it does not allow you to configure things through the administrative module, or configure it with JSON in the Administrative UI.

Reports App

This module provides a Reports app on the home screen.

...

The generic Run Reports page looks like:

Run Reports page for a report definition in the database

Configure the Module

Without configuration, this module only shows an empty page. For it to be useful, we must define a list of reports to show under each section.  This can be done with a custom module or with JSON.  To configure it with JSON you can...

1.) Navigate to System Administration --> Manage Apps in the Administration UI.

2.) Disable the reportingui.reports, by clicking the "Stop" button next to the default Reporting App. If you don't stop the built-in app, you will see two Report icons after you create your custom one.

3.) Create your new Reporting App Definition.  Click Add App Definition.

4.) Give it a name like "my.reportingui.reports".

5.) Copy the contents from the Default JSON Config, and paste it into the Definition (required) field on the Add App Definition you created in step 3 above.

6.) Edit the code you copied in and add additional JSON objects under "extensions". Specifically, you'd copy the thing that's currently attached to dataExports (see https://github.com/openmrs/openmrs-module-reportingui/blob/master/omod/src/main/resources/apps/reports_app.json#L361 ) and:

 

  • Set your own id
  • Set your own label
  • Set your own requiredPrivilege
  • Set your own URL (the URL should be "reportingui/runReport.page?reportDefinition={uuid}", but replace {uuid} with the actual uuid of the report that you want linked.
  • Remove the "featureToggle" property

Note: A fully configured JSON may look like this example.

7.) Save your App.

8.) Go to the Reference Application Home Page, and click on Reports.  You should see the report you configured, and clicking on it will allow you to specify the parameters to run it.

About

This module was originally developed by PIH as part of its Mirebalais implementation.