Constructor and Description |
---|
HibernateCohortDAO() |
Modifier and Type | Method and Description |
---|---|
Cohort |
deleteCohort(Cohort cohort)
Removes a cohort from the database
|
List<Cohort> |
getAllCohorts(boolean includeVoided)
Gets all cohorts in the database
|
Cohort |
getCohort(Integer id)
Finds the cohort with the given primary key
|
Cohort |
getCohort(String name)
Finds a cohort by name
|
Cohort |
getCohortByUuid(String uuid) |
CohortMembership |
getCohortMembershipByUuid(String uuid) |
List<CohortMembership> |
getCohortMemberships(Integer patientId,
Date activeOnDate,
boolean includeVoided) |
List<Cohort> |
getCohorts(String nameFragment)
Finds all Cohorts with matching names
|
List<Cohort> |
getCohortsContainingPatientId(Integer patientId,
boolean includeVoided,
Date asOfDate)
Finds all cohorts that contain the given patientId
|
Cohort |
saveCohort(Cohort cohort)
Saves a Cohort to the database
|
CohortMembership |
saveCohortMembership(CohortMembership cohortMembership) |
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Auto generated method comment
|
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- public Cohort getCohort(Integer id) throws DAOException
CohortDAO
getCohort
in interface CohortDAO
DAOException
CohortDAO.getCohort(java.lang.Integer)
public List<Cohort> getCohortsContainingPatientId(Integer patientId, boolean includeVoided, Date asOfDate) throws DAOException
CohortDAO
getCohortsContainingPatientId
in interface CohortDAO
patientId
- patient id to get the cohorts containing the patientincludeVoided
- voided true/false whether or not to include voided cohortsDAOException
CohortDAO.getCohortsContainingPatientId(Integer, boolean, Date)
public Cohort getCohortByUuid(String uuid)
getCohortByUuid
in interface CohortDAO
CohortDAO.getCohortByUuid(java.lang.String)
public CohortMembership getCohortMembershipByUuid(String uuid)
getCohortMembershipByUuid
in interface CohortDAO
CohortDAO.getCohortMembershipByUuid(java.lang.String)
public Cohort deleteCohort(Cohort cohort) throws DAOException
CohortDAO
deleteCohort
in interface CohortDAO
DAOException
CohortDAO.deleteCohort(org.openmrs.Cohort)
public List<Cohort> getCohorts(String nameFragment) throws DAOException
CohortDAO
getCohorts
in interface CohortDAO
DAOException
CohortDAO.getCohorts(java.lang.String)
public List<Cohort> getAllCohorts(boolean includeVoided) throws DAOException
CohortDAO
getAllCohorts
in interface CohortDAO
includeVoided
- whether to include voided cohortsDAOException
CohortDAO.getAllCohorts(boolean)
public Cohort getCohort(String name)
CohortDAO
getCohort
in interface CohortDAO
CohortDAO.getCohort(java.lang.String)
public Cohort saveCohort(Cohort cohort) throws DAOException
CohortDAO
saveCohort
in interface CohortDAO
cohort
- Cohort to saveDAOException
CohortDAO.saveCohort(org.openmrs.Cohort)
public List<CohortMembership> getCohortMemberships(Integer patientId, Date activeOnDate, boolean includeVoided)
getCohortMemberships
in interface CohortDAO
activeOnDate
- optionalpublic CohortMembership saveCohortMembership(CohortMembership cohortMembership)
saveCohortMembership
in interface CohortDAO
Copyright © 2024 OpenMRS Inc.. All rights reserved.