|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
@Transactional public interface CohortService
API methods related to Cohorts and CohortDefinitions
Cohort,
CohortDefinition,
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)
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 cohortKey)
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<? extends CohortDefinitionProvider> providerClass)
Deprecated. see reportingcompatibility module |
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)
Deprecated. see reportingcompatibility module |
void |
registerCohortDefinitionProvider(java.lang.Class<? extends CohortDefinition> cohortDefClass,
CohortDefinitionProvider cohortDef)
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. 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
@Deprecated
@Authorized(value="Add Cohorts")
Cohort createCohort(Cohort cohort)
throws APIException
APIExceptionsaveCohort(Cohort)
@Deprecated
@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
@Transactional(readOnly=true)
@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
@Deprecated
@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 - the cohort to receive the given patientpatient - the patient to insert into the cohort
APIException
@Authorized(value="Edit Cohorts")
Cohort removePatientFromCohort(Cohort cohort,
Patient patient)
throws APIException
cohort - the cohort containing the given patientpatient - the patient to remove from the given cohort
APIException
@Transactional(readOnly=true)
@Deprecated
void setCohortDefinitionProviders(java.util.Map<java.lang.Class<? extends CohortDefinition>,CohortDefinitionProvider> providerClassMap)
throws APIException
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
providerClassMap - mapping from CohortDefinition to its provider
APIException
@Transactional(readOnly=true)
@Deprecated
void registerCohortDefinitionProvider(java.lang.Class<? extends CohortDefinition> cohortDefClass,
CohortDefinitionProvider cohortDef)
throws APIException
cohortDefClass - the type of cohort definition that this provider works oncohortDef - the provider
APIException
@Transactional(readOnly=true)
@Deprecated
java.util.Map<java.lang.Class<? extends CohortDefinition>,CohortDefinitionProvider> getCohortDefinitionProviders()
throws APIException
APIExceptionsetCohortDefinitionProviders(Map)
@Transactional(readOnly=true)
@Deprecated
void removeCohortDefinitionProvider(java.lang.Class<? extends CohortDefinitionProvider> providerClass)
throws APIException
providerClass is the
CohortDefinitionProvider
- Parameters:
providerClass - the provider to remove
- Throws:
APIException- Expected behavior:
- not fail if providerClass not set
@Transactional(readOnly=true)
@Deprecated
java.util.List<CohortDefinitionItemHolder> getAllCohortDefinitions()
throws APIException
APIException
@Transactional(readOnly=true)
@Deprecated
java.util.List<CohortDefinitionItemHolder> getCohortDefinitions(java.lang.Class<? extends CohortDefinitionProvider> providerClass)
throws APIException
APIException
@Transactional(readOnly=true)
@Deprecated
CohortDefinition getCohortDefinition(java.lang.Class<CohortDefinition> clazz,
java.lang.Integer id)
throws APIException
APIException
@Transactional(readOnly=true)
@Deprecated
CohortDefinition getCohortDefinition(java.lang.String cohortKey)
throws APIException
APIException
@Transactional(readOnly=true)
@Deprecated
CohortDefinition saveCohortDefinition(CohortDefinition definition)
throws APIException
APIException
@Transactional
@Deprecated
void purgeCohortDefinition(CohortDefinition definition)
throws APIException
APIException
@Transactional(readOnly=true)
@Deprecated
Cohort evaluate(CohortDefinition definition,
EvaluationContext evalContext)
throws APIException
definition - evalContext -
APIException
@Transactional(readOnly=true)
@Deprecated
CohortDefinition getAllPatientsCohortDefinition()
throws APIException
APIException@Transactional(readOnly=true) @Authorized(value="View Patient Cohorts") Cohort getCohortByUuid(java.lang.String uuid)
uuid -
|
OpenMRS-1.7.x | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||