public interface ConditionService extends OpenmrsService
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
|
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
|
Condition |
unvoidCondition(Condition condition)
Revive a previously voided condition
|
Condition |
voidCondition(Condition condition,
String voidReason)
Voids a condition
|
onShutdown, onStartup
@Authorized(value="Get Conditions") Condition getConditionByUuid(String uuid) throws APIException
uuid
- - uuid of the condition to be returnedAPIException
@Authorized(value="Get Conditions") List<Condition> getActiveConditions(Patient patient) throws APIException
patient
- - the patient to retrieve conditions forAPIException
@Authorized(value="Get Conditions") List<Condition> getAllConditions(Patient patient) throws APIException
patient
- - the patient to retrieve conditions forAPIException
List<Condition> getConditionsByEncounter(Encounter encounter) throws APIException
encounter
- - the encounter to retrieve conditions forAPIException
@Authorized(value="Get Conditions") Condition getCondition(Integer conditionId) throws APIException
conditionId
- the id of the Condition to retrieveAPIException
@Authorized(value="Edit Conditions") Condition saveCondition(Condition condition) throws APIException
condition
- - the condition to be savedAPIException
@Authorized(value="Edit Conditions") Condition voidCondition(Condition condition, String voidReason) throws APIException
condition
- the condition to be voidedvoidReason
- the reason for voiding the conditionAPIException
- if an error occurs while voiding the condition@Authorized(value="Edit Conditions") Condition unvoidCondition(Condition condition) throws APIException
condition
- Condition to unvoidAPIException
- Should unset voided bit on given condition@Authorized(value="Delete Conditions") void purgeCondition(Condition condition) throws APIException
condition
- APIException
- Should delete the given condition from the databaseCopyright © 2024 OpenMRS Inc.. All rights reserved.