Details
-
Story
-
Status: Closed
-
TBD
-
Resolution: Fixed
-
None
-
None
-
None
-
Medium
Description
We want to add a "fulfillerStatus" and "fulfillerComment" properties to the Orders object. These will be used to track any updates on the status of an order received from the "filler". As examples, a "filler" could be a dispensing system (either within OpenMRS or external to OpenMRS) that handles dispensing drugs in response to drug orders, or a lab tracking system (again either internal or external) that handles processing specimens and results for lab orders.
"fulfillerStatus" should be an enum with the following possible states:
- received - order fulfiller has received the request
- in_progress
- exception - an error or exception occurred during processing
- completed - the request has been completed by fulfiller
"fulfillerComment" should be a string/varchar (1024)
Design Notes:
- Both be status should be mutable, so need to update this array: https://github.com/openmrs/openmrs-core/blob/f91198cfcaec7547234d98182fda8e2bd4f579f8/api/src/main/java/org/openmrs/api/db/hibernate/ImmutableOrderInterceptor.java#L25
- Should support updating status via Java or REST as follows:
- Java: orderService.updateFulfillerStatus(Order order, OrderFulfillerStatus status, String fulfillerComment)
- Should not allow updating of the other fields
TODO: add ticket for implementing this RESTfully as well, likely as a sub resource (see comments from darius : https://talk.openmrs.org/t/adding-order-status-to-orders/17928/24)