For writing web services in a module: https://wiki.openmrs.org/display/docs/Adding+a+Web+Service+Step+by+Step+Guide+for+Module+Developers
for conventions on web services: https://wiki.openmrs.org/display/docs/REST+Web+Services+API Main webservices.rest module homepage: https://wiki.openmrs.org/display/docs/Webservices.rest+Module Ben On Fri, Oct 21, 2011 at 3:35 PM, Gretchen Moran <[email protected]> wrote: > Darius,**** > > ** ** > > This is unfortunate. So, if my starting point is to expose these services, > is there some guidance Mike or you could give me on where to begin? Do you > have a pattern for REST services that you would like followed? I definitely > would like to discuss when you all slow down and have a chance to assist. In > the meantime, I’ll plug around the wiki and reporting code and see what I > see J **** > > ** ** > > Gretchen Moran > Enterprise Architect and Technical Account Manager > [image: Pentaho Corporation] <http://www.pentaho.com/> > *The Commercial Open Source Alternative for Business Intelligence* > 5950 Hazeltine National Drive, Suite 340 • Orlando, FL 32822, USA > +1 407 812-OPEN (6736) • 407 517-6206 • 321 848-8207 > Get your free download today at > http://www.pentaho.com<http://www.pentaho.com/download> > . **** > > ** ** > > *From:* Darius Jazayeri [mailto:[email protected]] > *Sent:* Wednesday, October 19, 2011 4:09 PM > *To:* Gretchen Moran > *Cc:* [email protected] > *Subject:* Re: Spiking on the Pentaho Report Designer OpenMRS datasource** > ** > > ** ** > > We don't yet have REST web services for this, but that seems like the way > to go.**** > > ** ** > > That could be added directly in the reporting module, allowing you to use > the pentaho designer with OpenMRS as long as you know the url/port.**** > > ** ** > > We would probably also want to create a small "reporting.pentaho" module > that would allow you to run those reports from within the OpenMRS UI.**** > > ** ** > > -Darius**** > > On Wed, Oct 19, 2011 at 10:56 AM, Gretchen Moran <[email protected]> > wrote:**** > > 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 J ) 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**** > > **** > > **** > > **** > > **** > > ** ** > ------------------------------ > Click here to > unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from > OpenMRS Developers' mailing list > _________________________________________ 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]
<<image001.gif>>

