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

Get all Orders in a Visit

    XMLWordPrintable

Details

    • Undetermined

    Description

      I am creating a UI where I want to show an "order sheet" of all orders that were placed during any encounter in the visit that the user is looking at now. Right now I have to get the orders out of each encounter in the visit, but the API (both Java and REST) should support getting all the orders in a visit via a single query.

      Dev Notes

      While implementing this ticket, we should introduce a class for OrderSearchCriteria, and introduce a new method

      OrderService.getOrders(OrderSearchCriteria)

      This will allow us to progressively add new query parameters without an exploding number of service methods.

      In the first pass, I only care about supporting "visit", but we might as well support:

      • patient
      • visits (list)
      • encounters (list)
      • orderType
      • careSetting
      • active (or else status="active")
      • includeVoided (default false)

      I would have the search method fail if it doesn't specify one of patient, visits, or encounters. (I.e. we don't need/want to support "get me all outpatient radiology orders in the whole database", at least not for my purposes.)

      Backporting

      At PIH we need this backported to the 1.10.x branch.

      Gliffy Diagrams

        Attachments

          Activity

            People

              Unassigned Unassigned
              darius Darius Jazayeri
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: