public class HibernateConditionDAO extends Object implements ConditionDAO
ConditionDAO
Constructor and Description |
---|
HibernateConditionDAO() |
Modifier and Type | Method and Description |
---|---|
void |
deleteCondition(Condition condition)
Removes a condition from the database
|
List<Condition> |
getActiveConditions(Patient patient)
Gets all active conditions related to the specified patient.
|
List<Condition> |
getAllConditions(Patient patient) |
Condition |
getCondition(Integer conditionId)
Gets the condition with the specified id.
|
Condition |
getConditionByUuid(String uuid)
Gets the condition by its UUID.
|
List<Condition> |
getConditionsByEncounter(Encounter encounter) |
Condition |
saveCondition(Condition condition)
Saves the condition.
|
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Set session factory
|
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- public Condition getCondition(Integer conditionId)
getCondition
in interface ConditionDAO
conditionId
- the id to search for in the database.public Condition getConditionByUuid(String uuid)
getConditionByUuid
in interface ConditionDAO
uuid
- the UUID to search for in the database.public List<Condition> getConditionsByEncounter(Encounter encounter) throws APIException
getConditionsByEncounter
in interface ConditionDAO
APIException
ConditionService.getConditionsByEncounter(Encounter)
public List<Condition> getActiveConditions(Patient patient)
getActiveConditions
in interface ConditionDAO
patient
- the patient whose active conditions are being queried.public List<Condition> getAllConditions(Patient patient)
getAllConditions
in interface ConditionDAO
ConditionService.getAllConditions(Patient)
public void deleteCondition(Condition condition) throws DAOException
deleteCondition
in interface ConditionDAO
condition
- the condition to be deletedDAOException
public Condition saveCondition(Condition condition)
saveCondition
in interface ConditionDAO
condition
- the condition to save.Copyright © 2024 OpenMRS Inc.. All rights reserved.