org.openmrs.reporting
Class CachingPatientFilter

java.lang.Object
  extended by org.openmrs.reporting.AbstractReportObject
      extended by org.openmrs.reporting.AbstractPatientFilter
          extended by org.openmrs.reporting.CachingPatientFilter
All Implemented Interfaces:
PatientFilter, ReportObject
Direct Known Subclasses:
DrugOrderFilter, DrugOrderStopFilter, EncounterPatientFilter, LocationPatientFilter, ObsPatientFilter, PatientCharacteristicFilter, PersonAttributeFilter, ProgramStatePatientFilter

public abstract class CachingPatientFilter
extends AbstractPatientFilter
implements PatientFilter


Field Summary
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
CachingPatientFilter()
           
 
Method Summary
 Cohort filter(Cohort input, EvaluationContext context)
          Determine all patients in _input_ who also match some criteria.
abstract  Cohort filterImpl(EvaluationContext context)
          Subclasses should implement PatientFilter.filter("all patients", evalContext) in this method
 Cohort filterInverse(Cohort input, EvaluationContext context)
          Determine all patients in _input_ who do *not* match some criteria
abstract  java.lang.String getCacheKey()
           
abstract  boolean isReadyToRun()
           
 
Methods inherited from class org.openmrs.reporting.AbstractPatientFilter
getConceptName
 
Methods inherited from class org.openmrs.reporting.AbstractReportObject
equals, getDescription, getName, getReportObjectId, getSubType, getType, setDescription, setName, setReportObjectId, setSubType, setType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openmrs.reporting.ReportObject
getDescription, getName, getReportObjectId, setDescription, setName, setReportObjectId
 

Field Detail

log

protected final org.apache.commons.logging.Log log
Constructor Detail

CachingPatientFilter

public CachingPatientFilter()
Method Detail

filterImpl

public abstract Cohort filterImpl(EvaluationContext context)
Subclasses should implement PatientFilter.filter("all patients", evalContext) in this method

Parameters:
context -
Returns:

getCacheKey

public abstract java.lang.String getCacheKey()
Returns:
The key under which this object, with its current parameter values, will store results in a cache. Changing properties of this object will typically change the cache key returned.

filter

public Cohort filter(Cohort input,
                     EvaluationContext context)
Description copied from interface: PatientFilter
Determine all patients in _input_ who also match some criteria. If input is null, then this should return all patients who match.

Specified by:
filter in interface PatientFilter
Returns:

filterInverse

public Cohort filterInverse(Cohort input,
                            EvaluationContext context)
Description copied from interface: PatientFilter
Determine all patients in _input_ who do *not* match some criteria

Specified by:
filterInverse in interface PatientFilter
Returns:

isReadyToRun

public abstract boolean isReadyToRun()
Specified by:
isReadyToRun in interface PatientFilter
Returns:
Whether or not this filter has had enough parameters set to be run properly

OpenMRS-trunk

Generated May 29 2008 02:01 AM. NOTE - these libraries are in active development and subject to change