satyadoorva
(Satyadeep Kumar)
February 9, 2023, 6:17am
1
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.
Can anyone please help on this.
Thanks
Satyadeep
kdaud
(Kakumirizi Daud)
February 9, 2023, 6:59am
2
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.
satyadoorva
(Satyadeep Kumar)
February 9, 2023, 7:06am
3
Hi Daud,
I have checked that as well , no patient_identifier has the string as null :
kdaud
(Kakumirizi Daud)
February 9, 2023, 8:40am
4
The patients being returned from the search contain the string Lin
in their respective names.
satyadoorva
(Satyadeep Kumar)
February 9, 2023, 9:01am
5
There are 7 patients for whom the given_name contains LIN . not 12 .
dkayiwa
(Daniel Kayiwa)
February 9, 2023, 9:33am
6
What happens after rebuilding the search index using your equivalent of this page: Login
satyadoorva
(Satyadeep Kumar)
February 10, 2023, 4:50am
7
@dkayiwa that worked perfectly fine. Just wanted to understand 2 points:
What could be the cause of this?
What should be the frequency of rebuilding search index?
Thanks!
dkayiwa
(Daniel Kayiwa)
February 10, 2023, 10:10am
8
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.
satyadoorva
(Satyadeep Kumar)
February 10, 2023, 1:07pm
9
Thanks a lot @dkayiwa !! Makes sense.