How to indicate to users that a duplicate record exists?

Given that the merge records feature is experimental, and in my experience unusable, what do people do with duplicate records?

I’m wondering whether there is some way to make a very obvious note that a particular record has a duplicate, perhaps using something of these to make it known in a popup notice when selecting a patient record:

Clinical Reminders
Administration > Patients > Patient Reminders
Administration > Practice > Rules
Administration > Practice > Alerts

I’ve never used any of the above before; am just starting to think about this.


If you wish to avoid use of a record, why would you not delete it? Or clean up the record as admin by deleting encounters and issues. Then you can reuse that same record for other patient. It is just a number.

Because the duplicates are in the same instance of OpenEMR, they have different encounter information where different people have used the different records before it was discovered there were duplicates.

And elsewhere the duplicates are in different instances of OpenEMR, where previously there were two separate systems, but now only one is used, and eventually they will need merging.

Any ideas as to better ways to proceed would be gratefully received.

When I say “duplicate record” I mean duplicate patient, not duplicate contents of the patient record.

hi @PeteBoyd, before you try a merge make a backup, let us know if something fails and we’ll fix any bugs like the recent lists_touch fix and change the status of merge patient from experimental to approved for use.

Merge is destructive and not a commonly used feature which is why developer probably called it experimental. But it is pretty straight forward in basically replacing one patient id by other in various tables. Something was probably added later which is why it did not get reflected as your earlier issue noted. But even in that case, you could delete encounter-issue assignment, merge and reattach the assignment until you are ready to put in the patch.
If this happens often, business process and/or training probably needs some revision.

merge patients is commonly used and if is unusable in your instance please post the details here @PeteBoyd

@stephenwaite that’s great to hear that there’s an interest in getting the merge feature improved, I will certainly look at my duplicates and feed things back, thank you. I had no idea it was “commonly used”, I saw it labelled as “experimental”, tried it once and it failed to merge, so gave up on it as I cannot risk using anything labelled “experimental” with PHI. I will get back to you.

I successfully merged 6 patients. Admittedly they didn’t have extensive records, but did include encounters, documents, and custom LBV and API-based forms.

The only issue I have found so far is this: if the source patient is open when selecting “source” in the merge feature; but not if the target is open when selecting the target; and not if the source is open when selecting the target and the source is filled out:

"TypeError: e.currentTarget.contentWindow is null
URL: /library/dialog.js?v=61
Line: 796 Column: 20
Error object: “{}”

1 Like