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

Add order_type column to orders table

    XMLWordPrintable

    Details

      Description

      • Add a required order_type column to the orders table
      • Add orderType field to Order class and update Order.hbm.xml file
      • Set order_type column for existing orders, use the order types added by TRUNK-4292, all orders with a matching row in the test_order table should have their order_type as test order and those with one in the drug_order table should have theirs set to test_order. If there are any rows with no match in either table(neither drug nor test orders), then the changeset should fail, probably it would be nice to set the order type in a separate changeset where this is the precondition
      • Update OrderService.getOrders(...) and OrderService.getActiveOrders(...) should use OrderType as a parameter, not a java class
      • Change the equivalent methods in the DAO to filter on orderType because to prior to this we ere passing in the Order class object to the DAO to be the root entity for the criteria object.
      • Remember to add a test to Database1_9To1_10UpgradeTest to ensure the changesets are doing the right thing

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                andras Andras Szell
                Reporter:
                wyclif Wyclif Luyima
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 6 hours
                    6h
                    Remaining:
                    Time Spent - 2 hours Remaining Estimate - 30 minutes
                    30m
                    Logged:
                    Time Spent - 2 hours Remaining Estimate - 30 minutes Time Not Required
                    2h