openmrs-module-initializer icon indicating copy to clipboard operation
openmrs-module-initializer copied to clipboard

Concepts should be fetched by FSN only

Open mks-d opened this issue 3 years ago • 1 comments

1) Background

See

2) Dev Notes

This happens here in Utils#fetchConcept.

3) Proposed Solution

After exposing failing unit tests that demonstrate that ConceptService#getConceptByName produces unreliable results, proceed to introduce a new method/service layer/DAO layer hosted in Iniz that ensures that only FSNs are being searched. This could largely be created on the same premises of the existing code, see here in ConceptService's DAO layer.

mks-d avatar Nov 30 '22 18:11 mks-d

@mks-d when we do this, let's get rid of the hacky code that iterates over all of the Locales and sets the Context locale, in order to be able to search by concept in that locale. Let's just create a DAO/Service method that will search by FSN without consideration of Locale.

mseaton avatar Nov 30 '22 18:11 mseaton

@ibacher / @Ruhanga – what about this one, is this issue still current?

mks-d avatar Jun 28 '24 14:06 mks-d

Looks to me like it's implemented.

ibacher avatar Jun 28 '24 14:06 ibacher