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

Allow saving orders with a future scheduled date

    XMLWordPrintable

    Details

      Description

      The current validations in Order entry uses start_date(date_activated) and auto_expire_date to check if drugs orders overlap. To support drug orders in future date it should also consider scheduled_date and urgency.

      Notes from : http://notes.openmrs.org/Design-Forum-2014-07-28

      Summary: we do not allow overlapping time frames, defined by
      start of period = drugOrder.urgency == SCHEDULED ? drugOrder.dateScheduled : drugOrder.dateActivated
      end of period = drugOrder.dateStopped ? drugOrder.dateStopped : drugOrder.autoExpireDate (where null means "it goes forever")

      An order is active from date_activated through (date_stopped OR auto_expire_date)
      An order is started as of scheduled_date OR date_activated

      Proposal for using scheduled date:
      https://talk.openmrs.org/t/proposal-on-how-to-manage-start-date-for-orders/443
      Described on Order Uniqueness Constraints:
      https://wiki.openmrs.org/x/GYCMAw

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                bharti Bharti Nagpal
                Reporter:
                endeepak Deepak N
                Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 5 hours Original Estimate - 5 hours
                    5h
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 day, 7 hours
                    1d 7h