public class ActiveListServiceImpl extends BaseOpenmrsService implements ActiveListService
Context.getActiveListService()Context,
ActiveListService| Constructor and Description |
|---|
ActiveListServiceImpl() |
| 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, onStartupclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonShutdown, onStartuppublic void setActiveListDAO(ActiveListDAO dao)
ActiveListServicesetActiveListDAO in interface ActiveListServicedao - DAO for this serviceActiveListService.setActiveListDAO(org.openmrs.api.db.ActiveListDAO)public List<ActiveListItem> getActiveListItems(Person p, ActiveListType type) throws APIException
ActiveListServicegetActiveListItems in interface ActiveListServicep - the Persontype - Problem or AllergyAPIExceptionActiveListService.getActiveListItems(org.openmrs.Person,
org.openmrs.activelist.ActiveListType)public <T extends ActiveListItem> List<T> getActiveListItems(Class<T> clazz, Person p, ActiveListType type) throws APIException
ActiveListServicegetActiveListItems in interface ActiveListServiceclazz - extends ActiveListItemp - the PersonAPIExceptionActiveListService.getActiveListItems(java.lang.Class,
org.openmrs.Person, org.openmrs.activelist.ActiveListType)public <T extends ActiveListItem> T getActiveListItem(Class<T> clazz, Integer activeListItemId) throws APIException
ActiveListServicegetActiveListItem in interface ActiveListServiceclazz - extends ActiveListItemactiveListItemId - the unique ID of the Active ListAPIExceptionActiveListService.getActiveListItem(java.lang.Class, java.lang.Integer)public ActiveListItem getActiveListItemByUuid(String uuid) throws APIException
ActiveListServicegetActiveListItemByUuid in interface ActiveListServiceuuid - unique identifierAPIExceptionActiveListService.getActiveListItemByUuid(java.lang.String)public ActiveListItem saveActiveListItem(ActiveListItem item) throws APIException
ActiveListServicesaveActiveListItem in interface ActiveListServiceAPIExceptionActiveListService.saveActiveListItem(org.openmrs.activelist.ActiveListItem)public ActiveListItem removeActiveListItem(ActiveListItem item, Date endDate) throws APIException
ActiveListServiceremoveActiveListItem in interface ActiveListServiceAPIExceptionActiveListService.removeActiveListItem(org.openmrs.activelist.ActiveListItem,
java.util.Date)public ActiveListItem voidActiveListItem(ActiveListItem item, String reason) throws APIException
ActiveListServicevoidActiveListItem in interface ActiveListServiceAPIExceptionActiveListService.voidActiveListItem(org.openmrs.activelist.ActiveListItem,
java.lang.String)public void purgeActiveListItem(ActiveListItem item) throws APIException
ActiveListServicepurgeActiveListItem in interface ActiveListServiceitem - the ActiveListItem to completely remove from the databaseAPIExceptionActiveListService.purgeActiveListItem(org.openmrs.activelist.ActiveListItem)Copyright © 2018 OpenMRS LLC.. All Rights Reserved.