Patient Clinical Summary Enhancement-GSOC 2018

@dkayiwa @mwere @dkayiwa In my current work, I need to get the age of a patient to be printed in the html/text based output which is done using groovy scripting in reporting module . One option is to create a data definition for age by using the reporting module.

But I am currently unaware to access the so created age definition in groovy script.

Looking foreward for your valuable support :slight_smile:

Thanks a lot @sthaiya for showing me how it’s done . My weekly blog this week includes all the steps for anyone else to get to know how its done. Thank you all :slight_smile:

@dkayiwa I used the following command to add a module to watchlist in developing my module.

mvn openmrs-sdk:watch -DserverId=server1 

Is there anyway that I can remove this module from the watchlist ?

Did you take a look at this? https://wiki.openmrs.org/display/docs/OpenMRS+SDK+2.x#OpenMRSSDK2.x-Watchingmoduleforchanges

1 Like

@dkayiwa thank you very much

I am required to add the dependency of reporting module in muzima core module. I added dependencies to omod pom following this. I am getting the following error.

Failed to execute goal on project muzimacore-omod: Could not resolve dependencies for project org.openmrs.module:muzimacore-omod:jar:1.1.0: Failed to collect dependencies at org.openmrs.module:serialization.xstream-api:jar:0.2.6-SNAPSHOT: Failed to read artifact descriptor for org.openmrs.module:serialization.xstream-api:jar:0.2.6-SNAPSHOT: Could not transfer artifact org.openmrs.module:serialization.xstream-api:pom:0.2.6-SNAPSHOT from/to openmrs-repo-thirdparty (http://mavenrepo.openmrs.org/nexus/content/repositories/thirdparty): Failed to transfer file: http://mavenrepo.openmrs.org/nexus/content/repositories/thirdparty/org/openmrs/module/serialization.xstream-api/0.2.6-SNAPSHOT/serialization.xstream-api-0.2.6-SNAPSHOT.pom. Return code is: 409 , ReasonPhrase:Conflict. -> [Help 1]

Looking for someone’s help…

I am working on creating a scheduled task to generate reports for patients and store the generated reports in the database. But generation of reports is an asynchronous task and I need to wait untill the report is rendered.

            ReportRequest   rr = new ReportRequest();
            Map<String, Object> params = new LinkedHashMap<String, Object>();
            params.put("person",Context.getService(PersonService.class).getPerson(1));
            rr.setReportDefinition(new Mapped<ReportDefinition>(reportDefinition, params));
            rr.setRenderingMode(selectedRenderingMode);
            rr.setPriority(ReportRequest.Priority.NORMAL);
            
            rr = rs.queueReport(rr);
           //asynchronous task
            rs.processNextQueuedReports();
           //data returned  here is null
            byte[] data = rs.loadRenderedOutput(rr);

As I am calling loadRenderedOutput function before the report request is processed, the data becomes null. Please suggest a way to overcome this problem