Details
-
Story
-
Status: Closed
-
Must
-
Resolution: Fixed
-
None
-
Low
-
Order Entry 1.10 Iteration 2, Order Entry 1.10 Iteration 3
Description
User Story
As a user, i would like to revise an existing order
Dev Notes
- Add a convenience method to Order class e.g. copyForRevision() that technically clones the original order, sets the status and previousOrder fields on the clone.
- Add saveRevisedOrder() method to OrderService, takes in a new order with an action of REVISE or sets it if null and reject the order if it is set to anything else, should require it to have a previous order. Should NOT set encounter. Can't revise a discontinuation order(one that has action of DISCONTINUE)
EA-1needs to worked as part of this effort
As a dev i should be able to do this:
DrugOrder original = // something // We wouldn't want to use copy because we don't want to copy fields from BaseOpenmrsData e.g creator. dateCreated etc, also // fields that are too specific to a single order can't also be copied over e.g. previousOrder, dateStopped etc. DrugOrder revised = original.cloneForRevision(); revised.setDosage(100, milligrams); orderService.saveOrder(revised);
...which is a shortcut for...
DrugOrder original = // something DrugOrder revised = new DrugOrder(); revised.setAction(OrderAction.REVISE); revised.setPreviousOrder(original); revised.setDosage(100, milligrams); // copy other properties from original to revised orderService.saveOrder(revised);
Gliffy Diagrams
Attachments
Issue Links
- is depended on by
-
TRUNK-4173 Refactor OrderService.getOrders
-
- Closed
-
-
EA-1 Add support for placing, discontinuing and revising orders via REST
-
- Closed
-