org.openmrs.api
Interface ReportService

All Known Implementing Classes:
ReportServiceImpl

Deprecated. see reportingcompatibility module

@Transactional
@Deprecated
public interface ReportService

Contains methods pertaining to creating/updating/deleting/retiring/registering/evaluating ReportSchema, ReportSchemaXml, ReportRenderer, ReportXmlMacros, and other 'Report' objects.


Method Summary
 java.lang.String applyReportXmlMacros(java.lang.String input)
          Deprecated. Applies the report xml macros to the input, and returns it.
 void createReportSchemaXml(ReportSchemaXml reportSchemaXml)
          Deprecated. use saveReportSchemaXml(reportSchemaXml)
 void deleteReportSchema(ReportSchema reportSchema)
          Deprecated. Deletes a ReportSchema from the database.
 void deleteReportSchemaXml(ReportSchemaXml reportSchemaXml)
          Deprecated. Delete the given ReportSchemaXml class from the db
 ReportData evaluate(ReportSchema reportSchema, Cohort inputCohort, EvaluationContext context)
          Deprecated. This method evaluates a ReportSchema object for the given EvaluationContext and input Cohort.
 java.util.Map<java.lang.Class<? extends ReportRenderer>,ReportRenderer> getRenderers()
          Deprecated. Gets the renderers map registered to this report service
 java.util.List<RenderingMode> getRenderingModes(ReportSchema schema)
          Deprecated. Returns a List of RenderingModes that the passed ReportSchema supports, in their preferred order
 ReportRenderer getReportRenderer(java.lang.Class<? extends ReportRenderer> clazz)
          Deprecated. Returns the registered ReportRenderer whose class matches the passed class
 ReportRenderer getReportRenderer(java.lang.String className)
          Deprecated. Returns the registered ReportRenderer whose class matches the passed class name
 java.util.Collection<ReportRenderer> getReportRenderers()
          Deprecated. Returns a Collection of all registered ReportRenderers
 ReportSchema getReportSchema(java.lang.Integer reportSchemaId)
          Deprecated. Get the ReportSchema with the given id
 ReportSchema getReportSchema(ReportSchemaXml reportSchemaXml)
          Deprecated. Returns a ReportSchema object from a ReportSchemaXml definition De-serialized the xml definition, applies macro definitions, and returns an expanded report schema object
 java.util.List<ReportSchema> getReportSchemas()
          Deprecated. Return a list of ReportSchemas
 ReportSchemaXml getReportSchemaXml(java.lang.Integer reportSchemaXmlId)
          Deprecated. Get the xmlified ReportSchema object that was saved previously
 java.util.List<ReportSchemaXml> getReportSchemaXmls()
          Deprecated. Get all saved ReportSchemaXml objects in the db
 java.util.Properties getReportXmlMacros()
          Deprecated. Gets the macros that will be used when deserializing ReportSchemaXML
 void registerRenderer(java.lang.Class<? extends ReportRenderer> rendererClass, ReportRenderer renderer)
          Deprecated. Registers the given renderer with the service
 void registerRenderer(java.lang.String rendererClass)
          Deprecated. Convenience method for registerRenderer(Class, ReportRenderer)
 void removeRenderer(java.lang.Class<? extends ReportRenderer> rendererClass)
          Deprecated. Remove the renderer associated with rendererClass from the list of available renderers
 void saveReportSchema(ReportSchema reportSchema)
          Deprecated. Save or update the given ReportSchema in the database.
 void saveReportSchemaXml(ReportSchemaXml reportSchemaXml)
          Deprecated. Insert or update the given ReportSchemaXml object in the database.
 void saveReportXmlMacros(java.util.Properties macros)
          Deprecated. Saves the macros that will be used when deserializing ReportSchemaXML
 void setRenderers(java.util.Map<java.lang.Class<? extends ReportRenderer>,ReportRenderer> renderers)
          Deprecated. Add the given map to this service's renderers This map is set via spring, see the applicationContext-service.xml file
 void updateReportSchemaXml(ReportSchemaXml reportSchemaXml)
          Deprecated. use saveReportSchemaXml(reportSchemaXml)
 

Method Detail

evaluate

@Authorized(value="Run Reports")
ReportData evaluate(ReportSchema reportSchema,
                                    Cohort inputCohort,
                                    EvaluationContext context)
Deprecated. 
This method evaluates a ReportSchema object for the given EvaluationContext and input Cohort. It returns the ReportData object which contains the Report "results".

Parameters:
reportSchema - - The ReportSchema is the main report definition, and contains all indicator and required parameter definitions
inputCohort - - If not null, this will limit the Report evaluation to only those patients in this Cohort. If null, all patients are evaluated.
context - - The EvaluationContext which contains the parameters, provides caching for the report evaluation
Returns:
ReportData - Contains the evaluated report data
Throws:
APIException

getReportSchemas

@Transactional(readOnly=true)
java.util.List<ReportSchema> getReportSchemas()
                                              throws APIException
Deprecated. 
Return a list of ReportSchemas

Returns:
a List object containing all of the ReportSchemas
Throws:
APIException

getReportSchema

@Transactional(readOnly=true)
ReportSchema getReportSchema(java.lang.Integer reportSchemaId)
                             throws APIException
Deprecated. 
Get the ReportSchema with the given id

Parameters:
reportSchemaId - The Integer ReportSchema id
Returns:
the matching ReportSchema object
Throws:
APIException

getReportSchema

ReportSchema getReportSchema(ReportSchemaXml reportSchemaXml)
                             throws APIException
Deprecated. 
Returns a ReportSchema object from a ReportSchemaXml definition De-serialized the xml definition, applies macro definitions, and returns an expanded report schema object

