|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.api.db.hibernate.HibernatePatientDAO
public class HibernatePatientDAO
Hibernate specific database methods for the PatientService
Context
,
PatientDAO
,
PatientService
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
log
|
Constructor Summary | |
---|---|
HibernatePatientDAO()
|
Method Summary | |
---|---|
void |
deletePatient(Patient patient)
Delete patient from database. |
void |
deletePatientIdentifier(PatientIdentifier patientIdentifier)
|
void |
deletePatientIdentifierType(PatientIdentifierType patientIdentifierType)
|
java.util.List<PatientIdentifierType> |
getAllPatientIdentifierTypes(boolean includeRetired)
|
java.util.List<Patient> |
getAllPatients(boolean includeVoided)
|
java.util.List<Patient> |
getDuplicatePatientsByAttributes(java.util.List<java.lang.String> attributes)
|
Patient |
getPatient(java.lang.Integer patientId)
|
Patient |
getPatientByUuid(java.lang.String uuid)
Auto generated method comment |
PatientIdentifier |
getPatientIdentifier(java.lang.Integer patientIdentifierId)
|
PatientIdentifier |
getPatientIdentifierByUuid(java.lang.String uuid)
|
java.util.List<PatientIdentifier> |
getPatientIdentifiers(java.lang.String identifier,
java.util.List<PatientIdentifierType> patientIdentifierTypes,
java.util.List<Location> locations,
java.util.List<Patient> patients,
java.lang.Boolean isPreferred)
|
PatientIdentifierType |
getPatientIdentifierType(java.lang.Integer patientIdentifierTypeId)
|
PatientIdentifierType |
getPatientIdentifierTypeByUuid(java.lang.String uuid)
Auto generated method comment |
java.util.List<PatientIdentifierType> |
getPatientIdentifierTypes(java.lang.String name,
java.lang.String format,
java.lang.Boolean required,
java.lang.Boolean hasCheckDigit)
|
java.util.List<Patient> |
getPatients(java.lang.String name,
java.lang.String identifier,
java.util.List<PatientIdentifierType> identifierTypes,
boolean matchIdentifierExactly)
|
boolean |
isIdentifierInUseByAnotherPatient(PatientIdentifier patientIdentifier)
This method uses a SQL query and does not load anything into the hibernate session. |
Patient |
savePatient(Patient patient)
|
PatientIdentifier |
savePatientIdentifier(PatientIdentifier patientIdentifier)
|
PatientIdentifierType |
savePatientIdentifierType(PatientIdentifierType patientIdentifierType)
|
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Set session factory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log log
Constructor Detail |
---|
public HibernatePatientDAO()
Method Detail |
---|
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- public Patient getPatient(java.lang.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 java.util.List<Patient> getPatients(java.lang.String name, java.lang.String identifier, java.util.List<PatientIdentifierType> identifierTypes, boolean matchIdentifierExactly) throws DAOException
getPatients
in interface PatientDAO
DAOException
PatientDAO.getPatients(java.lang.String, java.lang.String,
java.util.List, boolean)
public java.util.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 java.util.List<PatientIdentifier> getPatientIdentifiers(java.lang.String identifier, java.util.List<PatientIdentifierType> patientIdentifierTypes, java.util.List<Location> locations, java.util.List<Patient> patients, java.lang.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 deleted
DAOException
PatientService.deletePatient(org.openmrs.Patient)
public PatientIdentifierType getPatientIdentifierType(java.lang.Integer patientIdentifierTypeId) throws DAOException
getPatientIdentifierType
in interface PatientDAO
DAOException
PatientService.getPatientIdentifierType(java.lang.Integer)
public java.util.List<PatientIdentifierType> getAllPatientIdentifierTypes(boolean includeRetired) throws DAOException
getAllPatientIdentifierTypes
in interface PatientDAO
DAOException
PatientDAO.getAllPatientIdentifierTypes(boolean)
public java.util.List<PatientIdentifierType> getPatientIdentifierTypes(java.lang.String name, java.lang.String format, java.lang.Boolean required, java.lang.Boolean hasCheckDigit) throws DAOException
getPatientIdentifierTypes
in interface PatientDAO
DAOException
PatientDAO.getPatientIdentifierTypes(java.lang.String,
java.lang.String, java.lang.Boolean, java.lang.Boolean)
public java.util.List<Patient> getDuplicatePatientsByAttributes(java.util.List<java.lang.String> attributes)
getDuplicatePatientsByAttributes
in interface PatientDAO
PatientDAO.getDuplicatePatientsByAttributes(java.util.List)
public Patient getPatientByUuid(java.lang.String uuid)
PatientDAO
getPatientByUuid
in interface PatientDAO
PatientDAO.getPatientByUuid(java.lang.String)
public PatientIdentifier getPatientIdentifierByUuid(java.lang.String uuid)
getPatientIdentifierByUuid
in interface PatientDAO
public PatientIdentifierType getPatientIdentifierTypeByUuid(java.lang.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(java.lang.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)
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |