public class HibernateVisitDAO extends Object implements VisitDAO
VisitService methods.| Constructor and Description |
|---|
HibernateVisitDAO() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteVisit(Visit visit) |
void |
deleteVisitAttributeType(VisitAttributeType visitAttributeType)
Completely removes a visit attribute type from the database
|
List<VisitAttributeType> |
getAllVisitAttributeTypes() |
List<VisitType> |
getAllVisitTypes() |
List<VisitType> |
getAllVisitTypes(boolean includeRetired) |
Visit |
getNextVisit(Visit previousVisit,
Collection<VisitType> visitTypes,
Date maximumStartDate)
Gets the next active visit which matches the specified visit types
|
Visit |
getVisit(Integer visitId) |
VisitAttribute |
getVisitAttributeByUuid(String uuid) |
VisitAttributeType |
getVisitAttributeType(Integer id) |
VisitAttributeType |
getVisitAttributeTypeByUuid(String uuid) |
Visit |
getVisitByUuid(String uuid) |
List<Visit> |
getVisits(Collection<VisitType> visitTypes,
Collection<Patient> patients,
Collection<Location> locations,
Collection<Concept> indications,
Date minStartDatetime,
Date maxStartDatetime,
Date minEndDatetime,
Date maxEndDatetime,
Map<VisitAttributeType,String> serializedAttributeValues,
boolean includeInactive,
boolean includeVoided)
Gets the visits matching the specified arguments
|
List<Visit> |
getVisits(VisitSearchCriteria criteria)
Gets the visits matching the specified search criteria
|
VisitType |
getVisitType(Integer visitTypeId) |
VisitType |
getVisitTypeByUuid(String uuid) |
List<VisitType> |
getVisitTypes(String fuzzySearchPhrase) |
void |
purgeVisitType(VisitType visitType) |
Visit |
saveVisit(Visit visit) |
VisitAttributeType |
saveVisitAttributeType(VisitAttributeType visitAttributeType) |
VisitType |
saveVisitType(VisitType visitType) |
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory) |
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
@Transactional(readOnly=true) public List<VisitType> getAllVisitTypes()
getAllVisitTypes in interface VisitDAOVisitDAO.getAllVisitTypes()public List<VisitType> getAllVisitTypes(boolean includeRetired)
getAllVisitTypes in interface VisitDAOVisitDAO.getAllVisitTypes(boolean)@Transactional(readOnly=true) public VisitType getVisitType(Integer visitTypeId)
getVisitType in interface VisitDAOVisitDAO.getVisitType(java.lang.Integer)@Transactional(readOnly=true) public VisitType getVisitTypeByUuid(String uuid)
getVisitTypeByUuid in interface VisitDAOVisitDAO.getVisitTypeByUuid(java.lang.String)@Transactional(readOnly=true) public List<VisitType> getVisitTypes(String fuzzySearchPhrase)
getVisitTypes in interface VisitDAOVisitDAO.getVisitTypes(java.lang.String)@Transactional public VisitType saveVisitType(VisitType visitType)
saveVisitType in interface VisitDAOVisitDAO.saveVisitType(org.openmrs.VisitType)@Transactional public void purgeVisitType(VisitType visitType)
purgeVisitType in interface VisitDAOVisitDAO.purgeVisitType(org.openmrs.VisitType)@Transactional(readOnly=true) public Visit getVisit(Integer visitId) throws DAOException
getVisit in interface VisitDAODAOExceptionVisitDAO.getVisit(java.lang.Integer)@Transactional(readOnly=true) public Visit getVisitByUuid(String uuid) throws DAOException
getVisitByUuid in interface VisitDAODAOExceptionVisitDAO.getVisitByUuid(java.lang.String)@Transactional public Visit saveVisit(Visit visit) throws DAOException
saveVisit in interface VisitDAODAOExceptionVisitDAO.saveVisit(org.openmrs.Visit)@Transactional public void deleteVisit(Visit visit) throws DAOException
deleteVisit in interface VisitDAODAOExceptionVisitDAO.deleteVisit(org.openmrs.Visit)@Transactional(readOnly=true) public List<Visit> getVisits(Collection<VisitType> visitTypes, Collection<Patient> patients, Collection<Location> locations, Collection<Concept> indications, Date minStartDatetime, Date maxStartDatetime, Date minEndDatetime, Date maxEndDatetime, Map<VisitAttributeType,String> serializedAttributeValues, boolean includeInactive, boolean includeVoided)
VisitDAOgetVisits in interface VisitDAOvisitTypes - a list of visit types to match againstpatients - a list of patients to match againstlocations - a list of locations to match againstindications - a list of indication concepts to match againstminStartDatetime - the minimum visit start date to match againstmaxStartDatetime - the maximum visit start date to match againstminEndDatetime - the minimum visit end date to match againstmaxEndDatetime - the maximum visit end date to match againstincludeInactive - specifies if inactive visits should be returned or notincludeVoided - specifies if voided visits should also be returnedVisitDAO.getVisits(java.util.Collection, java.util.Collection,
java.util.Collection, java.util.Collection, java.util.Date, java.util.Date,
java.util.Date, java.util.Date, java.util.Map, boolean, boolean)public List<Visit> getVisits(VisitSearchCriteria criteria) throws DAOException
VisitDAOgetVisits in interface VisitDAOcriteria - the search criteriaDAOExceptionVisitDAO.getVisits(org.openmrs.parameter.VisitSearchCriteria)@Transactional(readOnly=true) public List<VisitAttributeType> getAllVisitAttributeTypes()
getAllVisitAttributeTypes in interface VisitDAOVisitDAO.getAllVisitAttributeTypes()@Transactional(readOnly=true) public VisitAttributeType getVisitAttributeType(Integer id)
getVisitAttributeType in interface VisitDAOVisitDAO.getVisitAttributeType(java.lang.Integer)@Transactional(readOnly=true) public VisitAttributeType getVisitAttributeTypeByUuid(String uuid)
getVisitAttributeTypeByUuid in interface VisitDAOVisitDAO.getVisitAttributeTypeByUuid(java.lang.String)@Transactional public VisitAttributeType saveVisitAttributeType(VisitAttributeType visitAttributeType)
saveVisitAttributeType in interface VisitDAOVisitDAO.saveVisitAttributeType(org.openmrs.VisitAttributeType)@Transactional public void deleteVisitAttributeType(VisitAttributeType visitAttributeType)
VisitDAOdeleteVisitAttributeType in interface VisitDAOVisitDAO.deleteVisitAttributeType(org.openmrs.VisitAttributeType)@Transactional(readOnly=true) public VisitAttribute getVisitAttributeByUuid(String uuid)
getVisitAttributeByUuid in interface VisitDAOVisitDAO.getVisitAttributeByUuid(java.lang.String)public Visit getNextVisit(Visit previousVisit, Collection<VisitType> visitTypes, Date maximumStartDate)
VisitDAOgetNextVisit in interface VisitDAOpreviousVisit - the visit that precedes the one we are fetchingvisitTypes - a collection of visit types to match againstmaximumStartDate - the next visit should have been created before or at this date timeVisit
Should return the next unvoided active visit matching the specified types and startDateVisitDAO.getNextVisit(Visit, Collection, Date)Copyright © 2024 OpenMRS Inc.. All rights reserved.