|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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 CohortServiceCohortService.setCohortDAO(org.openmrs.api.db.CohortDAO)public void onShutdown()
onShutdown in interface OpenmrsServiceonShutdown in class BaseOpenmrsServiceBaseOpenmrsService.onShutdown()
public Cohort saveCohort(Cohort cohort)
throws APIException
CohortService
saveCohort in interface CohortServicecohort - the cohort to be saved to the database
APIExceptionCohortService.saveCohort(org.openmrs.Cohort)public Cohort createCohort(Cohort cohort)
createCohort in interface CohortServiceCohortService.createCohort(org.openmrs.Cohort)public Cohort getCohort(java.lang.Integer id)
CohortService
getCohort in interface CohortServiceCohortService.getCohort(java.lang.Integer)public java.util.List<Cohort> getCohorts()
getCohorts in interface CohortServiceCohortService.getCohorts()
public Cohort voidCohort(Cohort cohort,
java.lang.String reason)
CohortService
voidCohort in interface CohortServicecohort - 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 CohortServiceCohortService.getCohortByUuid(java.lang.String)
public Cohort addPatientToCohort(Cohort cohort,
Patient patient)
CohortService
addPatientToCohort in interface CohortServicecohort - 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 CohortServicecohort - 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 CohortServiceCohortService.updateCohort(org.openmrs.Cohort)public java.util.List<Cohort> getCohortsContainingPatient(Patient patient)
CohortService
getCohortsContainingPatient in interface CohortServiceCohortService.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 CohortServiceAPIExceptionCohortService.getCohorts(java.lang.String)
public java.util.List<Cohort> getAllCohorts()
throws APIException
CohortService
getAllCohorts in interface CohortServiceAPIExceptionCohortService.getAllCohorts()
public java.util.List<Cohort> getAllCohorts(boolean includeVoided)
throws APIException
CohortService
getAllCohorts in interface CohortServiceincludeVoided - whether or not to include voided Cohorts
APIExceptionCohortService.getAllCohorts(boolean)
public Cohort getCohort(java.lang.String name)
throws APIException
CohortService
getCohort in interface CohortServiceAPIExceptionCohortService.getCohort(java.lang.String)
public Cohort purgeCohort(Cohort cohort)
throws APIException
CohortService
purgeCohort in interface CohortServicecohort - the Cohort to completely remove from the database
APIExceptionCohortService.purgeCohort(org.openmrs.Cohort)
@Deprecated
public Cohort evaluate(CohortDefinition definition,
EvaluationContext evalContext)
throws APIException
CohortService
evaluate in interface CohortServiceAPIExceptionCohortService.evaluate(org.openmrs.cohort.CohortDefinition,
org.openmrs.report.EvaluationContext)@Deprecated public CohortDefinition getAllPatientsCohortDefinition()
getAllPatientsCohortDefinition in interface CohortServiceCohortService.getAllPatientsCohortDefinition()
@Deprecated
public CohortDefinition getCohortDefinition(java.lang.Class<CohortDefinition> clazz,
java.lang.Integer id)
getCohortDefinition in interface CohortServiceCohortService.getCohortDefinition(java.lang.Class, java.lang.Integer)@Deprecated public CohortDefinition getCohortDefinition(java.lang.String key)
getCohortDefinition in interface CohortServiceCohortService.getCohortDefinition(java.lang.String)@Deprecated public java.util.List<CohortDefinitionItemHolder> getAllCohortDefinitions()
CohortService
getAllCohortDefinitions in interface CohortServiceCohortService.getAllCohortDefinitions()@Deprecated public void purgeCohortDefinition(CohortDefinition definition)
purgeCohortDefinition in interface CohortServiceCohortService.purgeCohortDefinition(org.openmrs.cohort.CohortDefinition)@Deprecated public void setCohortDefinitionProviders(java.util.Map<java.lang.Class<? extends CohortDefinition>,CohortDefinitionProvider> providerClassMap)
CohortServiceproviderClassMap 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 CohortServiceproviderClassMap - mapping from CohortDefinition to its providerCohortService.setCohortDefinitionProviders(Map)@Deprecated public java.util.Map<java.lang.Class<? extends CohortDefinition>,CohortDefinitionProvider> getCohortDefinitionProviders()
CohortService
getCohortDefinitionProviders in interface CohortServiceCohortService.getCohortDefinitionProviders()
@Deprecated
public void registerCohortDefinitionProvider(java.lang.Class<? extends CohortDefinition> defClass,
CohortDefinitionProvider cohortDefProvider)
throws APIException
CohortService
registerCohortDefinitionProvider in interface CohortServicedefClass - the type of cohort definition that this provider works oncohortDefProvider - the provider
APIExceptionCohortService.registerCohortDefinitionProvider(Class,
CohortDefinitionProvider)@Deprecated public void removeCohortDefinitionProvider(java.lang.Class<? extends CohortDefinitionProvider> providerClass)
CohortServiceproviderClass 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 CohortServiceAPIExceptionCohortService.saveCohortDefinition(org.openmrs.cohort.CohortDefinition)@Deprecated public java.util.List<CohortDefinitionItemHolder> getCohortDefinitions(java.lang.Class providerClass)
getCohortDefinitions in interface CohortServiceCohortService.getCohortDefinitions(java.lang.Class)
|
OpenMRS-1.7.x | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||