BUG in Bahmni-UI multiple patients with same identifiers

Dears,

I’ve been using Bahmni for quite already. Currently one of the tasks I am performing in it is Load & Stress Testing of it based on how it handles multiple concurrent users. One of the bugs (I’d call it like that in my opinion) that I’ve interacted with is as follows.

For testing it, I’m using JMeter. For the script I am using BlazeMeter for recording the scenario which afterwards I upload in JMeter and execute with multiple threads (concurrent users).

Scenario 1: The first scenario I wanted to test my instance with, is logging in Bahmni (superman/Admin123) and registering a patient (John Wick) and initiating a visit.

After uploading the scenario (JMX file) to the JMeter the way JMeter handles it is like this:
In JMeter I can specify the number of threads e.g. 10 (10 concurrent users) and after executing it in JMeter the Bahmni will recognize it as one user (superman) logging in → registering a patient (John Wick) 10 times.

Ideally we would or should see in Bahmni 10 patients.

So, what’s the issue?

The issue is that when I go in Bahmni, I can see that there are 10 but every user there is having same uuid, same patient identifier (it is 100% the same). If I go and add e.g. a diagnosis to one of these patients, I will see the effect in every other patient.

every patient has the same patient identifier (GAN203016)

every patient has the same uuid (222cd023-3a7a-4472-8b45-e9cfa9a2564c)

If I go into OpenMRS thought, and search for a patient with that identifier, I see only one patient. image

P.S I will let all know if there is even further findings.

@johnny94

Sounds like your code triggered creation of MULTIPLE active visits for the same patient. Ideally if you have parallel users, they should be working on different patients. With regards to the Queue screen, there has been a recent change to the SQL query which shows queued patient - which will ensure patients are not being duplicated. See this: [BAH-1236] All patients involved in a merge are being displayed under the Active tab of the Clinical module - Bahmni - JIRA

If you use the above query as mentioned in the PR for BAH-1236, you should see a single patient. cc: @soorya @kavitha11 @abhinab