|
|
||||||||
| 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)
|
Cohort |
evaluate(CohortDefinition definition,
EvaluationContext evalContext)
|
java.util.List<CohortDefinition> |
getAllCohortDefinitions()
|
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()
|
Cohort |
getCohort(java.lang.Integer id)
Gets a Cohort by its database primary key |
Cohort |
getCohort(java.lang.String name)
Gets a Cohort by its name |
CohortDefinition |
getCohortDefinition(java.lang.Class<CohortDefinition> clazz,
java.lang.Integer id)
|
java.util.Map<java.lang.Class<? extends CohortDefinition>,CohortDefinitionProvider> |
getCohortDefinitionProviders()
Gets all the providers registered to this service |
java.util.List<CohortDefinition> |
getCohortDefinitions(java.lang.Class providerClass)
|
java.util.List<Cohort> |
getCohorts()
|
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. |
Cohort |
purgeCohort(Cohort cohort)
Completely removes a Cohort from the database (not reversible) |
void |
purgeCohortDefinition(CohortDefinition definition)
|
void |
registerCohortDefinitionProvider(java.lang.Class<? extends CohortDefinition> defClass,
CohortDefinitionProvider cohortDefProvider)
Adds the given cohort definition to this service's providers |
void |
removeCohortDefinitionProvider(java.lang.Class<? extends CohortDefinitionProvider> providerClass)
|
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)
|
void |
setCohortDAO(CohortDAO dao)
Sets the CohortDAO for this service to use |
void |
setCohortDefinitionProviders(java.util.Map<java.lang.Class<? extends CohortDefinition>,CohortDefinitionProvider> providerClassMap)
Set the given CohortDefinitionProviders as the providers for this service. |
Cohort |
updateCohort(Cohort cohort)
|
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 |
|---|
onShutdown, 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 |
|---|
onShutdown, onStartup |
| Constructor Detail |
|---|
public CohortServiceImpl()
| Method Detail |
|---|
public void setCohortDAO(CohortDAO dao)
CohortService
setCohortDAO in interface CohortServiceCohortService.setCohortDAO(org.openmrs.api.db.CohortDAO)
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 addPatientToCohort(Cohort cohort,
Patient patient)
CohortService
addPatientToCohort in interface CohortServiceCohortService.addPatientToCohort(org.openmrs.Cohort, org.openmrs.Patient)
public Cohort removePatientFromCohort(Cohort cohort,
Patient patient)
CohortService
removePatientFromCohort in interface CohortServiceCohortService.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)
public Cohort evaluate(CohortDefinition definition,
EvaluationContext evalContext)
throws APIException
evaluate in interface CohortServiceAPIExceptionCohortService.evaluate(org.openmrs.cohort.CohortDefinition, org.openmrs.report.EvaluationContext)public CohortDefinition getAllPatientsCohortDefinition()
getAllPatientsCohortDefinition in interface CohortServiceCohortService.getAllPatientsCohortDefinition()
public CohortDefinition getCohortDefinition(java.lang.Class<CohortDefinition> clazz,
java.lang.Integer id)
getCohortDefinition in interface CohortServiceCohortService.getCohortDefinition(java.lang.Class, java.lang.Integer)public java.util.List<CohortDefinition> getAllCohortDefinitions()
getAllCohortDefinitions in interface CohortServiceorg.openmrs.api.CohortService#getCohortDefinitions()public void purgeCohortDefinition(CohortDefinition definition)
purgeCohortDefinition in interface CohortServiceCohortService.purgeCohortDefinition(org.openmrs.cohort.CohortDefinition)public void setCohortDefinitionProviders(java.util.Map<java.lang.Class<? extends CohortDefinition>,CohortDefinitionProvider> providerClassMap)
CohortService
setCohortDefinitionProviders in interface CohortServiceCohortService.setCohortDefinitionProviders(Map)public java.util.Map<java.lang.Class<? extends CohortDefinition>,CohortDefinitionProvider> getCohortDefinitionProviders()
CohortService
getCohortDefinitionProviders in interface CohortServiceCohortService.getCohortDefinitionProviders()
public void registerCohortDefinitionProvider(java.lang.Class<? extends CohortDefinition> defClass,
CohortDefinitionProvider cohortDefProvider)
throws APIException
CohortService
registerCohortDefinitionProvider in interface CohortServiceAPIExceptionorg.openmrs.api.CohortService#registerCohortDefinitionProvider(java.lang.Class, org.openmrs.api.CohortDefinitionService)public void removeCohortDefinitionProvider(java.lang.Class<? extends CohortDefinitionProvider> providerClass)
removeCohortDefinitionProvider in interface CohortServiceCohortService.removeCohortDefinitionProvider(java.lang.Class)
public CohortDefinition saveCohortDefinition(CohortDefinition definition)
throws APIException
saveCohortDefinition in interface CohortServiceAPIExceptionCohortService.saveCohortDefinition(org.openmrs.cohort.CohortDefinition)public java.util.List<CohortDefinition> getCohortDefinitions(java.lang.Class providerClass)
getCohortDefinitions in interface CohortServiceCohortService.getCohortDefinitions(java.lang.Class)
|
OpenMRS-trunk | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||