|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.api.impl.BaseOpenmrsService org.openmrs.api.impl.OrderServiceImpl
public class OrderServiceImpl
Default implementation of the Order-related services class. This method should not be invoked by itself. Spring injection is used to inject this implementation into the ServiceContext. Which implementation is injected is determined by the spring application context file: /metadata/api/spring/applicationContext.xml
OrderService
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.openmrs.api.OrderService |
---|
OrderService.ORDER_STATUS |
Field Summary | |
---|---|
protected OrderDAO |
dao
|
protected org.apache.commons.logging.Log |
log
|
Fields inherited from interface org.openmrs.api.OrderService |
---|
SHOW_ALL, SHOW_COMPLETE, SHOW_CURRENT, SHOW_NOTVOIDED |
Constructor Summary | |
---|---|
OrderServiceImpl()
|
Method Summary | ||
---|---|---|
void |
createOrder(Order order)
Deprecated. |
|
void |
createOrdersAndEncounter(Patient p,
java.util.Collection<Order> orders)
TODO: Refactor, generalize, or remove this method |
|
void |
createOrderType(OrderType orderType)
Deprecated. |
|
void |
deleteOrder(Order order)
Deprecated. |
|
void |
deleteOrderType(OrderType orderType)
Deprecated. |
|
void |
discontinueAllOrders(Patient patient,
Concept discontinueReason,
java.util.Date discontinueDate)
Deprecated. use OrderUtil.discontinueAllOrders(Patient, Concept, Date) |
|
void |
discontinueDrugSet(Patient patient,
java.lang.String drugSetId,
Concept discontinueReason,
java.util.Date discontinueDate)
Deprecated. use OrderUtil.discontinueDrugSet(Patient, String, Concept, Date) |
|
Order |
discontinueOrder(Order order,
Concept discontinueReason,
java.util.Date discontinueDate)
Mark the given order as discontinued. |
|
java.util.List<OrderType> |
getAllOrderTypes()
Get all order types, including retired ones |
|
java.util.List<OrderType> |
getAllOrderTypes(boolean includeRetired)
Get all order types, only showing ones not marked as retired if includeRetired is true |
|
DrugOrder |
getDrugOrder(java.lang.Integer drugOrderId)
Deprecated. |
|
java.util.List<DrugOrder> |
getDrugOrders()
Deprecated. This is a dumb method |
|
java.util.List<DrugOrder> |
getDrugOrdersByPatient(Patient patient)
Get all orders for the given patient |
|
java.util.List<DrugOrder> |
getDrugOrdersByPatient(Patient patient,
int whatToShow)
Deprecated. |
|
java.util.List<DrugOrder> |
getDrugOrdersByPatient(Patient patient,
int whatToShow,
boolean includeVoided)
Deprecated. |
|
java.util.List<DrugOrder> |
getDrugOrdersByPatient(Patient patient,
OrderService.ORDER_STATUS orderStatus)
Get drug orders for a given patient, not including voided orders |
|
java.util.List<DrugOrder> |
getDrugOrdersByPatient(Patient patient,
OrderService.ORDER_STATUS orderStatus,
boolean includeVoided)
Get drug orders for a given patient |
|
java.util.Map<java.lang.String,java.lang.String> |
getDrugSetHeadersByDrugSetIdList(java.lang.String drugSetIds)
Deprecated. use OrderUtil.getDrugSetHeadersByDrugSetIdList(String) |
|
java.util.Map<Concept,java.util.List<DrugOrder>> |
getDrugSetsByConcepts(java.util.List<DrugOrder> drugOrders,
java.util.List<Concept> drugSets)
Deprecated. use OrderUtil.getDrugSetsByConcepts(List, List) |
|
java.util.Map<java.lang.String,java.util.List<DrugOrder>> |
getDrugSetsByDrugSetIdList(java.util.List<DrugOrder> orderList,
java.lang.String drugSetIdList,
java.lang.String delimiter)
Deprecated. use OrderUtil.getDrugSetsByDrugSetIdList(List, String, String) |
|
Order |
getOrder(java.lang.Integer orderId)
Get order by internal primary key identifier |
|
|
getOrder(java.lang.Integer orderId,
java.lang.Class<o> orderClassType)
Gets the order with the associated order id |
|
Order |
getOrderByUuid(java.lang.String uuid)
Get Order by its UUID |
|
java.util.List<Order> |
getOrders()
Deprecated. This is a dumb method |
|
|
getOrders(java.lang.Class<Ord> orderClassType,
java.util.List<Patient> patients,
java.util.List<Concept> concepts,
OrderService.ORDER_STATUS status,
java.util.List<User> orderers,
java.util.List<Encounter> encounters,
java.util.List<OrderType> orderTypes)
This searches for orders given the parameters. |
|
java.util.List<Order> |
getOrdersByEncounter(Encounter encounter)
Gets all orders contained in an encounter |
|
java.util.List<Order> |
getOrdersByPatient(Patient patient)
Get all orders by Patient |
|
java.util.List<Order> |
getOrdersByUser(User user)
Get all orders by the User that is marked as their orderer |
|
OrderType |
getOrderType(java.lang.Integer orderTypeId)
Get orderType by internal identifier |
|
OrderType |
getOrderTypeByUuid(java.lang.String uuid)
Get OrderType by its UUID |
|
java.util.List<OrderType> |
getOrderTypes()
Deprecated. |
|
java.util.List<RegimenSuggestion> |
getStandardRegimens()
The standard regimens are currently stored in the application context file. |
|
void |
purgeOrder(Order order)
Completely delete an order from the database. |
|
void |
purgeOrder(Order order,
boolean cascade)
|
|
void |
purgeOrderType(OrderType orderType)
Completely delete the order type from the system. |
|
OrderType |
retireOrderType(OrderType orderType,
java.lang.String reason)
This method essentially takes the given orderType out of active use in OpenMRS. |
|
Order |
saveOrder(Order order)
Save or update the given order in the database |
|
OrderType |
saveOrderType(OrderType orderType)
Save or update the given orderType in the database |
|
void |
setOrderDAO(OrderDAO dao)
Setter for the Order data access object. |
|
Order |
undiscontinueOrder(Order order)
Un-discontinue order record. |
|
OrderType |
unretireOrderType(OrderType orderType)
This will bring back a previously decommissioned OrderType |
|
Order |
unvoidOrder(Order order)
Unvoid order record. |
|
void |
updateOrder(Order order)
Deprecated. |
|
void |
updateOrderType(OrderType orderType)
Deprecated. |
|
void |
voidDrugSet(Patient patient,
java.lang.String drugSetId,
java.lang.String voidReason,
int whatToVoid)
Deprecated. use OrderUtil.voidDrugSet(Patient, String, String, org.openmrs.api.OrderService.ORDER_STATUS) |
|
Order |
voidOrder(Order order,
java.lang.String voidReason)
Mark an order as voided. |
Methods inherited from class org.openmrs.api.impl.BaseOpenmrsService |
---|
onShutdown, onStartup |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.openmrs.api.OpenmrsService |
---|
onShutdown, onStartup |
Field Detail |
---|
protected final org.apache.commons.logging.Log log
protected OrderDAO dao
Constructor Detail |
---|
public OrderServiceImpl()
Method Detail |
---|
public void setOrderDAO(OrderDAO dao)
OrderService
setOrderDAO
in interface OrderService
dao
- The data access object to useOrderService.setOrderDAO(org.openmrs.api.db.OrderDAO)
public Order saveOrder(Order order) throws APIException
OrderService
order
in the database
saveOrder
in interface OrderService
order
- the Order to save
APIException
OrderService.saveOrder(org.openmrs.Order)
@Deprecated public void createOrder(Order order) throws APIException
createOrder
in interface OrderService
APIException
OrderService.createOrder(org.openmrs.Order)
@Deprecated public void updateOrder(Order order) throws APIException
updateOrder
in interface OrderService
APIException
OrderService.updateOrder(org.openmrs.Order)
@Deprecated public void deleteOrder(Order order) throws APIException
deleteOrder
in interface OrderService
APIException
OrderService.deleteOrder(org.openmrs.Order)
public void purgeOrder(Order order) throws APIException
OrderService
OrderService.voidOrder(Order, String)
purgeOrder
in interface OrderService
order
- The Order to remove from the system
APIException
OrderService.purgeOrder(org.openmrs.Order)
public void purgeOrder(Order order, boolean cascade) throws APIException
APIException
OrderService.purgeOrder(Order)
public Order voidOrder(Order order, java.lang.String voidReason) throws APIException
OrderService
voidOrder
in interface OrderService
order
- Order to voidvoidReason
- String reason
APIException
OrderService.voidOrder(org.openmrs.Order, java.lang.String)
public Order unvoidOrder(Order order) throws APIException
OrderService
OrderService.voidOrder(Order, String)
unvoidOrder
in interface OrderService
order
- order to be unvoided
APIException
OrderService.unvoidOrder(org.openmrs.Order)
public Order discontinueOrder(Order order, Concept discontinueReason, java.util.Date discontinueDate) throws APIException
OrderService
OrderService.voidOrder(Order, String)
method should
probably be used.
discontinueOrder
in interface OrderService
order
- Order to discontinuediscontinueReason
- String reason for discontinuing this order
APIException
OrderService.discontinueOrder(org.openmrs.Order, org.openmrs.Concept,
java.util.Date)
public Order undiscontinueOrder(Order order) throws APIException
OrderService
OrderService.discontinueOrder(Order, Concept, Date)
undiscontinueOrder
in interface OrderService
order
- order to be un-discontinued
APIException
OrderService.undiscontinueOrder(org.openmrs.Order)
public OrderType saveOrderType(OrderType orderType) throws APIException
OrderService
orderType
in the database
saveOrderType
in interface OrderService
orderType
- The OrderType to save in the database
APIException
OrderService.saveOrderType(org.openmrs.OrderType)
@Deprecated public void createOrderType(OrderType orderType) throws APIException
createOrderType
in interface OrderService
APIException
OrderService.createOrderType(org.openmrs.OrderType)
@Deprecated public void updateOrderType(OrderType orderType) throws APIException
updateOrderType
in interface OrderService
APIException
OrderService.updateOrderType(org.openmrs.OrderType)
@Deprecated public void deleteOrderType(OrderType orderType) throws APIException
deleteOrderType
in interface OrderService
APIException
OrderService.deleteOrderType(org.openmrs.OrderType)
public OrderType retireOrderType(OrderType orderType, java.lang.String reason) throws APIException
OrderService
orderType
out of active use in OpenMRS.
All references to this order type will remain in place. Future use of this order type are
discouraged.
retireOrderType
in interface OrderService
orderType
- the order type to retiredreason
- The reason this order type is being taken our of commission.
APIException
OrderService.retireOrderType(OrderType, String)
public OrderType unretireOrderType(OrderType orderType) throws APIException
OrderService
unretireOrderType
in interface OrderService
orderType
- the order type to unretire
APIException
OrderService.unretireOrderType(org.openmrs.OrderType)
public void purgeOrderType(OrderType orderType) throws APIException
OrderService
purgeOrderType
in interface OrderService
APIException
OrderService.purgeOrderType(org.openmrs.OrderType)
public void createOrdersAndEncounter(Patient p, java.util.Collection<Order> orders) throws APIException
createOrdersAndEncounter
in interface OrderService
p
- the patient to add Orders toorders
- The Orders to add to the Patient (and to the makeshift Encounter)
APIException
- if there is no User with username Unknown or no Location with name
Unknown or Unknown Location, or if there's no encounter type with name 'Regimen
Change'OrderService.createOrdersAndEncounter(org.openmrs.Patient,
java.util.Collection)
public Order getOrder(java.lang.Integer orderId) throws APIException
OrderService
getOrder
in interface OrderService
orderId
- internal order identifier
APIException
OrderService.getOrder(java.lang.Integer)
@Deprecated public DrugOrder getDrugOrder(java.lang.Integer drugOrderId) throws APIException
getDrugOrder
in interface OrderService
APIException
OrderService.getDrugOrder(java.lang.Integer)
public <o extends Order> o getOrder(java.lang.Integer orderId, java.lang.Class<o> orderClassType) throws APIException
OrderService
getOrder
in interface OrderService
o
- An Order type. Currently only org.openmrs.Order or org.openmrs.DrugOrderorderId
- the primary key of the OrderorderClassType
- The class of Order to fetch (Currently only org.openmrs.Order or
org.openmrs.DrugOrder)
APIException
OrderService.getOrder(java.lang.Integer, java.lang.Class)
@Deprecated public java.util.List<Order> getOrders() throws APIException
getOrders
in interface OrderService
APIException
@Deprecated public java.util.List<DrugOrder> getDrugOrders() throws APIException
getDrugOrders
in interface OrderService
APIException
public <Ord extends Order> java.util.List<Ord> getOrders(java.lang.Class<Ord> orderClassType, java.util.List<Patient> patients, java.util.List<Concept> concepts, OrderService.ORDER_STATUS status, java.util.List<User> orderers, java.util.List<Encounter> encounters, java.util.List<OrderType> orderTypes)
OrderService
getOrders
in interface OrderService
orderClassType
- The type of Order to get (currently only options are Order and
DrugOrder)patients
- The patients to get orders forconcepts
- The concepts in order.getConcept to get orders forstatus
- The ORDER_STATUS of the orders for its patientorderers
- The users/orderers of theencounters
- The encounters that the orders are assigned toorderTypes
- The OrderTypes to match on
OrderService.getOrders(java.lang.Class, java.util.List, java.util.List,
org.openmrs.api.OrderService.ORDER_STATUS, java.util.List, java.util.List,
java.util.List)
public java.util.List<Order> getOrdersByUser(User user) throws APIException
OrderService
getOrdersByUser
in interface OrderService
APIException
OrderService.getOrdersByUser(org.openmrs.User)
public java.util.List<Order> getOrdersByPatient(Patient patient) throws APIException
OrderService
getOrdersByPatient
in interface OrderService
APIException
OrderService.getOrdersByPatient(org.openmrs.Patient)
@Deprecated public java.util.List<DrugOrder> getDrugOrdersByPatient(Patient patient, int whatToShow)
getDrugOrdersByPatient
in interface OrderService
OrderService.getDrugOrdersByPatient(org.openmrs.Patient, int)
@Deprecated public java.util.List<DrugOrder> getDrugOrdersByPatient(Patient patient, int whatToShow, boolean includeVoided)
getDrugOrdersByPatient
in interface OrderService
OrderService.getDrugOrdersByPatient(org.openmrs.Patient, int, boolean)
public java.util.List<DrugOrder> getDrugOrdersByPatient(Patient patient, OrderService.ORDER_STATUS orderStatus, boolean includeVoided)
OrderService
getDrugOrdersByPatient
in interface OrderService
patient
- the owning Patient of the returned ordersorderStatus
- the status of the orders returnedincludeVoided
- true/false whether or not to include voided drug orders
OrderService.getDrugOrdersByPatient(org.openmrs.Patient,
org.openmrs.api.OrderService.ORDER_STATUS, boolean)
public java.util.List<DrugOrder> getDrugOrdersByPatient(Patient patient, OrderService.ORDER_STATUS orderStatus)
OrderService
getDrugOrdersByPatient
in interface OrderService
OrderService.getDrugOrdersByPatient(org.openmrs.Patient,
org.openmrs.api.OrderService.ORDER_STATUS)
@Deprecated public java.util.List<OrderType> getOrderTypes() throws APIException
OrderService
getOrderTypes
in interface OrderService
APIException
OrderService.getOrderTypes()
public java.util.List<OrderType> getAllOrderTypes() throws APIException
OrderService
getAllOrderTypes
in interface OrderService
APIException
OrderService.getAllOrderTypes()
public java.util.List<OrderType> getAllOrderTypes(boolean includeRetired) throws APIException
OrderService
getAllOrderTypes
in interface OrderService
includeRetired
- true/false whether to include retired orderTypes in this list
APIException
OrderService.getAllOrderTypes(boolean)
public OrderType getOrderType(java.lang.Integer orderTypeId) throws APIException
OrderService
getOrderType
in interface OrderService
APIException
OrderService.getOrderType(java.lang.Integer)
public java.util.List<DrugOrder> getDrugOrdersByPatient(Patient patient) throws APIException
OrderService
patient
getDrugOrdersByPatient
in interface OrderService
APIException
OrderService.getDrugOrdersByPatient(org.openmrs.Patient)
public java.util.List<RegimenSuggestion> getStandardRegimens()
OrderService
getStandardRegimens
in interface OrderService
OrderService.getStandardRegimens()
@Deprecated public java.util.Map<Concept,java.util.List<DrugOrder>> getDrugSetsByConcepts(java.util.List<DrugOrder> drugOrders, java.util.List<Concept> drugSets) throws APIException
OrderUtil.getDrugSetsByConcepts(List, List)
getDrugSetsByConcepts
in interface OrderService
APIException
OrderService.getDrugSetsByConcepts(java.util.List, java.util.List)
@Deprecated public java.util.Map<java.lang.String,java.util.List<DrugOrder>> getDrugSetsByDrugSetIdList(java.util.List<DrugOrder> orderList, java.lang.String drugSetIdList, java.lang.String delimiter)
OrderUtil.getDrugSetsByDrugSetIdList(List, String, String)
getDrugSetsByDrugSetIdList
in interface OrderService
OrderService.getDrugSetsByDrugSetIdList(java.util.List,
java.lang.String, java.lang.String)
@Deprecated public java.util.Map<java.lang.String,java.lang.String> getDrugSetHeadersByDrugSetIdList(java.lang.String drugSetIds)
OrderUtil.getDrugSetHeadersByDrugSetIdList(String)
getDrugSetHeadersByDrugSetIdList
in interface OrderService
OrderService.getDrugSetHeadersByDrugSetIdList(java.lang.String)
@Deprecated public void discontinueDrugSet(Patient patient, java.lang.String drugSetId, Concept discontinueReason, java.util.Date discontinueDate)
OrderUtil.discontinueDrugSet(Patient, String, Concept, Date)
discontinueDrugSet
in interface OrderService
OrderService.discontinueDrugSet(org.openmrs.Patient, java.lang.String,
org.openmrs.Concept, java.util.Date)
@Deprecated public void voidDrugSet(Patient patient, java.lang.String drugSetId, java.lang.String voidReason, int whatToVoid)
OrderUtil.voidDrugSet(Patient, String, String, org.openmrs.api.OrderService.ORDER_STATUS)
voidDrugSet
in interface OrderService
OrderService.voidDrugSet(Patient, String, String, int)
@Deprecated public void discontinueAllOrders(Patient patient, Concept discontinueReason, java.util.Date discontinueDate)
OrderUtil.discontinueAllOrders(Patient, Concept, Date)
discontinueAllOrders
in interface OrderService
OrderService.discontinueAllOrders(org.openmrs.Patient,
org.openmrs.Concept, java.util.Date)
public Order getOrderByUuid(java.lang.String uuid) throws APIException
OrderService
getOrderByUuid
in interface OrderService
APIException
OrderService.getOrderByUuid(java.lang.String)
public OrderType getOrderTypeByUuid(java.lang.String uuid) throws APIException
OrderService
getOrderTypeByUuid
in interface OrderService
APIException
OrderService.getOrderTypeByUuid(java.lang.String)
public java.util.List<Order> getOrdersByEncounter(Encounter encounter)
OrderService
getOrdersByEncounter
in interface OrderService
encounter
- the encounter in which to search for orders
OrderService.getOrdersByEncounter(org.openmrs.Encounter)
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |