OpenMRS Patient Search returning false records with no patient id

Hi,

I am trying to search patients starting with a string Lin . OpenMRS is returning me results with 5 rows having patient id as NULL. I checked and could see that there are no patients with id as NULL.

Screenshot 2023-02-09 114712

Can anyone please help on this.

Thanks

Satyadeep

The query fetches all patients from the db whose patient identifier or patient name contains the string Lin

The rule is that each patient should have a unique id in order to be saved in the openmrs db.

Hi Daud,

I have checked that as well , no patient_identifier has the string as null :

The patients being returned from the search contain the string Lin in their respective names.

There are 7 patients for whom the given_name contains LIN . not 12 .

What happens after rebuilding the search index using your equivalent of this page: Login

@dkayiwa that worked perfectly fine. Just wanted to understand 2 points:

  1. What could be the cause of this?
  2. What should be the frequency of rebuilding search index? Thanks!

You could have manipulated the data directly from the database instead of via the OpenMRS API.

Or it could be a bug like this one: [TRUNK-5741] - OpenMRS Issues

It should happen automatically as long as you interface with the database via the OpenMRS API.

Thanks a lot @dkayiwa !! Makes sense.