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(java.lang.Class<T> clazz,
java.lang.Integer activeListItemId)
Returns the ActiveListItem
|
ActiveListItem |
getActiveListItemByUuid(java.lang.String uuid)
Return the ActiveList by the UUID
|
<T extends ActiveListItem> |
getActiveListItems(java.lang.Class<T> clazz,
Person p,
ActiveListType type)
Returns a sorted set of active list items from a class that extends ActiveListItem
|
java.util.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,
java.util.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,
java.lang.String reason)
Voids the Active List Item
|
onShutdown, onStartup
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onShutdown, onStartup
public void setActiveListDAO(ActiveListDAO dao)
ActiveListService
setActiveListDAO
in interface ActiveListService
dao
- DAO for this serviceActiveListService.setActiveListDAO(org.openmrs.api.db.ActiveListDAO)
public java.util.List<ActiveListItem> getActiveListItems(Person p, ActiveListType type) throws APIException
ActiveListService
getActiveListItems
in interface ActiveListService
p
- the Persontype
- Problem or AllergyAPIException
ActiveListService.getActiveListItems(org.openmrs.Person,
org.openmrs.activelist.ActiveListType)
public <T extends ActiveListItem> java.util.List<T> getActiveListItems(java.lang.Class<T> clazz, Person p, ActiveListType type) throws APIException
ActiveListService
getActiveListItems
in interface ActiveListService
clazz
- extends ActiveListItemp
- the PersonAPIException
ActiveListService.getActiveListItems(java.lang.Class,
org.openmrs.Person, org.openmrs.activelist.ActiveListType)
public <T extends ActiveListItem> T getActiveListItem(java.lang.Class<T> clazz, java.lang.Integer activeListItemId) throws APIException
ActiveListService
getActiveListItem
in interface ActiveListService
clazz
- extends ActiveListItemactiveListItemId
- the unique ID of the Active ListAPIException
ActiveListService.getActiveListItem(java.lang.Class, java.lang.Integer)
public ActiveListItem getActiveListItemByUuid(java.lang.String uuid) throws APIException
ActiveListService
getActiveListItemByUuid
in interface ActiveListService
uuid
- unique identifierAPIException
ActiveListService.getActiveListItemByUuid(java.lang.String)
public ActiveListItem saveActiveListItem(ActiveListItem item) throws APIException
ActiveListService
saveActiveListItem
in interface ActiveListService
APIException
ActiveListService.saveActiveListItem(org.openmrs.activelist.ActiveListItem)
public ActiveListItem removeActiveListItem(ActiveListItem item, java.util.Date endDate) throws APIException
ActiveListService
removeActiveListItem
in interface ActiveListService
APIException
ActiveListService.removeActiveListItem(org.openmrs.activelist.ActiveListItem,
java.util.Date)
public ActiveListItem voidActiveListItem(ActiveListItem item, java.lang.String reason) throws APIException
ActiveListService
voidActiveListItem
in interface ActiveListService
APIException
ActiveListService.voidActiveListItem(org.openmrs.activelist.ActiveListItem,
java.lang.String)
public void purgeActiveListItem(ActiveListItem item) throws APIException
ActiveListService
purgeActiveListItem
in interface ActiveListService
item
- the ActiveListItem to completely remove from the databaseAPIException
ActiveListService.purgeActiveListItem(org.openmrs.activelist.ActiveListItem)
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.