public class OrderSetServiceImpl extends BaseOpenmrsService implements OrderSetService
Modifier and Type | Field and Description |
---|---|
protected OrderSetDAO |
dao |
Constructor and Description |
---|
OrderSetServiceImpl() |
Modifier and Type | Method and Description |
---|---|
List<OrderSetAttributeType> |
getAllOrderSetAttributeTypes()
Get all order set attribute types
|
OrderSet |
getOrderSet(Integer orderSetId)
Gets a specific OrderSet with the matched orderSet Id.
|
OrderSetAttribute |
getOrderSetAttributeByUuid(String uuid)
Get order set attribute by uuid
|
OrderSetAttributeType |
getOrderSetAttributeType(Integer id)
Get order set attribute type from the database by a given internal id
|
OrderSetAttributeType |
getOrderSetAttributeTypeByName(String name)
Retrieves an order set attribute type object based on the name provided
|
OrderSetAttributeType |
getOrderSetAttributeTypeByUuid(String uuid)
Get order set attribute type by uuid
|
OrderSet |
getOrderSetByUuid(String orderSetUuid)
Gets a specific OrderSet with the matched orderSet uuid.
|
OrderSetMember |
getOrderSetMemberByUuid(String uuid)
Get OrderSetMember by uuid
|
List<OrderSet> |
getOrderSets(boolean includeRetired)
Gets all OrderSets that match the specified parameters excluding discontinuation orderSets.
|
void |
purgeOrderSetAttributeType(OrderSetAttributeType orderSetAttributeType)
Completely removes an order set attribute type
|
OrderSet |
retireOrderSet(OrderSet orderSet,
String retireReason)
Retires and OrderSet, with matched OrderSet
|
OrderSetAttributeType |
retireOrderSetAttributeType(OrderSetAttributeType orderSetAttributeType,
String reason)
Retires the given order set attribute type
|
OrderSet |
saveOrderSet(OrderSet orderSet)
Save or update the given
orderSet in the database. |
OrderSetAttributeType |
saveOrderSetAttributeType(OrderSetAttributeType orderSetAttributeType)
Creates or updates the given order set attribute type
|
void |
setOrderSetDAO(OrderSetDAO dao)
Setter for the OrderSet data access object.
|
OrderSet |
unretireOrderSet(OrderSet orderSet)
UnRetires and OrderSet, with matched OrderSet
|
OrderSetAttributeType |
unretireOrderSetAttributeType(OrderSetAttributeType orderSetAttributeType)
Restores an order set attribute type that was previous retired
|
onShutdown, onStartup
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onShutdown, onStartup
protected OrderSetDAO dao
public void setOrderSetDAO(OrderSetDAO dao)
OrderSetService
setOrderSetDAO
in interface OrderSetService
dao
- The data access object to useOrderSetService.setOrderSetDAO(org.openmrs.api.db.OrderSetDAO)
@Transactional(readOnly=false) public OrderSet saveOrderSet(OrderSet orderSet) throws APIException
OrderSetService
orderSet
in the database. If the OrderSet is retired
it will set retired by and retired date.
If OrderSetMembers are retired, it will set retired by and retired date.saveOrderSet
in interface OrderSetService
orderSet
- the OrderSet to saveAPIException
@Transactional(readOnly=false) public OrderSet retireOrderSet(OrderSet orderSet, String retireReason) throws APIException
OrderSetService
retireOrderSet
in interface OrderSetService
orderSet
- Specifies the OrderSet to be retiredretireReason
- Specifies the reason why the OrderSet has to be retiredAPIException
OrderSetService.retireOrderSet(OrderSet, String)
@Transactional(readOnly=false) public OrderSet unretireOrderSet(OrderSet orderSet) throws APIException
OrderSetService
unretireOrderSet
in interface OrderSetService
orderSet
- Specifies the OrderSet to be retiredAPIException
OrderSetService.unretireOrderSet(OrderSet)
@Transactional(readOnly=true) public List<OrderSet> getOrderSets(boolean includeRetired) throws APIException
OrderSetService
getOrderSets
in interface OrderSetService
includeRetired
- Specifies whether retired orders should be included or notAPIException
OrderSetService.getOrderSets(boolean)
@Transactional(readOnly=true) public OrderSet getOrderSet(Integer orderSetId) throws APIException
OrderSetService
getOrderSet
in interface OrderSetService
orderSetId
- Specifies a saved orderSet id.APIException
OrderSetService.getOrderSet(Integer)
@Transactional(readOnly=true) public OrderSet getOrderSetByUuid(String orderSetUuid) throws APIException
OrderSetService
getOrderSetByUuid
in interface OrderSetService
orderSetUuid
- Specifies a saved orderSet uuid.APIException
OrderSetService.getOrderSetByUuid(String)
@Transactional(readOnly=true) public OrderSetMember getOrderSetMemberByUuid(String uuid)
OrderSetService
getOrderSetMemberByUuid
in interface OrderSetService
OrderSetService.getOrderSetMemberByUuid(String)
@Transactional(readOnly=true) public List<OrderSetAttributeType> getAllOrderSetAttributeTypes()
OrderSetService
getAllOrderSetAttributeTypes
in interface OrderSetService
OrderSetAttributeType
sOrderSetService.getAllOrderSetAttributeTypes()
@Transactional(readOnly=true) public OrderSetAttributeType getOrderSetAttributeType(Integer id)
OrderSetService
getOrderSetAttributeType
in interface OrderSetService
id
- specifies the set attribute type idOrderSetAttributeType
with the given internal idOrderSetService.getOrderSetAttributeType(java.lang.Integer)
@Transactional(readOnly=true) public OrderSetAttributeType getOrderSetAttributeTypeByUuid(String uuid)
OrderSetService
getOrderSetAttributeTypeByUuid
in interface OrderSetService
uuid
- specifies the order set attribute type uuidOrderSetAttributeType
with the given uuidOrderSetService.getOrderSetAttributeTypeByUuid(java.lang.String)
@Transactional(readOnly=false) public OrderSetAttributeType saveOrderSetAttributeType(OrderSetAttributeType orderSetAttributeType)
OrderSetService
saveOrderSetAttributeType
in interface OrderSetService
orderSetAttributeType
- the order set attribute type to saveOrderSetService.saveOrderSetAttributeType(org.openmrs.OrderSetAttributeType)
@Transactional(readOnly=false) public OrderSetAttributeType retireOrderSetAttributeType(OrderSetAttributeType orderSetAttributeType, String reason)
OrderSetService
retireOrderSetAttributeType
in interface OrderSetService
orderSetAttributeType
- specifies the order set attribute type to be retiredOrderSetService.retireOrderSetAttributeType(org.openmrs.OrderSetAttributeType,
java.lang.String)
@Transactional(readOnly=false) public OrderSetAttributeType unretireOrderSetAttributeType(OrderSetAttributeType orderSetAttributeType)
OrderSetService
unretireOrderSetAttributeType
in interface OrderSetService
orderSetAttributeType
- the order set attribute type to be un-retiredOrderSetService.unretireOrderSetAttributeType(org.openmrs.OrderSetAttributeType)
@Transactional(readOnly=false) public void purgeOrderSetAttributeType(OrderSetAttributeType orderSetAttributeType)
OrderSetService
purgeOrderSetAttributeType
in interface OrderSetService
orderSetAttributeType
- the order set attribute type to be purgedOrderSetService.purgeOrderSetAttributeType(org.openmrs.OrderSetAttributeType)
@Transactional(readOnly=true) public OrderSetAttributeType getOrderSetAttributeTypeByName(String name)
OrderSetService
getOrderSetAttributeTypeByName
in interface OrderSetService
name
- fetches a given order set attribute type by nameOrderSetAttributeType
with the specified nameOrderSetService.getOrderSetAttributeTypeByName(java.lang.String)
@Transactional(readOnly=true) public OrderSetAttribute getOrderSetAttributeByUuid(String uuid)
OrderSetService
getOrderSetAttributeByUuid
in interface OrderSetService
uuid
- specifies the order set attribute uuidOrderSetAttribute
with the given uuidOrderSetService.getOrderSetAttributeByUuid(java.lang.String)
Copyright © 2024 OpenMRS Inc.. All rights reserved.