The initial intent of the Groovy module was to provide a service for script evaluation. As it turns out, the module provides a nice script editor & the ability to persist scripts and it does (obviously) have code to evaluate the scripts, but it's not a service.
Since creating the Groovy module, we've discovered JSR 223 (Scripting for the Java Platform) and realized that a more powerful approach would be to create a more generic scripting module that implemented JSR 223 in a service and focused on a robust mechanism for running scripts (e.g., monitoring running scripts, output that is not tied to a browser session, a mechanism to avoid/abort long-running or runaway scripts, etc.). Given this, I'm not sure making reporting dependent on the Groovy module would be a good step. I'm not sure to what extent the "optional" dependencies between modules has been done. As Darius has suggested, using groovy scripts to evaluate a data set may be the easiest immediate solution. A simple 1.0 scripting module that creates a ScriptingService with a single ScriptResult eval(String script) method (that binds services, auto-detects the script type, and evaluates using JSR 223 instead of a specific language) could be a next step that wouldn't take gigantic effort (robust management of running scripts could come later). -Burke On Thu, Aug 4, 2011 at 2:18 AM, 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]

