Details

    • Low
    • Order Entry 1.10 Iteration 2, Order Entry 1.10 Iteration 3

    Description

      • Add liquibase changeset(s) to convert the datatype of drug_order.frequency to int (fk to order_frequency.order_frequency_id)
      • Auto generate order frequencies for all existing text frequencies as mapped by the OpenmrsConstants.GP_ORDER_ENTRY_UNITS_TO_CONCEPTS_MAPPINGS global property.
      • Add another changeset to convert existing frequencies to match respective entries in order_frequency table via the OpenmrsConstants.GP_ORDER_ENTRY_UNITS_TO_CONCEPTS_MAPPINGS global property.
      • Add a separate changeset to add the fk constraint from drug_order.frequency to order_frequency.order_frequency_id
      • Change DrugOrder.frequency to be of type OrderFrequency, deprecate the old setters/getters and delegate to the new ones, you will need to add some logic to the old getters/setters that returns a meaningful string value as the frequency using the OrderFrequency property
      • Update Order.hbm.xml(see joined-subclass tag that maps to DrugOrder) file to match the changes above.
      • Update DrugOrder.copyHelper() to take care of the new properties

      DEV NOTES:

      • See an example of how to add to do the conversion via a custom changeset at 2e3c7cf50dfe292f3915afe61aeb9650c84714ef
      • You can use DatabaseUtil.getConceptIdForUnits(..) to fetch the conceptId from the global property value

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                raff Rafal Korytkowski
                wyclif Wyclif Luyima
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Time Tracking

                    Estimated:
                    Original Estimate - 1 day Original Estimate - 1 day
                    1d
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 2 days
                    2d