public class HibernateOrderDAO extends java.lang.Object implements OrderDAO
OrderService
,
OrderDAO
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
HibernateOrderDAO() |
Modifier and Type | Method and Description |
---|---|
void |
deleteObsThatReference(Order order)
Delete Obs that references (deleted) Order
|
void |
deleteOrder(Order order) |
java.util.List<Order> |
getActiveOrders(Patient patient,
java.util.List<OrderType> orderTypes,
CareSetting careSetting,
java.util.Date asOfDate) |
CareSetting |
getCareSetting(java.lang.Integer careSettingId)
Get care setting by type
|
CareSetting |
getCareSettingByName(java.lang.String name) |
CareSetting |
getCareSettingByUuid(java.lang.String uuid) |
java.util.List<CareSetting> |
getCareSettings(boolean includeRetired) |
Order |
getDiscontinuationOrder(Order order) |
java.lang.Long |
getNextOrderNumberSeedSequenceValue()
Gets the next available order number seed
|
Order |
getOrder(java.lang.Integer orderId) |
Order |
getOrderByOrderNumber(java.lang.String orderNumber) |
Order |
getOrderByUuid(java.lang.String uuid)
Auto generated method comment
|
java.util.List<OrderFrequency> |
getOrderFrequencies(boolean includeRetired) |
java.util.List<OrderFrequency> |
getOrderFrequencies(java.lang.String searchPhrase,
java.util.Locale locale,
boolean exactLocale,
boolean includeRetired) |
OrderFrequency |
getOrderFrequency(java.lang.Integer orderFrequencyId) |
OrderFrequency |
getOrderFrequencyByConcept(Concept concept) |
OrderFrequency |
getOrderFrequencyByUuid(java.lang.String uuid) |
java.util.List<java.util.List<java.lang.Object>> |
getOrderFromDatabase(Order order,
boolean isOrderADrugOrder)
Get the fresh order from the database
|
java.util.List<Order> |
getOrders(OrderType orderType,
java.util.List<Patient> patients,
java.util.List<Concept> concepts,
java.util.List<User> orderers,
java.util.List<Encounter> encounters)
This searches for orders given the parameters.
|
java.util.List<Order> |
getOrders(Patient patient,
CareSetting careSetting,
java.util.List<OrderType> orderTypes,
boolean includeVoided,
boolean includeDiscontinuationOrders) |
java.util.List<OrderType> |
getOrderSubtypes(OrderType orderType,
boolean includeRetired) |
OrderType |
getOrderType(java.lang.Integer orderTypeId) |
OrderType |
getOrderTypeByConceptClass(ConceptClass conceptClass) |
OrderType |
getOrderTypeByName(java.lang.String orderTypeName) |
OrderType |
getOrderTypeByUuid(java.lang.String uuid) |
java.util.List<OrderType> |
getOrderTypes(boolean includeRetired) |
Order |
getRevisionOrder(Order order) |
boolean |
isOrderFrequencyInUse(OrderFrequency orderFrequency)
Checks if an order frequency is being referenced by any order
|
boolean |
isOrderTypeInUse(OrderType orderType)
Check whether give order type is used by any order
|
void |
purgeOrderFrequency(OrderFrequency orderFrequency) |
void |
purgeOrderType(OrderType orderType) |
Order |
saveOrder(Order order) |
OrderFrequency |
saveOrderFrequency(OrderFrequency orderFrequency) |
OrderType |
saveOrderType(OrderType orderType) |
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Set session factory
|
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- public Order saveOrder(Order order) throws DAOException
saveOrder
in interface OrderDAO
DAOException
OrderDAO.saveOrder(org.openmrs.Order)
,
OrderService.saveOrder(org.openmrs.Order, org.openmrs.api.OrderContext)
public void deleteOrder(Order order) throws DAOException
deleteOrder
in interface OrderDAO
DAOException
OrderDAO.deleteOrder(org.openmrs.Order)
,
OrderService.purgeOrder(org.openmrs.Order)
public Order getOrder(java.lang.Integer orderId) throws DAOException
getOrder
in interface OrderDAO
DAOException
OrderService.getOrder(java.lang.Integer)
public java.util.List<Order> getOrders(OrderType orderType, java.util.List<Patient> patients, java.util.List<Concept> concepts, java.util.List<User> orderers, java.util.List<Encounter> encounters)
OrderDAO
getOrders
in interface OrderDAO
orderType
- The type of Order to getpatients
- The patients to get orders forconcepts
- The concepts in order.getConcept to get orders fororderers
- The orderers to match onencounters
- The encounters that the orders are assigned toOrderDAO.getOrders(org.openmrs.OrderType, java.util.List,
java.util.List, java.util.List, java.util.List)
public java.util.List<Order> getOrders(Patient patient, CareSetting careSetting, java.util.List<OrderType> orderTypes, boolean includeVoided, boolean includeDiscontinuationOrders)
getOrders
in interface OrderDAO
OrderDAO.getOrders(org.openmrs.Patient, org.openmrs.CareSetting, java.util.List,
boolean, boolean)
public Order getOrderByUuid(java.lang.String uuid)
OrderDAO
getOrderByUuid
in interface OrderDAO
OrderDAO.getOrderByUuid(java.lang.String)
public Order getDiscontinuationOrder(Order order)
getDiscontinuationOrder
in interface OrderDAO
OrderDAO.getRevisionOrder(org.openmrs.Order)
public Order getRevisionOrder(Order order) throws APIException
getRevisionOrder
in interface OrderDAO
APIException
OrderService.getRevisionOrder(org.openmrs.Order)
public java.util.List<java.util.List<java.lang.Object>> getOrderFromDatabase(Order order, boolean isOrderADrugOrder) throws APIException
OrderDAO
getOrderFromDatabase
in interface OrderDAO
order
- the order to get from the databaseisOrderADrugOrder
- is the order a previous orderAPIException
public void deleteObsThatReference(Order order)
deleteObsThatReference
in interface OrderDAO
public Order getOrderByOrderNumber(java.lang.String orderNumber)
getOrderByOrderNumber
in interface OrderDAO
OrderDAO.getOrderByOrderNumber(java.lang.String)
public java.lang.Long getNextOrderNumberSeedSequenceValue()
OrderDAO
getNextOrderNumberSeedSequenceValue
in interface OrderDAO
OrderDAO.getNextOrderNumberSeedSequenceValue()
public java.util.List<Order> getActiveOrders(Patient patient, java.util.List<OrderType> orderTypes, CareSetting careSetting, java.util.Date asOfDate)
getActiveOrders
in interface OrderDAO
OrderDAO.getActiveOrders(org.openmrs.Patient, java.util.List,
org.openmrs.CareSetting, java.util.Date)
public CareSetting getCareSetting(java.lang.Integer careSettingId)
OrderDAO
getCareSetting
in interface OrderDAO
OrderDAO.getCareSetting(Integer)
public CareSetting getCareSettingByUuid(java.lang.String uuid)
getCareSettingByUuid
in interface OrderDAO
OrderDAO.getCareSettingByUuid(String)
public CareSetting getCareSettingByName(java.lang.String name)
getCareSettingByName
in interface OrderDAO
OrderDAO.getCareSettingByName(String)
public java.util.List<CareSetting> getCareSettings(boolean includeRetired)
getCareSettings
in interface OrderDAO
OrderDAO.getCareSettings(boolean)
public OrderType getOrderTypeByName(java.lang.String orderTypeName)
getOrderTypeByName
in interface OrderDAO
public OrderFrequency getOrderFrequency(java.lang.Integer orderFrequencyId)
getOrderFrequency
in interface OrderDAO
public OrderFrequency getOrderFrequencyByUuid(java.lang.String uuid)
getOrderFrequencyByUuid
in interface OrderDAO
public java.util.List<OrderFrequency> getOrderFrequencies(boolean includeRetired)
getOrderFrequencies
in interface OrderDAO
public java.util.List<OrderFrequency> getOrderFrequencies(java.lang.String searchPhrase, java.util.Locale locale, boolean exactLocale, boolean includeRetired)
getOrderFrequencies
in interface OrderDAO
public OrderFrequency saveOrderFrequency(OrderFrequency orderFrequency)
saveOrderFrequency
in interface OrderDAO
OrderDAO.saveOrderFrequency(org.openmrs.OrderFrequency)
public void purgeOrderFrequency(OrderFrequency orderFrequency)
purgeOrderFrequency
in interface OrderDAO
OrderDAO.purgeOrderFrequency(org.openmrs.OrderFrequency)
public boolean isOrderFrequencyInUse(OrderFrequency orderFrequency)
OrderDAO
isOrderFrequencyInUse
in interface OrderDAO
orderFrequency
- the order frequencyOrderDAO.isOrderFrequencyInUse(org.openmrs.OrderFrequency)
public OrderFrequency getOrderFrequencyByConcept(Concept concept)
getOrderFrequencyByConcept
in interface OrderDAO
OrderDAO.getOrderFrequencyByConcept(org.openmrs.Concept)
public OrderType getOrderType(java.lang.Integer orderTypeId)
getOrderType
in interface OrderDAO
public OrderType getOrderTypeByUuid(java.lang.String uuid)
getOrderTypeByUuid
in interface OrderDAO
public java.util.List<OrderType> getOrderTypes(boolean includeRetired)
getOrderTypes
in interface OrderDAO
public OrderType getOrderTypeByConceptClass(ConceptClass conceptClass)
getOrderTypeByConceptClass
in interface OrderDAO
OrderDAO.getOrderTypeByConceptClass(org.openmrs.ConceptClass)
public OrderType saveOrderType(OrderType orderType)
saveOrderType
in interface OrderDAO
OrderService.saveOrderType(org.openmrs.OrderType)
public void purgeOrderType(OrderType orderType)
purgeOrderType
in interface OrderDAO
OrderService.purgeOrderType(org.openmrs.OrderType)
public java.util.List<OrderType> getOrderSubtypes(OrderType orderType, boolean includeRetired)
getOrderSubtypes
in interface OrderDAO
OrderService.getSubtypes(org.openmrs.OrderType, boolean)
public boolean isOrderTypeInUse(OrderType orderType)
OrderDAO
isOrderTypeInUse
in interface OrderDAO
orderType
- the order type to check the usageCopyright © 2018 OpenMRS Inc.. All Rights Reserved.