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

Null Pointer Exception for some DrugOrders

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Must
    • Resolution: Fixed
    • Platform 1.10.0, Platform 1.10.1
    • Platform 1.10.2
    • Order Entry
    • None

    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.

      Gliffy Diagrams

        Attachments

          Activity

            People

              aclarke Andrew Clarke
              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