|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CohortService
API methods related to Cohorts and CohortDefinitions A Cohort is a list of patient ids. A CohortDefinition is a search strategy which can be used to arrive at a cohort.
Cohort,
CohortDefinition,
org.openmrs.api.CohortDefinitionProvider| Method Summary | |
|---|---|
Cohort |
addPatientToCohort(Cohort cohort,
Patient patient)
Adds a new patient to a Cohort. |
Cohort |
createCohort(Cohort cohort)
Deprecated. replaced by saveCohort(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<? extends CohortDefinitionProvider> providerClass)
|
java.util.List<Cohort> |
getCohorts()
Deprecated. replaced by getAllCohorts() |
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> cohortDefClass,
CohortDefinitionProvider cohortDef)
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)
Deprecated. replaced by saveCohort(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 interface org.openmrs.api.OpenmrsService |
|---|
onShutdown, onStartup |
| Method Detail |
|---|
void setCohortDAO(CohortDAO dao)
dao -
@Authorized(value={"Add Cohorts","Edit Cohorts"})
Cohort saveCohort(Cohort cohort)
throws APIException
cohort - the cohort to be saved to the database
APIException
@Authorized(value="Add Cohorts")
Cohort createCohort(Cohort cohort)
throws APIException
APIExceptionsaveCohort(Cohort)
@Authorized(value="Edit Cohorts")
Cohort updateCohort(Cohort cohort)
throws APIException
APIExceptionsaveCohort(Cohort)
@Authorized(value="Delete Cohorts")
Cohort voidCohort(Cohort cohort,
java.lang.String reason)
throws APIException
cohort - the cohort to deletereason - the reason this cohort is being retired
APIException
Cohort purgeCohort(Cohort cohort)
throws APIException
cohort - the Cohort to completely remove from the database
APIException
@Authorized(value="View Patient Cohorts")
Cohort getCohort(java.lang.Integer id)
throws APIException
id -
APIException
@Authorized(value="View Patient Cohorts")
Cohort getCohort(java.lang.String name)
throws APIException
name -
APIException
@Authorized(value="View Patient Cohorts")
java.util.List<Cohort> getAllCohorts()
throws APIException
APIException
@Authorized(value="View Patient Cohorts")
java.util.List<Cohort> getAllCohorts(boolean includeVoided)
throws APIException
includeVoided - whether or not to include voided Cohorts
APIException
@Authorized(value="View Patient Cohorts")
java.util.List<Cohort> getCohorts()
throws APIException
APIExceptiongetAllCohorts()
java.util.List<Cohort> getCohorts(java.lang.String nameFragment)
throws APIException
nameFragment -
APIException
@Authorized(value="View Patient Cohorts")
java.util.List<Cohort> getCohortsContainingPatient(Patient patient)
throws APIException
patient -
APIException
@Authorized(value="View Patient Cohorts")
java.util.List<Cohort> getCohortsContainingPatientId(java.lang.Integer patientId)
throws APIException
patientId -
APIException
@Authorized(value="Edit Cohorts")
Cohort addPatientToCohort(Cohort cohort,
Patient patient)
throws APIException
cohort - patient -
APIException
@Authorized(value="Edit Cohorts")
Cohort removePatientFromCohort(Cohort cohort,
Patient patient)
throws APIException
cohort - patient -
APIException@Transactional(readOnly=true) void setCohortDefinitionProviders(java.util.Map<java.lang.Class<? extends CohortDefinition>,CohortDefinitionProvider> providerClassMap)
providerClassMap -
@Transactional(readOnly=true)
void registerCohortDefinitionProvider(java.lang.Class<? extends CohortDefinition> cohortDefClass,
CohortDefinitionProvider cohortDef)
throws APIException
cohortDefClass - cohortDef -
APIException@Transactional(readOnly=true) java.util.Map<java.lang.Class<? extends CohortDefinition>,CohortDefinitionProvider> getCohortDefinitionProviders()
setCohortDefinitionProviders(Map)@Transactional(readOnly=true) void removeCohortDefinitionProvider(java.lang.Class<? extends CohortDefinitionProvider> providerClass)
@Transactional(readOnly=true) java.util.List<CohortDefinition> getAllCohortDefinitions()
@Transactional(readOnly=true) java.util.List<CohortDefinition> getCohortDefinitions(java.lang.Class<? extends CohortDefinitionProvider> providerClass)
@Transactional(readOnly=true)
CohortDefinition getCohortDefinition(java.lang.Class<CohortDefinition> clazz,
java.lang.Integer id)
@Transactional(readOnly=true) CohortDefinition saveCohortDefinition(CohortDefinition definition)
@Transactional void purgeCohortDefinition(CohortDefinition definition)
@Transactional(readOnly=true)
Cohort evaluate(CohortDefinition definition,
EvaluationContext evalContext)
@Transactional(readOnly=true) CohortDefinition getAllPatientsCohortDefinition()
|
OpenMRS-trunk | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||