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 VisitDAO
VisitDAO.getAllVisitTypes()
public List<VisitType> getAllVisitTypes(boolean includeRetired)
getAllVisitTypes
in interface VisitDAO
VisitDAO.getAllVisitTypes(boolean)
@Transactional(readOnly=true) public VisitType getVisitType(Integer visitTypeId)
getVisitType
in interface VisitDAO
VisitDAO.getVisitType(java.lang.Integer)
@Transactional(readOnly=true) public VisitType getVisitTypeByUuid(String uuid)
getVisitTypeByUuid
in interface VisitDAO
VisitDAO.getVisitTypeByUuid(java.lang.String)
@Transactional(readOnly=true) public List<VisitType> getVisitTypes(String fuzzySearchPhrase)
getVisitTypes
in interface VisitDAO
VisitDAO.getVisitTypes(java.lang.String)
@Transactional public VisitType saveVisitType(VisitType visitType)
saveVisitType
in interface VisitDAO
VisitDAO.saveVisitType(org.openmrs.VisitType)
@Transactional public void purgeVisitType(VisitType visitType)
purgeVisitType
in interface VisitDAO
VisitDAO.purgeVisitType(org.openmrs.VisitType)
@Transactional(readOnly=true) public Visit getVisit(Integer visitId) throws DAOException
getVisit
in interface VisitDAO
DAOException
VisitDAO.getVisit(java.lang.Integer)
@Transactional(readOnly=true) public Visit getVisitByUuid(String uuid) throws DAOException
getVisitByUuid
in interface VisitDAO
DAOException
VisitDAO.getVisitByUuid(java.lang.String)
@Transactional public Visit saveVisit(Visit visit) throws DAOException
saveVisit
in interface VisitDAO
DAOException
VisitDAO.saveVisit(org.openmrs.Visit)
@Transactional public void deleteVisit(Visit visit) throws DAOException
deleteVisit
in interface VisitDAO
DAOException
VisitDAO.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)
VisitDAO
getVisits
in interface VisitDAO
visitTypes
- 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
VisitDAO
getVisits
in interface VisitDAO
criteria
- the search criteriaDAOException
VisitDAO.getVisits(org.openmrs.parameter.VisitSearchCriteria)
@Transactional(readOnly=true) public List<VisitAttributeType> getAllVisitAttributeTypes()
getAllVisitAttributeTypes
in interface VisitDAO
VisitDAO.getAllVisitAttributeTypes()
@Transactional(readOnly=true) public VisitAttributeType getVisitAttributeType(Integer id)
getVisitAttributeType
in interface VisitDAO
VisitDAO.getVisitAttributeType(java.lang.Integer)
@Transactional(readOnly=true) public VisitAttributeType getVisitAttributeTypeByUuid(String uuid)
getVisitAttributeTypeByUuid
in interface VisitDAO
VisitDAO.getVisitAttributeTypeByUuid(java.lang.String)
@Transactional public VisitAttributeType saveVisitAttributeType(VisitAttributeType visitAttributeType)
saveVisitAttributeType
in interface VisitDAO
VisitDAO.saveVisitAttributeType(org.openmrs.VisitAttributeType)
@Transactional public void deleteVisitAttributeType(VisitAttributeType visitAttributeType)
VisitDAO
deleteVisitAttributeType
in interface VisitDAO
VisitDAO.deleteVisitAttributeType(org.openmrs.VisitAttributeType)
@Transactional(readOnly=true) public VisitAttribute getVisitAttributeByUuid(String uuid)
getVisitAttributeByUuid
in interface VisitDAO
VisitDAO.getVisitAttributeByUuid(java.lang.String)
public Visit getNextVisit(Visit previousVisit, Collection<VisitType> visitTypes, Date maximumStartDate)
VisitDAO
getNextVisit
in interface VisitDAO
previousVisit
- 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.