All patients that were merged are displayed in the Active tab of clinical module

Hello folks,

I tried to merge patients whose visit had closed. The merge had been successful. Now, when I start the visit for the merged patients, I can see the following under the “Active tab” in the clinical module

  1. Patients with same patient Identifier but different names
  2. The details of the both the patient that was part of the merge .

![Screenshot 2021-07-19 at 1.50.39 PM|690x119](upload://2kFagN

G9O3C1voCunTsXQqPZsAb.png)

Kindly, let me know if there are any consequences for this or if this needs to be fixed. Right now, I observed that clicking on any of these patients takes me to the preferred patient that was selected for the merge. Thanks!
cc @akhilmalhotra @gsluthra @angshuonline

Can you provide some more details on steps you took to perform the merge? (And which version of Bahmni/OpenMRS)?

Sure @gsluthra Steps to replicate

  1. Create two patients in Bahmni (can be same name or different). Example : patient A, patient B
  2. Close the visits for the patients
  3. Go to OpenMRS->Administration->Patients-> Find patients to merge
  4. Enter the Patient identifiers of those two patients separated by commas
  5. Merge the patients choosing any one of them as the preferred (example, patient A).

Now,

→ Go to registration and start the visit for Patient A → Navigate to Clinical module → Under Active, both Patient A and Patient B (different patient identifier) can be seen as “Active”

Now, If a 3rd patient (patient C) is merged to the already merged record of Patient A and Patient B, then in the Active tab of Clinical module :

→ patient C appears thrice in the “active” conditions → Patient C has patient identifiers of 1. Own identifier 2. Patient A identifier 3. Patient B identifier.

However, on the click of any of these records, it is redirected to the preferred merged record. Bahmni version 0.93

This seems to be related to how the list of active patients is being populated rather than a problem with the merge functionality per se since it seems to be working as intended.

1 Like

If there is some attribute/flag that is set on merged records (like voided=true), then the Active patient queue (SQL) can ensure it excludes such merged patients (so that only the original is shown). @abhinab - Maybe you can add a story in Bahmni backlog for this, with steps to reproduce this?

Sure @gsluthra . Will do that