Hello, I’m trying to find if there is a way to search for patients by local name, specifying multiple parts of the local name.
The situation is that during registration, patients are given a transliterated english name from arabic, and then the arabic name is stored in the givenNameLocal, middleNameLocal and familyNameLocal patient attributes. In the bahmni registration app a custom search parameter has been specified as:
"label": "اسم العربي",
"placeholder": "اسم العربي",
"fields": ["givenNameLocal", "middleNameLocal", "grandfatherNameLocal", "familyNameLocal"]
This way the registration clerk can enter any one of given name, middle name or family name (or possibly grandfather name), and see the patients that match.
The problem is that many names in Arabic are very common. Searching by just one part of the arabic name is not specific enough to be very useful. If two names are specified in this search field with a space, no results are given. So we want to be able to enter in the search field " احمد محمد" and see all patients who have both احمد and محمد in their full arabic name.
I’ve taken a look in bahmni-core to see why this is the case, in
PatientAttributeQueryHelper.java. I can see that it would probably be more complicated than what was done for the english name. We’d prefer not to be building and maintaining our own bahmni-core module though.
I could try coming up with a solution and writing a patch, but I thought I would ask here first. Is there another way to do this, and if not would such a feature be useful generally - to require a match of each word in a multi-word search entry against any of the patient attributes, but not necessarily match against the same attribute?