Enable Diagnosis Search in user locale or as specified by query parameter
Description
The EMR API to search diagnosis (GET/emrapi/concept) does not consider the user locale, and therefore it is unable to search in other languages apart from default Locale.
For example, if the default locale is "en", then the search will always be in "en", whether the user wants to search (in session context) in "fr".
Technical Aspects
From the code it seems like this line of code here should be changed to use "Context.getLocale()" so that if the user session has a particular "locale" set, then the search can leverage so.
At the same time, it will be good to pass a parameter for locale in the request object. This is for the cases, where 1) Search in other locales without changing the user's session locale 2) where frontend apps are using REST APIs to login. (and not using the POST call to set user locale)
The EMR API to search diagnosis (GET /emrapi/concept) does not consider the user locale, and therefore it is unable to search in other languages apart from default Locale.
For example, if the default locale is "en", then the search will always be in "en", whether the user wants to search (in session context) in "fr".
Technical Aspects
From the code it seems like this line of code here should be changed to use "Context.getLocale()" so that if the user session has a particular "locale" set, then the search can leverage so.
At the same time, it will be good to pass a parameter for locale in the request object. This is for the cases, where 1) Search in other locales without changing the user's session locale 2) where frontend apps are using REST APIs to login. (and not using the POST call to set user locale)