Do you use or administer OpenEMR? Take the General Satisfaction Survey to help improve the product

Cannot resolve patient match for incoming HL7 result

Using ‘procedures’-‘electronic reports’, I normally import HL7 files coming from our own diagnostic devices or from external labs. Been working perfectly fine so far. However, recently I have encountered several reports that are not imported and that are listed on top of the page as “incoming results requiring attention”.
I understand I can click on the individual messages and link the correct patient, which I do, and then click the “resolve orphan results”. This refreshes the page, but the messages remain and are not processed.
I find little to no information on this issue on the internet, so after a long time searching and trying to solve it myself, I offer the matter up for consideration here. Any help would be appreciated.

OpenEMR Version
I’m using OpenEMR version 5.0.2

I’m using: Chrome

Operating System
I’m using: server on Ubuntu 20.04, client Windows 10

The logs contain entries for select queries, mainly from patient_data and form_encounter, but no updates or inserts, which I would expect

have you tried clicking Submit after matching instead of Orphaned?

There is no submit button, only the “resolve orphan results” button. When I look into the source file, I gather the button changes its label depending on whether there are lines to resolve, but my skill with php is not good enough to truly fathom what is going on exactly.

I’m pretty sure orphan orders are broken because I had to fix them up in my lab module.
What should happen is when an orphan is found you should be able to click the orhan in top pane where a patient finder should pop up to see if the patient in the order had different criteria. From there you should have a chance to create a new patient and an encounter with the order will be created.

How it works now i’m unsure.

Orphaned order should be rare unless you have just started with a lab where they are sending pending orders from previously manual or by phone submission.

Can you give me any pointers on how to fix them? The orphans just popped up recently, whereas with earlier results, they were picked up without a hitch. These are existing patients in the EMR and when I use the patient finder, OpenEMR finds the right patient straight away.
To be clear, we don’t send out orders from the EMR; we take in unsollicited results. This may have a bearing on the problem.

The orphan prob doesn’t have an encounter or the wrong encounter depending on which lab or how the result is sent back. Lab could have had a foo pah and would be advisable to look at raw result to see what has changed from a normal working result.

Thank you for that insight. I’ll check if anything is wrong with the encounter and let you know.

When I said encounter; I meant order id associated with an encounter and depending how you order labs, that I can’t help with!

think there’s a bug for results only as well, sorry :slight_smile:, will keep the Raid™ handy

1 Like

nawww, how could that be!

1 Like


I’ve done a lot of testing and it turns out that the issue is linked to the order number. Even though I didn’t send out actual orders, the ORU came back with an order number filled in, which resulted in a failed match.
Fixed the issue in Mirth and we’re all smiles again.

Thanks for the hints that made me look in the right direction.


So you know. I’m updating the Electronic Reports handling orphans with better matching, auto creates encounter and sends notification to patient chart.
Trying to get in first v6 patch.

1 Like