Details
-
New Feature
-
Status: Closed
-
Should
-
Resolution: Fixed
-
None
-
Low
Description
Per discussion on Design Forum 2015-04-29 ...
Generally, we want to push people to discontinue a specific order, not to generically "discontinue Warfarin" and count on the API to figure out which active Warfarin order to discontinue.
The current code does allow discontinuing by concept (rather than by order), and we want to continue supporting this in most cases.
However we should change the current implementation so that if there are multiple active orders for the given concept, and thus "discontinue <Concept>" is ambiguous, we throw an AmbiguousOrderException exception, instead of just discontinuing the first one.
Example
A patient has two active drug orders:
- Paracetamol 250mg tablet: take one tablet twice a day, for 7 days
- Amoxicillin, 500mg tablets: take one tablet daily with meals, for 5 days
At this point, if the doctor places the order action:discontinue, concept:Paracetamol, we can safely know that they are referring to a specific order (the only active order for Paracetamol) and we can discontinue this order.
Now consider the scenario where we add one additional order to the two previous ones:
- Paracetamol 250mg tablet: take one tablet twice a day, for 7 days
- Amoxicillin, 500mg tablets: take one tablet daily with meals, for 5 days
- (this is new) Paracetamol 500mg tablets, take one tablet as needed for pain, not to exceed (blah blah blah)
At this point, if the clinician places the same order action:discontinue, concept:Paracetamol, this order is ambiguous, because we don't know if this means to stop both of the paracetamols, just the first, or just the second. This ambiguous order should not be allowed.
Dev Notes
This should happen near here in the code.
Gliffy Diagrams
Attachments
Issue Links
- caused
-
TRUNK-5210 OrderServiceTest failure
-
- Closed
-