Summary: In OpenMRS AdminUI, if one logins with a non-English locale (like French), which is a different locale from the default locale, then a search of concepts in the dictionary doesn’t return any results if the specified concept string is not found in that locale. Earlier in OpenMRS (2.1.x), one was able to see results from English locale, if the specified search string was not present in the user’s locale. It seems the Concept Search API behaviour might have changed across 2.1.x to 2.5.x. This is causing some concept searches to break in non-English locale now.
- When we login in Openmrs AdminUI and set its locale to be french for example (anything other than English which has a fully specified name of the concept specified) then we are unable to see that concept. In older version of OpenMRS it used to show the concept and even the concept search api used gives a result array with that concept. This means that if french doesn’t have any concept with FSN of the one which we are searching it used to give response from default locale which is English in our case, but now it returns and empty results array.
In our case we had a concept set with fully specified name as
Nutritional Values in English. While in french it doesn’t have any FSN, if we search it in dictionary with logged in user locale as English it shows the concept but if logged in user is french it doesn’t.
this is the api which is hit to search for the concept here ,
- We also have another question. Is the
locale=frparam being used or validated? Because on removing the param and keeping the param the result didn’t change. Is it the
paramthrough which the openmrs backend checks for the locale or is it from the
JSESSIONIDfrom where it fetched the locale and search whether the concept is there or not?
Since the concept search API is now returning no results, if it doesn’t find the FSN in the current locale, it seems clients will need to make a second call with default locale to search. Earlier, the concept search API used to do this automatically. This is causing some screens in Bahmni to not work in non-English locales, if the specific locale doesn’t have translation for a concept.
Any guidance from OpenMRS team will be very helpful.