org.openmrs.cohort
Interface CohortDefinitionProvider

All Known Implementing Classes:
PatientSearchCohortDefinitionProvider, StaticCohortDefinitionProvider

Deprecated. see reportingcompatibility module

@Deprecated
public interface CohortDefinitionProvider

This interfaces provides the functionality to evaluate a CohortDefinition (of a particular class) and return a Cohort It also handles persistence of CohortDefinition classes Historical note: it exists because in order to keep our application layers separate, we need to be able to call CohortService.evaluate(CohortDefinition, EvaluationContext) -> Cohort instead of CohortDefinition.evaluate(EvaluationContext) -> Cohort


Method Summary
 Cohort evaluate(CohortDefinition cohortDefinition, EvaluationContext evaluationContext)
          Deprecated. Computes the list of patients who currently meet the given definition CohortService ensures that this method is only called with a CohortDefinition of a class this provider is registered for.
 java.util.List<CohortDefinitionItemHolder> getAllCohortDefinitions()
          Deprecated.  
 java.lang.Class<? extends CohortDefinition> getClassHandled()
          Deprecated. TODO: this is potentially not necessary because its set via spring's application context
 CohortDefinition getCohortDefinition(java.lang.Integer id)
          Deprecated.  
 void purgeCohortDefinition(CohortDefinition cohortDefinition)
          Deprecated. Deletes a cohort definition from the database.
 CohortDefinition saveCohortDefinition(CohortDefinition cohortDefinition)
          Deprecated. Creates or updates a CohortDefinition in the database.
 

Method Detail

getClassHandled

java.lang.Class<? extends CohortDefinition> getClassHandled()
Deprecated. 
TODO: this is potentially not necessary because its set via spring's application context

Returns:
all the classes that this provider is capable of evaluating or persisting

getAllCohortDefinitions

java.util.List<CohortDefinitionItemHolder> getAllCohortDefinitions()
Deprecated. 
Returns:
All cohort definitions whose persistence is managed by this provider

getCohortDefinition

CohortDefinition getCohortDefinition(java.lang.Integer id)
Deprecated. 
Parameters:
id -
Returns:
the cohort definition with the given id, of the type whose persistence is managed by this class

saveCohortDefinition

CohortDefinition saveCohortDefinition(CohortDefinition cohortDefinition)
Deprecated. 
Creates or updates a CohortDefinition in the database. CohortService ensures that this method is only called with a CohortDefinition of a class this provider is registered for.

Parameters:
cohortDefinition -
Returns:
the CohortDefinition that was passed in

purgeCohortDefinition

void purgeCohortDefinition(CohortDefinition cohortDefinition)
Deprecated. 
Deletes a cohort definition from the database. CohortService ensures that this method is only called with a CohortDefinition of a class this provider is registered for.

Parameters:
cohortDefinition -

evaluate

Cohort evaluate(CohortDefinition cohortDefinition,
                EvaluationContext evaluationContext)
Deprecated. 
Computes the list of patients who currently meet the given definition CohortService ensures that this method is only called with a CohortDefinition of a class this provider is registered for. The Cohort that is returned will generally be populated with links back to the CohortDefinition and EvaluationContext passed into this method, although this is occasionally not the case, for example in StaticCohortDefinitionProvider

Parameters:
cohortDefinition - CohortDefinition to evaluate
evaluationContext - context to use during evaluation
Returns:
the cohort of all patients who meet the definition now

OpenMRS-1.7.x

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