|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.api.db.hibernate.HibernateEncounterDAO
public class HibernateEncounterDAO
Hibernate specific dao for the EncounterService
All calls should be made on the
Context.getEncounterService() object
EncounterDAO
,
EncounterService
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
log
|
Constructor Summary | |
---|---|
HibernateEncounterDAO()
|
Method Summary | |
---|---|
void |
deleteEncounter(Encounter encounter)
Purge an encounter from database. |
void |
deleteEncounterType(EncounterType encounterType)
Purge encounter type from database. |
java.util.List<EncounterType> |
findEncounterTypes(java.lang.String name)
Find Encounter Types matching the given name. |
java.util.List<EncounterType> |
getAllEncounterTypes(java.lang.Boolean includeRetired)
Get all encounter types |
Encounter |
getEncounter(java.lang.Integer encounterId)
Get encounter by internal identifier |
Encounter |
getEncounterByUuid(java.lang.String uuid)
Find Encounter matching a uuid |
java.util.List<Encounter> |
getEncounters(Patient patient,
Location location,
java.util.Date fromDate,
java.util.Date toDate,
java.util.Collection<Form> enteredViaForms,
java.util.Collection<EncounterType> encounterTypes,
java.util.Collection<User> providers,
boolean includeVoided)
|
java.util.List<Encounter> |
getEncountersByPatient(java.lang.String query,
boolean includedVoided)
Get a list of Encounter by Patient name or identifier |
java.util.List<Encounter> |
getEncountersByPatientId(java.lang.Integer patientId)
|
EncounterType |
getEncounterType(java.lang.Integer encounterTypeId)
Get encounterType by internal identifier |
EncounterType |
getEncounterType(java.lang.String name)
Get encounterType by name |
EncounterType |
getEncounterTypeByUuid(java.lang.String uuid)
Find EncounterType matching a uuid |
java.util.Date |
getSavedEncounterDatetime(Encounter encounter)
Gets the value of encounterDatetime currently saved in the database for the given encounter, bypassing any caches. |
Encounter |
saveEncounter(Encounter encounter)
Saves an encounter |
EncounterType |
saveEncounterType(EncounterType encounterType)
Save an Encounter Type |
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 HibernateEncounterDAO()
Method Detail |
---|
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- public Encounter saveEncounter(Encounter encounter) throws DAOException
EncounterDAO
saveEncounter
in interface EncounterDAO
encounter
- to be saved
DAOException
EncounterDAO.saveEncounter(org.openmrs.Encounter)
public void deleteEncounter(Encounter encounter) throws DAOException
EncounterDAO
deleteEncounter
in interface EncounterDAO
encounter
- encounter object to be purged
DAOException
EncounterService.deleteEncounter(org.openmrs.Encounter)
public Encounter getEncounter(java.lang.Integer encounterId) throws DAOException
EncounterDAO
getEncounter
in interface EncounterDAO
encounterId
- encounter id
DAOException
EncounterService.getEncounter(java.lang.Integer)
public java.util.List<Encounter> getEncountersByPatientId(java.lang.Integer patientId) throws DAOException
getEncountersByPatientId
in interface EncounterDAO
DAOException
EncounterDAO.getEncountersByPatientId(java.lang.Integer)
public java.util.List<Encounter> getEncounters(Patient patient, Location location, java.util.Date fromDate, java.util.Date toDate, java.util.Collection<Form> enteredViaForms, java.util.Collection<EncounterType> encounterTypes, java.util.Collection<User> providers, boolean includeVoided)
getEncounters
in interface EncounterDAO
EncounterDAO.getEncounters(org.openmrs.Patient, org.openmrs.Location,
java.util.Date, java.util.Date, java.util.Collection, java.util.Collection,
java.util.Collection, boolean)
public EncounterType saveEncounterType(EncounterType encounterType)
EncounterDAO
saveEncounterType
in interface EncounterDAO
EncounterDAO.saveEncounterType(org.openmrs.EncounterType)
public void deleteEncounterType(EncounterType encounterType) throws DAOException
EncounterDAO
deleteEncounterType
in interface EncounterDAO
DAOException
EncounterDAO.deleteEncounterType(org.openmrs.EncounterType)
public EncounterType getEncounterType(java.lang.Integer encounterTypeId) throws DAOException
EncounterDAO
getEncounterType
in interface EncounterDAO
encounterTypeId
- Internal Integer identifier for an EncounterType
DAOException
EncounterService.getEncounterType(java.lang.Integer)
public EncounterType getEncounterType(java.lang.String name) throws DAOException
EncounterDAO
getEncounterType
in interface EncounterDAO
name
- String representation of an encounterType
DAOException
EncounterService.getEncounterType(java.lang.String)
public java.util.List<EncounterType> getAllEncounterTypes(java.lang.Boolean includeRetired) throws DAOException
EncounterDAO
getAllEncounterTypes
in interface EncounterDAO
DAOException
EncounterDAO.getAllEncounterTypes(java.lang.Boolean)
public java.util.List<EncounterType> findEncounterTypes(java.lang.String name) throws DAOException
EncounterDAO
findEncounterTypes
in interface EncounterDAO
DAOException
EncounterDAO.findEncounterTypes(java.lang.String)
public java.util.Date getSavedEncounterDatetime(Encounter encounter)
EncounterDAO
getSavedEncounterDatetime
in interface EncounterDAO
encounter
- the Encounter go the the encounterDatetime of
EncounterDAO.getSavedEncounterDatetime(org.openmrs.Encounter)
public Encounter getEncounterByUuid(java.lang.String uuid)
EncounterDAO
Encounter
matching a uuid
getEncounterByUuid
in interface EncounterDAO
Encounter
EncounterDAO.getEncounterByUuid(java.lang.String)
public EncounterType getEncounterTypeByUuid(java.lang.String uuid)
EncounterDAO
EncounterType
matching a uuid
getEncounterTypeByUuid
in interface EncounterDAO
EncounterType
EncounterDAO.getEncounterTypeByUuid(java.lang.String)
public java.util.List<Encounter> getEncountersByPatient(java.lang.String query, boolean includedVoided)
EncounterDAO
Encounter
by Patient name or identifier
getEncountersByPatient
in interface EncounterDAO
query
- patient name or identifierincludedVoided
- Specifies whether voided encounters should be included
Encounter
EncounterDAO.getEncountersByPatient(String, boolean)
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |