Alternately your groovy script can evaluate a data set, and iterate over its patients.
You'd end up needing to do something like this, since you can't do "import" but otherwise it should work: def service = org.openmrs.api.context.Context.getService(org.openmrs.module.reporting.definition.service.DefinitionService) If you try that in the groovy module, and find it helpful, we could think about adding that sort of scripting to the reporting module natively. -Darius On Wed, Aug 3, 2011 at 11:18 PM, Christian Neumann <[email protected]> wrote: > Hi, > > I'm not sure if this is a good idea, but from time to time I need to adjust > things in our database. Things like adding automatic encounters, updating > program enrollment states, or shifting/migrating observations. > > I was wondering if there is an easy way to use the Groovy module together > with the Reporting module to 1) find the set of patients and 2) modify the > individual patient. This way I might be able to get rid of my collection of > SQL scripts, Java programs, and HTTP requests, reporting Dataset definitions > that I've used in the past. > > Having a custom Dataset definition for the reporting modules that takes a > Groovy script and executes this for every patient in the reporting cohort > shouldn't be that hard to implement. But only if this makes sense at all. > Does it? > > christian > _________________________________________ > > To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to > [email protected] with "SIGNOFF openmrs-devel-l" in the body > (not the subject) of your e-mail. > > [mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l] > _________________________________________ To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [email protected] with "SIGNOFF openmrs-devel-l" in the body (not the subject) of your e-mail. [mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

