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.
While implementing this ticket, we should introduce a class for OrderSearchCriteria, and introduce a new method
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:
- visits (list)
- encounters (list)
- 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.)
At PIH we need this backported to the 1.10.x branch.