O3: Let's move forward on Lab Orders!

Yes, unique to the PIH EMR… ideally, the code would be robust enough so that if a suitable encounter could not be created it wouldn’t continually create it, but it is a real edge case what the PIH Encounter Validator does (behind-the scenes it removes the encounter from the visit).

Yeah, I’ve complained about that behaviour before. It may have been fixed recently.

Does the PIH EMR return some kind of error when this happens? If so, that should be easy enough to fix… I’m not sure where the orders will end up though.

The current situation is definitely not the situation we want to be in long-term. I think we need to investigate exposing encounters as more of something that’s part of the “context” of working in the patient chart, similar to how visits are handled now and then be attaching data (from forms, orders, etc.) to that contextual encounter, but obviously we’re not there yet.

It doesn’t actually return an error, but I wouldn’t worry too much about it, we can work around it. I’m more concerned about the creation of an empty encounter in general. And, yes, having a context (which I know @mseaton has discussed in another post would be my preferred long-term approach).

Take care, Mark

Discussed the O3 refapp behavior today w @vasharma05 who will also contribute to this thread.

Back to Lab Orders: for those interested we’ll be having a preliminary design call this Friday at 4pm EAT / 8am EST at om.rs/zoomo3

Hi @mogoodrich , yes the behaviour was kept with the next iteration for creating an encounter before the order is placed.

The flow in here is:

  1. We checkout for any encounters present in the current visit.
  2. If there’s any encounter, all the orders in the current visit will be mapped to the same encounter.

Yes, the encounter is made beforehand the order is placed, but the upside to this is that the time to save an encounter reduces as compared to creating an encounter when creating an order.

But on a bigger scale, I am ready to work on this.

Thanks @mogoodrich!

CC: @ibacher @mksd

Are we meeting in the next 15 minutes? Thanks!

@ibacher / @vasharma05 did we settle on a workable design that could be implemented soon? And that could make it for 3.0.0-beta.2?

In which case, what’s the ticket for this?

Hi @mksd ! The corresponding ticket as mentioned in previous replies:


PR: (fix) O3-1780: Order Basket - Creates Drug Order Encounter even before Drug Order is saved by vasharma05 · Pull Request #962 · openmrs/openmrs-esm-patient-chart · GitHub

@ibacher @dennis , can you review the PR?


Update on the plan with Lab Orders:

  • UCSF is supporting the design resources, and has engaged Paul Adams to kick off the design & research work. We met on Friday last week to lay out the kick-off requirements with several orgs.
  • This week Paul A has made some progress but was waiting on some resources and calls with providers which happened late this week.
  • So we will have an open review on Monday Feb 6 at the weekly O3 Design Call for community review and feedback on Paul’s first round of designs.