How to create a custom lab order composed of several suborders?

@dev In our implementation we would like to provide doctors with lab order templates (e.g., a CBC panel) that contain a predefined list of analytes. So far, defining CBC as a set of concepts is fine.

However, our requirement is slightly more advanced: we would like to let the doctor select a template such as CBC, and then choose only a subset of the analytes in that template (e.g., order only Hemoglobin and Platelets, not the full CBC), ideally creating a grouped order in the backend.

Is this currently supported or recommended in OpenMRS (especially in OpenMRS 3 / SPA)?

Concretely:

  1. Can we create an order group from a predefined template (concept set / order set)?

  2. Is there any existing O3 UI support to:

    • load a template (e.g., CBC panel),

    • display the individual analytes,

    • let the doctor select a subset,

    • and then submit those as a grouped set of TestOrders?

If not supported out of the box, what is the recommended approach (concept sets, order sets, custom O3 form/microfrontend, etc.) to achieve this behavior?

Hi @amirbuzo , this is a use case that comes up fairly often when dealing with lab panels.

Defining a CBC (or any panel) as a concept set is perfectly aligned with how OpenMRS handles panels. A concept set can represent the template, and the individual TestOrders concepts are its set members. However, ordering only a subset of a panel is not something OpenMRS treats as a built-in pattern. In standard OpenMRS, a panel is usually ordered as a whole, and individual/partial TestOrder results can optionally be returned for the panel.

Out of the box, O3 does not currently have a UI flow that supports this. At the moment, the used O3 Lab Order form assumes single-tests or standard panels, not partial panels.

I guess most implementations needing partial-panel ordering do one of the following:

Option AUse Concept Sets + Custom O3 form/microfrontend: Likely the more easier approach. You can use the O3 form engine or build a small microfrontend that; loads the concept set via the Concept API, renders checkboxes for tests, posts the selected tests as an OrderGroup.

Option BUse Order Sets (if you want reusable templates) + custom UI: Since Order Sets in the backend can represent templates, you’d build a similar small UI to allow selection and then place the individual tests in an OrderGroup.

1 Like

@amirbuzo are you looking at something like this ?

Have also had a similar concern, physicians are interested in a long list of options where they just check the required option and submit the order at last. They find it easier

My approach has been essentially to modify the order-app under openmrs-esm-patient-chart-app, but now next problem is as probably to be handled by concept API because most of the questions are not availble. Mine would essentially add those custom tests and add them to the Test order basket then continue with the next workflow.

Could we continue this and find the best approach.

cc @dkigen / @ibacher

1 Like

Thank you we are looking of something similar! But this is very helpful to give the medic the option to select what he needs from lab order or drug orders concepts. :folded_hands: How do you store all the selected concepts in the back ends, as an order group grouped by an order id, or as several orders?