Setting up the reportingrest and reporting modules

Hello guys, I need to setup the reporting and reportingrest modules for the Cohort builder GSoC project. But having some troubles. First I tried to work with the demo server where all the modules are installed. Which is also throwing an error which is mentioned here.

Then I tried to set it up on my local machine using the OpenMRS SDK. I tried a couple of versions but everyone of them gave different errors in either installing the modules or starting the server.

I tried the docker image as well. Seems like it doesn’t work with the M1 macs.

Currently openmrs distro 2 even that gives me this error pastebin.

.

It shows the modules in the manage modules but the server doesn’t start the reporting and reportingrest modules.

All I want to do is to call this API http://localhost:8080/openmrs/ws/rest/v1/reportingrest/adhocquery?v=full to get the patient list. This is a huge blocker I’m having. If I can use the demo server for this it will be lot easier so that I don’t want to run the backend server.

CC: @jayasanka @bistenes @dkayiwa @ibacher

@mseaton might be able to help here.

1 Like

The error in your screenshot suggests that you not using the latest version of the reporting module. Run the SDK again and set up the latest version of the reference application.

you mean the ref app 3.0 right? It gives me an error when I choose 1 or 2 option that’s why I went with the 2.0

Choose 2.12.2

Thank you! @dkayiwa Now I’m getting the same error that I’m getting from the demo server as when sending this request. Pastebin

curl 'http://localhost:8080/openmrs/ws/rest/v1/reportingrest/adhocquery?v=full' \
  -H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="102", "Google Chrome";v="102"' \
  -H 'Accept: application/json' \
  -H 'Referer: http://localhost:8080/openmrs/spa/cohort-builder' \
  -H 'Content-Type: application/json' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --data-raw '{"type":"org.openmrs.module.reporting.dataset.definition.PatientDataSetDefinition","columns":[{"name":"firstname","key":"reporting.library.patientDataDefinition.builtIn.preferredName.givenName","type":"org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition"},{"name":"lastname","key":"reporting.library.patientDataDefinition.builtIn.preferredName.familyName","type":"org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition"},{"name":"gender","key":"reporting.library.patientDataDefinition.builtIn.gender","type":"org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition"},{"name":"age","key":"reporting.library.patientDataDefinition.builtIn.ageOnDate.fullYears","type":"org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition"},{"name":"patientId","key":"reporting.library.patientDataDefinition.builtIn.patientId","type":"org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition"}],"rowFilters":[{"key":"reporting.library.cohortDefinition.builtIn.codedObsSearchAdvanced","parameterValues":{"timeModifier":"ANY","operator1":"LESS_THAN"},"type":"org.openmrs.module.reporting.dataset.definition.PatientDataSetDefinition"}],"customRowFilterCombination":"1"}' \
  --compressed

Use the latest version of the reportingrest module: OpenMRS Add Ons

I installed the latest reportingrest module then it gaves me a NullPointerException. Then I tried to insall the latest webservices.rest which failed after like 50mins with a java.lang.OutOfMemoryError: GC overhead limit exceeded error. I tried this whole thing three times.

Just restart tomcat.

I’m using the SDK

I was able to set it up without using the SDK. I used the Tomcat server. Sorry for bothering @dkayiwa Thank you for your help!