|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.api.impl.BaseOpenmrsService org.openmrs.api.impl.CohortServiceImpl
public class CohortServiceImpl
API functions related to Cohorts
Constructor Summary | |
---|---|
CohortServiceImpl()
|
Method Summary | |
---|---|
Cohort |
addPatientToCohort(Cohort cohort,
Patient patient)
Adds a new patient to a Cohort. |
Cohort |
createCohort(Cohort cohort)
Deprecated. |
Cohort |
evaluate(CohortDefinition definition,
EvaluationContext evalContext)
Deprecated. see reportingcompatibility module |
java.util.List<CohortDefinitionItemHolder> |
getAllCohortDefinitions()
Deprecated. see reportingcompatibility module |
java.util.List<Cohort> |
getAllCohorts()
Gets all Cohorts (not including voided ones) |
java.util.List<Cohort> |
getAllCohorts(boolean includeVoided)
Gets all Cohorts, possibly including the voided ones |
CohortDefinition |
getAllPatientsCohortDefinition()
Deprecated. see reportingcompatibility module |
Cohort |
getCohort(java.lang.Integer id)
Gets a Cohort by its database primary key |
Cohort |
getCohort(java.lang.String name)
Gets a non voided Cohort by its name |
Cohort |
getCohortByUuid(java.lang.String uuid)
Get Cohort by its UUID |
CohortDefinition |
getCohortDefinition(java.lang.Class<CohortDefinition> clazz,
java.lang.Integer id)
Deprecated. see reportingcompatibility module |
CohortDefinition |
getCohortDefinition(java.lang.String key)
Deprecated. see reportingcompatibility module |
java.util.Map<java.lang.Class<? extends CohortDefinition>,CohortDefinitionProvider> |
getCohortDefinitionProviders()
Deprecated. see reportingcompatibility module |
java.util.List<CohortDefinitionItemHolder> |
getCohortDefinitions(java.lang.Class providerClass)
Deprecated. see reportingcompatibility module |
java.util.List<Cohort> |
getCohorts()
Deprecated. |
java.util.List<Cohort> |
getCohorts(java.lang.String nameFragment)
Returns Cohorts whose names match the given string. |
java.util.List<Cohort> |
getCohortsContainingPatient(Patient patient)
Find all Cohorts that contain the given patient. |
java.util.List<Cohort> |
getCohortsContainingPatientId(java.lang.Integer patientId)
Find all Cohorts that contain the given patientId. |
void |
onShutdown()
Clean up after this class. |
Cohort |
purgeCohort(Cohort cohort)
Completely removes a Cohort from the database (not reversible) |
void |
purgeCohortDefinition(CohortDefinition definition)
Deprecated. see reportingcompatibility module |
void |
registerCohortDefinitionProvider(java.lang.Class<? extends CohortDefinition> defClass,
CohortDefinitionProvider cohortDefProvider)
Deprecated. see reportingcompatibility module |
void |
removeCohortDefinitionProvider(java.lang.Class<? extends CohortDefinitionProvider> providerClass)
Deprecated. see reportingcompatibility module |
Cohort |
removePatientFromCohort(Cohort cohort,
Patient patient)
Removes a patient from a Cohort. |
Cohort |
saveCohort(Cohort cohort)
Save a cohort to the database (create if new, or update if changed) This method will throw an exception if any patientIds in the Cohort don't exist. |
CohortDefinition |
saveCohortDefinition(CohortDefinition definition)
Deprecated. see reportingcompatibility module |
void |
setCohortDAO(CohortDAO dao)
Sets the CohortDAO for this service to use |
void |
setCohortDefinitionProviders(java.util.Map<java.lang.Class<? extends CohortDefinition>,CohortDefinitionProvider> providerClassMap)
Deprecated. see reportingcompatibility module |
Cohort |
updateCohort(Cohort cohort)
Deprecated. |
Cohort |
voidCohort(Cohort cohort,
java.lang.String reason)
Voids the given cohort, deleting it from the perspective of the typical end user. |
Methods inherited from class org.openmrs.api.impl.BaseOpenmrsService |
---|
onStartup |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.openmrs.api.OpenmrsService |
---|
onStartup |
Constructor Detail |
---|
public CohortServiceImpl()
Method Detail |
---|
public void setCohortDAO(CohortDAO dao)
CohortService
setCohortDAO
in interface CohortService
CohortService.setCohortDAO(org.openmrs.api.db.CohortDAO)
public void onShutdown()
onShutdown
in interface OpenmrsService
onShutdown
in class BaseOpenmrsService
BaseOpenmrsService.onShutdown()
public Cohort saveCohort(Cohort cohort) throws APIException
CohortService
saveCohort
in interface CohortService
cohort
- the cohort to be saved to the database
APIException
CohortService.saveCohort(org.openmrs.Cohort)
public Cohort createCohort(Cohort cohort)
createCohort
in interface CohortService
CohortService.createCohort(org.openmrs.Cohort)
public Cohort getCohort(java.lang.Integer id)
CohortService
getCohort
in interface CohortService
CohortService.getCohort(java.lang.Integer)
public java.util.List<Cohort> getCohorts()
getCohorts
in interface CohortService
CohortService.getCohorts()
public Cohort voidCohort(Cohort cohort, java.lang.String reason)
CohortService
voidCohort
in interface CohortService
cohort
- the cohort to deletereason
- the reason this cohort is being retired
CohortService.voidCohort(org.openmrs.Cohort, java.lang.String)
public Cohort getCohortByUuid(java.lang.String uuid)
CohortService
getCohortByUuid
in interface CohortService
CohortService.getCohortByUuid(java.lang.String)
public Cohort addPatientToCohort(Cohort cohort, Patient patient)
CohortService
addPatientToCohort
in interface CohortService
cohort
- the cohort to receive the given patientpatient
- the patient to insert into the cohort
CohortService.addPatientToCohort(org.openmrs.Cohort,
org.openmrs.Patient)
public Cohort removePatientFromCohort(Cohort cohort, Patient patient)
CohortService
removePatientFromCohort
in interface CohortService
cohort
- the cohort containing the given patientpatient
- the patient to remove from the given cohort
CohortService.removePatientFromCohort(org.openmrs.Cohort,
org.openmrs.Patient)
public Cohort updateCohort(Cohort cohort)
updateCohort
in interface CohortService
CohortService.updateCohort(org.openmrs.Cohort)
public java.util.List<Cohort> getCohortsContainingPatient(Patient patient)
CohortService
getCohortsContainingPatient
in interface CohortService
CohortService.getCohortsContainingPatient(org.openmrs.Patient)
public java.util.List<Cohort> getCohortsContainingPatientId(java.lang.Integer patientId)
CohortService
getCohortsContainingPatientId
in interface CohortService
public java.util.List<Cohort> getCohorts(java.lang.String nameFragment) throws APIException
CohortService
getCohorts
in interface CohortService
APIException
CohortService.getCohorts(java.lang.String)
public java.util.List<Cohort> getAllCohorts() throws APIException
CohortService
getAllCohorts
in interface CohortService
APIException
CohortService.getAllCohorts()
public java.util.List<Cohort> getAllCohorts(boolean includeVoided) throws APIException
CohortService
getAllCohorts
in interface CohortService
includeVoided
- whether or not to include voided Cohorts
APIException
CohortService.getAllCohorts(boolean)
public Cohort getCohort(java.lang.String name) throws APIException
CohortService
getCohort
in interface CohortService
APIException
CohortService.getCohort(java.lang.String)
public Cohort purgeCohort(Cohort cohort) throws APIException
CohortService
purgeCohort
in interface CohortService
cohort
- the Cohort to completely remove from the database
APIException
CohortService.purgeCohort(org.openmrs.Cohort)
@Deprecated public Cohort evaluate(CohortDefinition definition, EvaluationContext evalContext) throws APIException
CohortService
evaluate
in interface CohortService
APIException
CohortService.evaluate(org.openmrs.cohort.CohortDefinition,
org.openmrs.report.EvaluationContext)
@Deprecated public CohortDefinition getAllPatientsCohortDefinition()
getAllPatientsCohortDefinition
in interface CohortService
CohortService.getAllPatientsCohortDefinition()
@Deprecated public CohortDefinition getCohortDefinition(java.lang.Class<CohortDefinition> clazz, java.lang.Integer id)
getCohortDefinition
in interface CohortService
CohortService.getCohortDefinition(java.lang.Class, java.lang.Integer)
@Deprecated public CohortDefinition getCohortDefinition(java.lang.String key)
getCohortDefinition
in interface CohortService
CohortService.getCohortDefinition(java.lang.String)
@Deprecated public java.util.List<CohortDefinitionItemHolder> getAllCohortDefinitions()
CohortService
getAllCohortDefinitions
in interface CohortService
CohortService.getAllCohortDefinitions()
@Deprecated public void purgeCohortDefinition(CohortDefinition definition)
purgeCohortDefinition
in interface CohortService
CohortService.purgeCohortDefinition(org.openmrs.cohort.CohortDefinition)
@Deprecated public void setCohortDefinitionProviders(java.util.Map<java.lang.Class<? extends CohortDefinition>,CohortDefinitionProvider> providerClassMap)
CohortService
providerClassMap
are added to the
already set list of providers. This allows multiple Spring application context files to call
this method with their own providers
setCohortDefinitionProviders
in interface CohortService
providerClassMap
- mapping from CohortDefinition to its providerCohortService.setCohortDefinitionProviders(Map)
@Deprecated public java.util.Map<java.lang.Class<? extends CohortDefinition>,CohortDefinitionProvider> getCohortDefinitionProviders()
CohortService
getCohortDefinitionProviders
in interface CohortService
CohortService.getCohortDefinitionProviders()
@Deprecated public void registerCohortDefinitionProvider(java.lang.Class<? extends CohortDefinition> defClass, CohortDefinitionProvider cohortDefProvider) throws APIException
CohortService
registerCohortDefinitionProvider
in interface CohortService
defClass
- the type of cohort definition that this provider works oncohortDefProvider
- the provider
APIException
CohortService.registerCohortDefinitionProvider(Class,
CohortDefinitionProvider)
@Deprecated public void removeCohortDefinitionProvider(java.lang.Class<? extends CohortDefinitionProvider> providerClass)
CohortService
providerClass is the
CohortDefinitionProvider
- Specified by:
removeCohortDefinitionProvider
in interface CohortService
- Parameters:
providerClass
- the provider to remove- See Also:
CohortService.removeCohortDefinitionProvider(java.lang.Class)
@Deprecated public CohortDefinition saveCohortDefinition(CohortDefinition definition) throws APIException
saveCohortDefinition
in interface CohortService
APIException
CohortService.saveCohortDefinition(org.openmrs.cohort.CohortDefinition)
@Deprecated public java.util.List<CohortDefinitionItemHolder> getCohortDefinitions(java.lang.Class providerClass)
getCohortDefinitions
in interface CohortService
CohortService.getCohortDefinitions(java.lang.Class)
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |