Getting Started with OpenMRS Reporting Module
Table of contents
What is the OpenMRS Reporting Module?
The OpenMRS Reporting Module is a powerful, flexible framework that enables you to create, manage, and run reports within OpenMRS. It provides both a user-friendly web interface for building reports and a comprehensive API for developers to create custom reporting solutions.
Key Features
Flexible Report Building - Create reports using a web interface or programmatically
Multiple Output Formats - Export to Excel, CSV, HTML, PDF, and custom templates
Automated Scheduling - Run reports automatically and email results
Extensible Framework - Add custom report types and renderers
Performance Optimized - Handles large datasets efficiently
Understanding Report Types
The Reporting Module supports two main categories of reports:
📊 Row-Per-Domain Reports
These reports display data in a tabular format where each row represents an object (like a patient) and columns show different attributes.
Example: Patient List Report
Patient ID | Name | Age | Gender | Last Visit |
|---|---|---|---|---|
12345 | John Doe | 45 | M | 2024-01-15 |
12346 | Jane Smith | 32 | F | 2024-01-10 |
Common Use Cases:
Patient demographic reports
Encounter lists
Program enrollment summaries
Data exports for external analysis
📈 Indicator Reports
These reports aggregate data to answer specific questions with numerical results. Each row represents a question and the answer is typically a count, percentage, or other calculated value.
Example: Monthly Health Indicators
Indicator | Value | Details |
|---|---|---|
New TB patients this month | 25 | [View patient list] |
TB treatment completion rate | 85% | [View details] |
Patients on ART | 450 | [View patient list] |
Common Use Cases:
Monthly/quarterly health indicator reports
Program performance monitoring
Government reporting requirements
Quality improvement metrics
Installation & Setup
System Requirements
OpenMRS Platform: Version 1.5.2 or higher
Java: Version 8 or higher
Database: MySQL 5.6+ (recommended)
Required Modules
Before installing the Reporting Module, ensure these dependencies are installed:
HTML Widgets Module (version 1.5.5+)
Provides user interface components for parameters
Serialization XStream Module (version 0.1.8.1+)
Handles data serialization for reports
Installation Steps
Download the Module
Visit the OpenMRS Module Repository
Download the latest
.omodfile
Install Dependencies
Install HTML Widgets and Serialization XStream modules first
Restart OpenMRS after each installation
Install Reporting Module
Navigate to Administration → Manage Modules
Click "Add or Upgrade Module"
Browse and select the reporting
.omodfileClick "Upload"
Verify Installation
Look for "Reporting" in the main navigation menu
Check that no error messages appear in the server logs
Recommended Additional Modules
Reporting Compatibility Module (version 1.5.0.3+)
Provides backward compatibility with older reporting tools
Useful if migrating from Data Export or Cohort Builder
User Permissions & Security
Required Privileges
To use the Reporting Module effectively, users need appropriate privileges:
For Running Reports (End Users)
View Reports- See available reportsRun Reports- Execute reportsView Patient Cohorts- View patient lists in results
For Building Reports (Implementers)
All end user privileges, plus:
Manage Reports- Access report building interfaceManage Report Definitions- Create and edit reportsManage Data Set Definitions- Build data setsManage Cohort Definitions- Create patient groupsManage Indicator Definitions- Build indicatorsManage Dimension Definitions- Create filtersManage Report Designs- Configure output formats
For System Administration
View Administration Functions- Access admin toolsManage Scheduled Report Tasks- Set up automated reports
Setting Up User Roles
Navigate to Administration → Users
Create or edit user roles
Assign appropriate privileges based on user needs
Test access with different user accounts
Basic Terminology
Understanding these key concepts will help you work effectively with the Reporting Module:
Core Components
Report Definition 📋
The top-level container for your report
Contains one or more Data Set Definitions
Defines parameters and filters that apply to the entire report
Data Set Definition 📊
Defines what data will be included in your report
Can directly contain data (like patient demographics) or reference other components (like indicators)
Cohort Query 👥
Defines a group of patients who meet specific criteria
Examples: "Patients on ART", "Pediatric patients", "Patients in TB program"
Building blocks for indicators and filters
Indicator 📈
Performs calculations on cohorts (count, percentage, average, etc.)
Answers questions like "How many patients..." or "What percentage of..."
Dimension 🔍
Filters that break down indicators by categories
Examples: Age groups, gender, location
Allows one indicator to be split multiple ways
Parameter Types
Parameters ⚙️
Values entered when running the report
Examples: date ranges, locations, programs
Allow reports to be reused with different inputs
Fixed Values 🔒
Values built into the report definition
Cannot be changed when running the report
Used for report-specific settings
Expressions 🧮
Dynamic values calculated relative to parameters
Examples: "endDate-1m" (one month before end date)
Useful for relative date calculations
Quick Start: Your First Report
Let's create a simple patient list report to get you started:
Step 1: Access the Reporting Interface
Log into OpenMRS
Click "Reporting" in the main menu
Select "Report Administration" from the toolbar
Step 2: Choose Report Type
Click "Custom Report (Advanced)"
Enter a name: "My First Patient Report"
Add a description
Click "Submit"
Step 3: Create a Data Set
Go to the “Data Set Definitions ” page.
Click the "+" next to "Simple Patient Dataset"
Provide a name ex: “Patient Demographics Data Set”
Under “Person/Patient Properties”, select “Fixed Value”
Add patient properties like:
patientId- Patient identifiergivenName- First namefamilyName- Last namegender- Genderbirthdate- Birth date
Click "Save"
Step 3: Add a Data Set
Go back to the “Report Administration” page and click the edit icon in front of the created report.
Click the "[+] New Dataset Definition" next to "Data Set Definitions"
Enter a key: "patients"
Choose the previously created dataset definition from the dropdown
Click "Submit"
Step 5: Run Your Report
Go to "Report Administration"
Click the Run icon next to your report
Click "Request Report"
On the next screen, click “View Report”
Congratulations! You've created your first OpenMRS report. 🎉
What's Next?
Now that you have the basics down, explore these areas:
For End Users
Running Reports Guide - Learn all output options and features
Report Analysis Tools - Explore report history and trends
For Report Builders
Report Builders Guide - Detailed tutorials
Getting Help
Documentation
User Guides - Step-by-step instructions for common tasks
Examples Library - Real-world report templates
Community Support
OpenMRS Talk - Community forum for questions and discussions
Slack - Real-time chat with the community
Reporting Issues
Ready to build your first real report? Choose your path:
👤 End User: Learn to run existing reports
🏗️ Report Builder: Start building reports
Existing Videos:
OpenMRS University: Reporting Module (2013) https://www.youtube.com/watch?v=M57eW3begCg&ab_channel=OpenMRS
DHIS2
OpenMRS DHIS2 Connector Module demo (2022) https://www.youtube.com/watch?v=QUP4MGytpIA&ab_channel=OpenMRS
OpenMRS to DHIS reporting (2018) https://www.youtube.com/watch?v=yiVAgAxMhXQ&ab_channel=kaweesijoseph
Automated reporting from OpenMRS Into DHIS2 Made easy (2018) https://www.youtube.com/watch?v=NpbjqX2z89E&ab_channel=kaweesijoseph
Case Based Reporting Simulation from OpenMRS to OpenHIE and DHIS2 (2019) https://www.youtube.com/watch?v=sLhG1QX5qZM&ab_channel=BurkeMamlin
DHIS2: GSoC 2021: Export and Import feature for the openMRS reporting module (2022) https://www.youtube.com/watch?v=_dam0QHM5aA&ab_channel=HeshanAndrews
Lightning Talk #OMRS24: Automated Indicator Reporting - Ibrahim Rajab & Frida Oyucho, Palladium https://www.youtube.com/watch?v=q6GLeU6tOg4&ab_channel=OpenMRS