public class HibernateVisitDAO extends java.lang.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
|
java.util.List<VisitAttributeType> |
getAllVisitAttributeTypes() |
java.util.List<VisitType> |
getAllVisitTypes() |
Visit |
getNextVisit(Visit previousVisit,
java.util.Collection<VisitType> visitTypes,
java.util.Date maximumStartDate)
Gets the next active visit which matches the specified visit types
|
Visit |
getVisit(java.lang.Integer visitId) |
VisitAttribute |
getVisitAttributeByUuid(java.lang.String uuid) |
VisitAttributeType |
getVisitAttributeType(java.lang.Integer id) |
VisitAttributeType |
getVisitAttributeTypeByUuid(java.lang.String uuid) |
Visit |
getVisitByUuid(java.lang.String uuid) |
java.util.List<Visit> |
getVisits(java.util.Collection<VisitType> visitTypes,
java.util.Collection<Patient> patients,
java.util.Collection<Location> locations,
java.util.Collection<Concept> indications,
java.util.Date minStartDatetime,
java.util.Date maxStartDatetime,
java.util.Date minEndDatetime,
java.util.Date maxEndDatetime,
java.util.Map<VisitAttributeType,java.lang.String> serializedAttributeValues,
boolean includeInactive,
boolean includeVoided)
Gets the visits matching the specified arguments
|
VisitType |
getVisitType(java.lang.Integer visitTypeId) |
VisitType |
getVisitTypeByUuid(java.lang.String uuid) |
java.util.List<VisitType> |
getVisitTypes(java.lang.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 java.util.List<VisitType> getAllVisitTypes() throws APIException
getAllVisitTypes
in interface VisitDAO
APIException
VisitDAO.getAllVisitTypes()
@Transactional(readOnly=true) public VisitType getVisitType(java.lang.Integer visitTypeId)
getVisitType
in interface VisitDAO
VisitDAO.getVisitType(java.lang.Integer)
@Transactional(readOnly=true) public VisitType getVisitTypeByUuid(java.lang.String uuid)
getVisitTypeByUuid
in interface VisitDAO
VisitDAO.getVisitTypeByUuid(java.lang.String)
@Transactional(readOnly=true) public java.util.List<VisitType> getVisitTypes(java.lang.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(java.lang.Integer visitId) throws DAOException
getVisit
in interface VisitDAO
DAOException
VisitDAO.getVisit(java.lang.Integer)
@Transactional(readOnly=true) public Visit getVisitByUuid(java.lang.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 java.util.List<Visit> getVisits(java.util.Collection<VisitType> visitTypes, java.util.Collection<Patient> patients, java.util.Collection<Location> locations, java.util.Collection<Concept> indications, java.util.Date minStartDatetime, java.util.Date maxStartDatetime, java.util.Date minEndDatetime, java.util.Date maxEndDatetime, java.util.Map<VisitAttributeType,java.lang.String> serializedAttributeValues, boolean includeInactive, boolean includeVoided) throws DAOException
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 returnedDAOException
VisitDAO.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)
@Transactional(readOnly=true) public java.util.List<VisitAttributeType> getAllVisitAttributeTypes()
getAllVisitAttributeTypes
in interface VisitDAO
VisitDAO.getAllVisitAttributeTypes()
@Transactional(readOnly=true) public VisitAttributeType getVisitAttributeType(java.lang.Integer id)
getVisitAttributeType
in interface VisitDAO
VisitDAO.getVisitAttributeType(java.lang.Integer)
@Transactional(readOnly=true) public VisitAttributeType getVisitAttributeTypeByUuid(java.lang.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(java.lang.String uuid)
getVisitAttributeByUuid
in interface VisitDAO
VisitDAO.getVisitAttributeByUuid(java.lang.String)
public Visit getNextVisit(Visit previousVisit, java.util.Collection<VisitType> visitTypes, java.util.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
VisitDAO.getNextVisit(Visit, Collection, Date)
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.