@Transactional public interface ActiveListService extends OpenmrsService
Modifier and Type | Method and Description |
---|---|
<T extends ActiveListItem> |
getActiveListItem(Class<T> clazz,
Integer activeListItemId)
Returns the ActiveListItem
|
ActiveListItem |
getActiveListItemByUuid(String uuid)
Return the ActiveList by the UUID
|
<T extends ActiveListItem> |
getActiveListItems(Class<T> clazz,
Person p,
ActiveListType type)
Returns a sorted set of active list items from a class that extends ActiveListItem
|
List<ActiveListItem> |
getActiveListItems(Person p,
ActiveListType type)
Returns a sorted set of active list items based on the type given.
|
void |
purgeActiveListItem(ActiveListItem item)
Completely removes an ActiveListItem from the database (not reversible)
|
ActiveListItem |
removeActiveListItem(ActiveListItem item,
Date endDate)
Sets the Active List Item as inactive by setting the end date to today, if null
|
ActiveListItem |
saveActiveListItem(ActiveListItem item)
Save or update an Active List Item
|
void |
setActiveListDAO(ActiveListDAO dao)
Sets the DAO for this service.
|
ActiveListItem |
voidActiveListItem(ActiveListItem item,
String reason)
Voids the Active List Item
|
onShutdown, onStartup
void setActiveListDAO(ActiveListDAO dao)
dao
- DAO for this service@Transactional(readOnly=true) List<ActiveListItem> getActiveListItems(Person p, ActiveListType type) throws APIException
p
- the Persontype
- Problem or AllergyAPIException
@Transactional(readOnly=true) <T extends ActiveListItem> List<T> getActiveListItems(Class<T> clazz, Person p, ActiveListType type) throws APIException
clazz
- extends ActiveListItemp
- the Persontype
- APIException
@Transactional(readOnly=true) <T extends ActiveListItem> T getActiveListItem(Class<T> clazz, Integer activeListItemId) throws APIException
clazz
- extends ActiveListItemactiveListItemId
- the unique ID of the Active ListAPIException
@Transactional(readOnly=true) ActiveListItem getActiveListItemByUuid(String uuid) throws APIException
uuid
- unique identifierAPIException
ActiveListItem saveActiveListItem(ActiveListItem item) throws APIException
item
- APIException
ActiveListItem removeActiveListItem(ActiveListItem item, Date endDate) throws APIException
item
- APIException
ActiveListItem voidActiveListItem(ActiveListItem item, String reason) throws APIException
item
- APIException
void purgeActiveListItem(ActiveListItem item) throws APIException
item
- the ActiveListItem to completely remove from the databaseAPIException
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.