Saving medication is throwing error in user locale

Description

We noticed that, when user logged in different locale (user locale i.e french) other than English (Default Locale) is choosing dose, duration and quantity units in default locale as there is no translation available in their user locale, is throwing an exception while saving it.

Error log

code reference here

The method conceptService.getConceptByName(name) is searching the concept name only with the user locale. That is the issue. It should also check for concept names in default locale (en) for which translations is not available in user locale (fr)

The possible solution for the above issue is to make use of OrderService getDoseUnits(), getDurationUnts() method as we did here which returns all of the dose and duration units concept names in user locale along with concept names in default locale for those of which translation is not there.

Attachments

1

Activity

Daniel Kayiwa 
December 8, 2023 at 11:36 AM

i have put some comments for you on github.

Sanofer Sameera S 
December 8, 2023 at 8:24 AM

PR:

Fixed

Details

Assignee

Reporter

Complexity

Fix versions

Priority

Created December 8, 2023 at 7:50 AM
Updated December 8, 2023 at 12:38 PM
Resolved December 8, 2023 at 12:38 PM