Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-4363

Allow editing discontinuation orders

    XMLWordPrintable

Details

    Description

      Currently attempting to edit a discontinuation(DC) order fails, this is an order where action is DISCONTINUED, we need to support it. Update ImmutableOrderInterceptor to check for edited DC orders so that it discards the changes on the original order, clones it, voids it and saves the clone as the new DC order. We also need to keep dcOrder.dateStarted == dcOrder.previousOrder.dateStopped, so changing a start date for a D/C order should up the dateStopped on the previous order if one exists.
      TODO:

      • Add a method to OrderService that contains the logic of cloning and voiding a DC order
      • Update ImmutableOrderInterceptor to call the new method above to handler saved/flushed edited DC orders, i.e it should check if the startDate or orderReason or orderReasonNonCoded has changed to call the method above

      Include unit tests.

      DEV NOTES:

      Gliffy Diagrams

        Attachments

          Activity

            People

              wyclif Wyclif Luyima
              wyclif Wyclif Luyima
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Time Spent - 3 hours, 30 minutes Remaining Estimate - 4 hours, 30 minutes
                  4h 30m
                  Logged:
                  Time Spent - 3 hours, 30 minutes Remaining Estimate - 4 hours, 30 minutes
                  3h 30m