Building Reports (Step By Step Guide)
- 1 Building Reports Inside OpenMRS (For Implementers)
- 1.1 Building Row-Per-Domain Reports
- 1.2 Building Indicator Reports
- 1.2.1 Period Indicator Report Step-By-Step
- 1.2.1.1 Step 1. Build Cohorts
- 1.2.1.2 Step 2. Build Indicators
- 1.2.1.3 Step 3. Build Dimension
- 1.2.1.4 Step 4. Create Report
- 1.2.2 Custom Cohort Indicator Report Step-By-Step
- 1.2.2.1 Step 1. Build Cohorts
- 1.2.2.2 Step 2. Build Indicators
- 1.2.2.3 Step 3. Build Data Set Definitions
- 1.2.2.4 Step 4. Build Custom Indicator Report
- 1.2.1 Period Indicator Report Step-By-Step
- 1.3 Screen Casts Step-By-Step
- 2 Additional tips
Building Reports Inside OpenMRS (For Implementers)
You can create three different types of reports: a Period Indicator Report, a Row-Per-Patient Report, or a Custom Report (Advanced).
All reports contain a Report Definition which is linked to one or more Data Set Definitions. In the first two options, the link between the Report Definition and the appropriate Data Set Definition is set automatically. However, to create a Custom Report (Advanced), you must manually link the Report Definition and Data Set Definition. For more information, see Types of Reports.
The two tutorials that follow demonstrate how to build a Period Indicator Report and a Simple Row-Per-Patient Report. The first example shows a report where the link between the Report and Data Set Definitions is automatic, whereas the second shows a manual setting of the link.
Building Row-Per-Domain Reports
Building a Simple Row-Per-Patient Step-By-Step
This step-by-step tutorial will guide the user in the creation of a Simple Row-Per-Patient Report (See Row-Per-Domain Object Report Definition for details). It will also show how to create the Data Set Definition for the Report Definition.
This Simple Row-Per-Patient Report will output a list of patients from Boston and output their birthdate and gender.
Step 1. Build Data Set Definition
Step 2. Build Report
Step 3. Add Data Set to Report
Step 1. Build Data Set Definition
1 | Click 'Administration' from the main toolbar. | |
2 | Under 'Manage Report Definitions', click 'Data Set Definitions'. | |
3 | Click the plus sign next to Simple Patient Data Set to add a new Simple Row Per Patient Data Set. | |
4 | Basics: Under 'Name', input the title of your Data Set, so that you can find it later. You can type a more detailed description under 'Description.' | |
5 | Properties: There are four different categories of patient properties you can display in your report: person/patient properties, person attribute types, identifier types, and program workflow states. Under each, you can input Fixed Value properties, or parameters, which will allow the data set to be reused. For example, if you input one column as a parameter, you can pass in at runtime what you want this column to contain under the appropriate category. |
You are now ready to build the Report Definition.
Step 2. Build Report Definition
1 | Click 'Report Definitions' from the toolbar above. | |
2 | Click 'Custom Report (Advanced)'. | |
3 | Enter the name of your report under 'Name.' You can enter a more detailed description in the 'Description' textbox. Then click 'Submit.' |
You are now ready to add the Data Set you created in Step 1 to your new Report Definition.
Step 3. Add Data Set Definition to Report Definition
1 | In the Report Editor, click the plus sign under Data Set Definitions to add a new data set . | |
2 | In the 'Key', enter an appropriate label for your Data Set. A label will appear as , for example, the sheet name for your report in an Excel file. Here, we enter 'RPP DataSet Key'. Under 'Data Set Definition,' select the name of the data set you created in Step 1 (Simple Row Per Patient Data Set). Then click submit. | |
3 | In this stage, you may add parameters to the Report, such as Start Date, EndDate, and Location. Our report will list patients from a specific location, which we want to be able to change every time the program is run. We add a parameter 'Location' to enable this. Click the plus sign next to 'Add' under Parameters. Under 'New Parameter', because it is a single value, choose 'Single' under type, and choose 'Location' from the adjacent drop-down. Type a name under Name and an appropriate label, which will be displayed when the report is run, for your new parameter. Then click submit. | |
| Your Simple Row-Per-Patient report is now complete. See Running Reports for information on how to run it. Following these steps, your report should look like the example to the right. |
Building Indicator Reports
Period Indicator Report Step-By-Step
This step-by-step tutorial will guide the user in making indicator reports, using a period indicator report as an example.
See Indicator Report Definition for details.
Create a report that only includes patients in the Heart Failure Program. The first question will be:
* Percentage of men whose main job is farming
Step 1. Build Cohorts
Step 2. Build Indicators
Step 3. Build Dimension