@Transactional public class ConditionServiceImpl extends BaseOpenmrsService implements ConditionService
ConditionService
interface
It defines the methods to handle the condition domain objectConstructor 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, onStartup
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onShutdown, onStartup
public void setConditionDAO(ConditionDAO conditionDAO)
public ConditionDAO getConditionDAO()
@Transactional(readOnly=true) public Condition getConditionByUuid(String uuid)
getConditionByUuid
in interface ConditionService
uuid
- - uuid of the condition to be returned@Transactional(readOnly=true) public Condition getCondition(Integer conditionId)
getCondition
in interface ConditionService
conditionId
- - the id of the Condition to retrieve@Transactional(readOnly=true) public List<Condition> getActiveConditions(Patient patient)
getActiveConditions
in interface ConditionService
patient
- - the patient to retrieve conditions for@Transactional(readOnly=true) public List<Condition> getAllConditions(Patient patient)
ConditionService
getAllConditions
in interface ConditionService
patient
- - the patient to retrieve conditions forConditionService.getAllConditions(Patient)
public List<Condition> getConditionsByEncounter(Encounter encounter) throws APIException
ConditionService
getConditionsByEncounter
in interface ConditionService
encounter
- - the encounter to retrieve conditions forAPIException
ConditionService.getConditionsByEncounter(Encounter)
public Condition saveCondition(Condition condition) throws APIException
saveCondition
in interface ConditionService
condition
- - the condition to be savedAPIException
public Condition voidCondition(Condition condition, String voidReason)
voidCondition
in interface ConditionService
condition
- - the condition to be voidedvoidReason
- - the reason for voiding the conditionpublic Condition unvoidCondition(Condition condition)
unvoidCondition
in interface ConditionService
condition
- Condition to unvoidpublic void purgeCondition(Condition condition)
purgeCondition
in interface ConditionService
condition
- the condition to purge from the databaseCopyright © 2024 OpenMRS Inc.. All rights reserved.