Wiki Spaces
Documentation
Projects
Resources
Get Help from Others
Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack
The Reporting REST module lets you do reporting queries against your OpenMRS database, via REST web services. For example you can search for patients matching some criteria, or get a table of data for a given set of patients.
This module exposes the functionality in the Reporting Module, so you should look to that module's documentation for details of the available queries and dataset definitions.
5 Comments
Roger Friedman
This design was whipped together for the Pentaho test, it doesn't correspond to our current thinking on how REST should work. It should be made to conform with our main RESTWS module.
For persistent objects, such as cohort definitions and dataset definitions, the typical RESTWS calls should work. I don't know what is to be done about the fields which hold serialized objects. I know that Mike would like to make this more object-oriented, I don't know how far he's gotten.
For objects that are created by execution, I think there is some agreement that those should be done using PUT (because the operation isn't idempotent) The body of the PUT should include parameter values and perhaps some identifiers like a name and description. I think populated datasets should be a subresource of the dataset definition.
Supun Dharmarathne
In the test console, it gives an 404 error. What can be the solution ?
Roger Friedman
Regardless, we need to get "v1" (or "v1_0", I never can remember) in the URL in the right place like other REST calls.
Sashrika Waidyarathna
This page is very much outdated now....
A typical call should like http://localhost:8018/openmrs18/ws/rest/v1/reportingrest/dataSetDefinition
Darius Jazayeri
As of early 2017 the documentation has been updated on the linked github wiki page, and this page is now up to date.