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

Null Pointer Exception for some DrugOrders

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Must
    • Resolution: Fixed
    • Affects Version/s: Platform 1.10.0, Platform 1.10.1
    • Fix Version/s: Platform 1.10.2
    • Component/s: Order Entry
    • Labels:
      None
    • Complexity:
      Low

      Description

      To stop a DrugOrder, there is logic in the OrderService provided by OpenMRS to make sure you haven't changed the underlying drug. Unfortunately, the OpenMRS OrderService throws a Null Pointer if there is no drug on the drug order (even if there is a concept on the drug order).

      It looks like I can remove lines 178-180 from the OrderServiceImpl, since the logic is duplicated at lines 184-192, with an appropriate null check (https://github.com/openmrs/openmrs-core/blob/1.10.x/api/src/main/java/org/openmrs/api/impl/OrderServiceImpl.java#L178).

      It should be valid to have a DrugOrder that has a Concept but no Drug.

        Attachments

          Activity

            People

            Assignee:
            aclarke Andrew Clarke
            Reporter:
            aclarke Andrew Clarke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified