Hi guys, In the interest of attracting others who might be interested, I've replied to the list to continue our conversation. Your comments below Darius make perfect sense and I think represent a feasible and constructive target. If Mike could work with me to speed up finding the best way to query the OpenMRS system for the functions you mention, I would be very grateful.
To give you all a primer on what is available on the Pentaho Reporting SDK side - There are two very small but key interfaces that we will need to implement to get a Pentaho report to consume a cohort/dataset combination: the DataFactory interface, which handles interacting with the source of the data, and the TableModel interface, which is the interface that the engine expects an implementation of after having queried the DataFactory for data. The DataFactory interface methods all account for parameterization; as such, as long as our DataFactory implementation processes the parameters that are handed to it, the engine (and the Report Designer tool) already recognize and allow parameter definition and pass them along to the engine that would process the query (which in our case is OpenMRS, which layer I'm not certain yet). Interestingly enough, for a spike or POC, we may not need to implement our own DataFactory, as the Report Designer already exposes a DataFactory that is a Java RMI DataFactory. Simply put, you can reference any Java method that returns a TableModel and use the DataFactory as is, which already has the UI bits in place in the Report Designer. This isn't an end product, but can quickly allow us to test feasibility of the feature set. There is another, newer DataFactory called the Sequence DataFactory that exposes similar functionality that I will look into. The Pentaho Reporting SDK also has some lower level DataFactories that we may want to consider extending. There is a HQL DataFactory and an SQL DataFactory. I mention these because I am not certain at what level or with what protocol I should be talking to OpenMRS. So that leads to my questions: Is there a service (http, REST, WSDL, other) that will allow me to retrieve the results of the functions that Darius lists below? If not, what is your recommended approach for communicating between a client tool and the OpenMRS system? HQL? Straight JDBC? A few hints (as Darius offered :) ) as to where to begin to interrogate the code would be greatly appreciated! Thanks so much for your time, Gretchen From: Darius Jazayeri [mailto:[email protected]] Sent: Tuesday, October 18, 2011 6:43 PM To: Gretchen Moran Cc: Michael Seaton Subject: Re: Welcome back! Update Okay, we can definitely have a brief framing discussion if that would help. My quick thought is that we want to expose some things from the reporting module. In the report tool you would pick 1. a cohort definition 2. a data set definition And in pentaho you'd then get a data set with (usually) the cohort definition as the rows and the data set definition as the columns. (For each of those choices you'd need to provide values for any parameters, and ideally also being able to link them to parameters in the pentaho report.) Mike can point you to the right Java snippets for all these if that would help... "list all cohort definitions" "get the parameters for one particular cohort definition" "list all data set definitions" "get the parameters for one particular dataset definition" "evaluate a cohort definition" "evaluate a dataset definition against a cohort" -Darius _________________________________________ 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]

