@Transactional public class ConditionServiceImpl extends BaseOpenmrsService implements ConditionService
ConditionService interface
It defines the methods to handle the condition domain object| Constructor and Description |
|---|
ConditionServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
List<Condition> |
getActiveConditions(Patient patient)
Gets a patient's active conditions
|
List<Condition> |
getAllConditions(Patient patient)
Gets all conditions i.e both active and inactive conditions, associated with a patient
|
Condition |
getCondition(Integer conditionId)
Gets a condition by id
|
Condition |
getConditionByUuid(String uuid)
Gets a condition based on the uuid
|
ConditionDAO |
getConditionDAO() |
List<Condition> |
getConditionsByEncounter(Encounter encounter)
Gets all conditions(not voided) of an encounter.
|
void |
purgeCondition(Condition condition)
Completely remove a condition from the database.
|
Condition |
saveCondition(Condition condition)
Saves a condition
|
void |
setConditionDAO(ConditionDAO conditionDAO) |
Condition |
unvoidCondition(Condition condition)
Revive a condition
|
Condition |
voidCondition(Condition condition,
String voidReason)
Voids a condition
|
onShutdown, onStartupclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonShutdown, onStartuppublic void setConditionDAO(ConditionDAO conditionDAO)
public ConditionDAO getConditionDAO()
@Transactional(readOnly=true) public Condition getConditionByUuid(String uuid)
getConditionByUuid in interface ConditionServiceuuid - - uuid of the condition to be returned@Transactional(readOnly=true) public Condition getCondition(Integer conditionId)
getCondition in interface ConditionServiceconditionId - - the id of the Condition to retrieve@Transactional(readOnly=true) public List<Condition> getActiveConditions(Patient patient)
getActiveConditions in interface ConditionServicepatient - - the patient to retrieve conditions for@Transactional(readOnly=true) public List<Condition> getAllConditions(Patient patient)
ConditionServicegetAllConditions in interface ConditionServicepatient - - the patient to retrieve conditions forConditionService.getAllConditions(Patient)public List<Condition> getConditionsByEncounter(Encounter encounter) throws APIException
ConditionServicegetConditionsByEncounter in interface ConditionServiceencounter - - the encounter to retrieve conditions forAPIExceptionConditionService.getConditionsByEncounter(Encounter)public Condition saveCondition(Condition condition) throws APIException
saveCondition in interface ConditionServicecondition - - the condition to be savedAPIExceptionpublic Condition voidCondition(Condition condition, String voidReason)
voidCondition in interface ConditionServicecondition - - the condition to be voidedvoidReason - - the reason for voiding the conditionpublic Condition unvoidCondition(Condition condition)
unvoidCondition in interface ConditionServicecondition - Condition to unvoidpublic void purgeCondition(Condition condition)
purgeCondition in interface ConditionServicecondition - the condition to purge from the databaseCopyright © 2024 OpenMRS Inc.. All rights reserved.