public class HibernatePatientDAO extends Object implements PatientDAO
Context
,
PatientDAO
,
PatientService
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
HibernatePatientDAO() |
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- public Patient getPatient(Integer patientId)
getPatient
in interface PatientDAO
PatientService.getPatient(java.lang.Integer)
public Patient savePatient(Patient patient) throws DAOException
savePatient
in interface PatientDAO
DAOException
PatientDAO.savePatient(org.openmrs.Patient)
public List<Patient> getPatients(String name, String identifier, List<PatientIdentifierType> identifierTypes, boolean matchIdentifierExactly, Integer start, Integer length, boolean searchOnNamesOrIdentifiers) throws DAOException
getPatients
in interface PatientDAO
searchOnNamesOrIdentifiers
- specifies if the logic should find patients that match the
name or identifier otherwise find patients that match both the name and identifierDAOException
PatientDAO.getPatients(String, String, List, boolean, Integer,
Integer, boolean)
public List<Patient> getAllPatients(boolean includeVoided) throws DAOException
getAllPatients
in interface PatientDAO
DAOException
PatientDAO.getAllPatients(boolean)
public void deletePatientIdentifierType(PatientIdentifierType patientIdentifierType) throws DAOException
deletePatientIdentifierType
in interface PatientDAO
DAOException
PatientService.purgePatientIdentifierType(org.openmrs.PatientIdentifierType)
,
PatientDAO.deletePatientIdentifierType(org.openmrs.PatientIdentifierType)
public List<PatientIdentifier> getPatientIdentifiers(String identifier, List<PatientIdentifierType> patientIdentifierTypes, List<Location> locations, List<Patient> patients, Boolean isPreferred) throws DAOException
getPatientIdentifiers
in interface PatientDAO
DAOException
PatientDAO.getPatientIdentifiers(java.lang.String, java.util.List,
java.util.List, java.util.List, java.lang.Boolean)
,
PatientService.getPatientIdentifiers(java.lang.String, java.util.List,
java.util.List, java.util.List, java.lang.Boolean)
public PatientIdentifierType savePatientIdentifierType(PatientIdentifierType patientIdentifierType) throws DAOException
savePatientIdentifierType
in interface PatientDAO
DAOException
PatientDAO.savePatientIdentifierType(org.openmrs.PatientIdentifierType)
public void deletePatient(Patient patient) throws DAOException
PatientDAO
deletePatient
in interface PatientDAO
patient
- patient to be deletedDAOException
PatientService.deletePatient(org.openmrs.Patient)
public PatientIdentifierType getPatientIdentifierType(Integer patientIdentifierTypeId) throws DAOException
getPatientIdentifierType
in interface PatientDAO
DAOException
PatientService.getPatientIdentifierType(java.lang.Integer)
public List<PatientIdentifierType> getAllPatientIdentifierTypes(boolean includeRetired) throws DAOException
getAllPatientIdentifierTypes
in interface PatientDAO
DAOException
PatientDAO.getAllPatientIdentifierTypes(boolean)
public List<PatientIdentifierType> getPatientIdentifierTypes(String name, String format, Boolean required, Boolean hasCheckDigit) throws DAOException
getPatientIdentifierTypes
in interface PatientDAO
DAOException
PatientDAO.getPatientIdentifierTypes(java.lang.String,
java.lang.String, java.lang.Boolean, java.lang.Boolean)
public List<Patient> getDuplicatePatientsByAttributes(List<String> attributes)
getDuplicatePatientsByAttributes
in interface PatientDAO
PatientDAO.getDuplicatePatientsByAttributes(java.util.List)
public Patient getPatientByUuid(String uuid)
PatientDAO
getPatientByUuid
in interface PatientDAO
PatientDAO.getPatientByUuid(java.lang.String)
public PatientIdentifier getPatientIdentifierByUuid(String uuid)
getPatientIdentifierByUuid
in interface PatientDAO
public PatientIdentifierType getPatientIdentifierTypeByUuid(String uuid)
PatientDAO
getPatientIdentifierTypeByUuid
in interface PatientDAO
PatientDAO.getPatientIdentifierTypeByUuid(java.lang.String)
public boolean isIdentifierInUseByAnotherPatient(PatientIdentifier patientIdentifier)
isIdentifierInUseByAnotherPatient
in interface PatientDAO
PatientDAO.isIdentifierInUseByAnotherPatient(org.openmrs.PatientIdentifier)
public PatientIdentifier getPatientIdentifier(Integer patientIdentifierId) throws DAOException
getPatientIdentifier
in interface PatientDAO
DAOException
PatientDAO.getPatientIdentifier(java.lang.Integer)
public PatientIdentifier savePatientIdentifier(PatientIdentifier patientIdentifier)
savePatientIdentifier
in interface PatientDAO
PatientDAO.savePatientIdentifier(org.openmrs.PatientIdentifier)
public void deletePatientIdentifier(PatientIdentifier patientIdentifier) throws DAOException
deletePatientIdentifier
in interface PatientDAO
DAOException
PatientService.purgePatientIdentifier(org.openmrs.PatientIdentifier)
,
PatientDAO.deletePatientIdentifier(org.openmrs.PatientIdentifier)
public Integer getCountOfPatients(String name, String identifier, List<PatientIdentifierType> identifierTypes, boolean matchIdentifierExactly, boolean searchOnNamesOrIdentifiers)
getCountOfPatients
in interface PatientDAO
searchOnNamesOrIdentifiers
- specifies if the logic should find patients that match the
name or identifier otherwise find patients that match both the name and identifierPatientDAO.getCountOfPatients(String, String, List, boolean, boolean)
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.