Parameters:
reportSchemaXml - - the ReportSchemaXml to use to return a ReportSchema instance
Returns:
ReportSchema
Throws:
java.lang.Exception - if conversion fails
APIException

saveReportSchema

void saveReportSchema(ReportSchema reportSchema)
                      throws APIException
Deprecated. 
Save or update the given ReportSchema in the database. If this is a new ReportSchema, the returned ReportSchema will have a new ReportSchema.getReportSchemaId() inserted into it that was generated by the database

Parameters:
reportSchema - The ReportSchema to save or update
Throws:
APIException

deleteReportSchema

void deleteReportSchema(ReportSchema reportSchema)
Deprecated. 
Deletes a ReportSchema from the database.

Parameters:
reportSchema - The ReportSchema to remove from the system
Throws:
APIException

getReportRenderers

@Transactional(readOnly=true)
java.util.Collection<ReportRenderer> getReportRenderers()
Deprecated. 
Returns a Collection of all registered ReportRenderers

Returns:
All registered report renderers

getRenderingModes

@Transactional(readOnly=true)
java.util.List<RenderingMode> getRenderingModes(ReportSchema schema)
Deprecated. 
Returns a List of RenderingModes that the passed ReportSchema supports, in their preferred order

Returns:
all rendering modes for the given schema, in their preferred order

getReportRenderer

@Transactional(readOnly=true)
ReportRenderer getReportRenderer(java.lang.Class<? extends ReportRenderer> clazz)
Deprecated. 
Returns the registered ReportRenderer whose class matches the passed class

Parameters:
clazz - The ReportRenderer implementation class to retrieve
Returns:
- The ReportRenderer that has been registered that matches the passed class

getReportRenderer

@Transactional(readOnly=true)
ReportRenderer getReportRenderer(java.lang.String className)
Deprecated. 
Returns the registered ReportRenderer whose class matches the passed class name

Parameters:
className - The String name of the ReportRenderer implementation class to retrieve
Returns:
The ReportRenderer that has been registered that matches the passed class name

setRenderers

void setRenderers(java.util.Map<java.lang.Class<? extends ReportRenderer>,ReportRenderer> renderers)
                  throws APIException
Deprecated. 
Add the given map to this service's renderers This map is set via spring, see the applicationContext-service.xml file

Parameters:
renderers - Map of class to renderer object
Throws:
APIException

getRenderers

@Transactional(readOnly=true)
java.util.Map<java.lang.Class<? extends ReportRenderer>,ReportRenderer> getRenderers()
                                                                                     throws APIException
Deprecated. 
Gets the renderers map registered to this report service

Returns:
Map of registered org.openmrs.reports
Throws:
APIException

registerRenderer

void registerRenderer(java.lang.Class<? extends ReportRenderer> rendererClass,
                      ReportRenderer renderer)
                      throws APIException
Deprecated. 
Registers the given renderer with the service

Parameters:
rendererClass -
renderer -
Throws:
APIException

registerRenderer

void registerRenderer(java.lang.String rendererClass)
                      throws APIException
Deprecated. 
Convenience method for registerRenderer(Class, ReportRenderer)

Parameters:
rendererClass -
Throws:
APIException

removeRenderer

void removeRenderer(java.lang.Class<? extends ReportRenderer> rendererClass)
                    throws APIException
Deprecated. 
Remove the renderer associated with rendererClass from the list of available renderers

Parameters:
rendererClass -
Throws:
APIException

getReportSchemaXml

@Transactional(readOnly=true)
ReportSchemaXml getReportSchemaXml(java.lang.Integer reportSchemaXmlId)
Deprecated. 
Get the xmlified ReportSchema object that was saved previously

Returns:
ReportSchemaXml object that is associated with the given id

saveReportSchemaXml

void saveReportSchemaXml(ReportSchemaXml reportSchemaXml)
Deprecated. 
Insert or update the given ReportSchemaXml object in the database.

Parameters:
reportSchemaXml - xml to save
Since:
1.5

createReportSchemaXml

void createReportSchemaXml(ReportSchemaXml reportSchemaXml)
Deprecated. use saveReportSchemaXml(reportSchemaXml)

Create a new ReportSchemaXml object in the database.

Parameters:
reportSchemaXml - xml to save

updateReportSchemaXml

void updateReportSchemaXml(ReportSchemaXml reportSchemaXml)
Deprecated. use saveReportSchemaXml(reportSchemaXml)

Update the given ReportSchemaXml object in the database.

Parameters:
reportSchemaXml - xml to save

deleteReportSchemaXml

void deleteReportSchemaXml(ReportSchemaXml reportSchemaXml)
Deprecated. 
Delete the given ReportSchemaXml class from the db


getReportSchemaXmls

@Transactional(readOnly=true)
java.util.List<ReportSchemaXml> getReportSchemaXmls()
Deprecated. 
Get all saved ReportSchemaXml objects in the db

Returns:
List of ReportSchemaXml objects

getReportXmlMacros

@Transactional(readOnly=true)
java.util.Properties getReportXmlMacros()
Deprecated. 
Gets the macros that will be used when deserializing ReportSchemaXML

Returns:
macros

saveReportXmlMacros

void saveReportXmlMacros(java.util.Properties macros)
Deprecated. 
Saves the macros that will be used when deserializing ReportSchemaXML

Parameters:
macros - the macros to set

applyReportXmlMacros

java.lang.String applyReportXmlMacros(java.lang.String input)
Deprecated. 
Applies the report xml macros to the input, and returns it.

Parameters:
input - The text (presumably a report schema xml definition) that you want to apply macros to
Returns:
the result of applying macro substitutions to input

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change