Displaying synonyms in display controls of Bahmni

Hello @all We are trying to solve a usecase where we are trying to leverage concepts from the OCL dictionary and the concepts have many synonyms and no shortName [OCL has a limitation that prevents it from using shortNames]. The FSN of the concepts is too big/lengthy and hence we want to choose and use one of the many synonyms available, to show it in the display controls.

Wanted to know from the community - whether someone has already solved this problem or is there a workaround for this already in place which we can leverage.

Thanks Buvaneswari

FYR… This discussion happened in the Bahmni community and I have pasted the transcript here

angshuonline 20 hours ago

if you have 3 synonyms how will determine which one to show?

Buvaneswari Arun 20 hours ago

What I am trying to understand is, even though it is agreed that there can be many synonyms…wouldnt it be fair that just like FSN and shortName, shouldn’t synonyms be allowed to be showed? is it because they are multiple we are not showing?

angshuonline 18 hours ago

whats the primary purpose of synonym?

  • is to enable search - so that irrepective of how a concept is called by different users, it means the same. Once it is captured, no matter how you address it means the same

  • for a given locale, therefore, only 1 FSN is allowed. and also 1 shortname/locale

  • and also because a concept can be addressed by many names in a given locale, there can be more than 1 synonym per concept.

to me, seems like you have come across the need because you are using OCL, which has long FSN, and does not have FSN - and you want to use 1 of the synonyms to have a shorter name.

  1. synonyms can be marked as “preferred” … so thats one way … I am not sure whether all across Bahmni this will be respected and/or what impact it will have reporting
  2. post sync - just pick a synonym (again on what basis?) - and add that as short name.

binduak 17 hours ago

@angshuonline Whatever the synonym that we add from openmrs can be selected from IE UI and the same can be visible on the consultation page. So the intention is to use the same synonym in the display control too. Also we see that the synonym is showing up in the xml file with the obs value captured for the below API, openmrs/ws/rest/v1/bahmnicore/observations?concept=ANA,+Height&numberOfVisits=2&patientUuid=889c7164-9926-4efd-9402-0435ac048d72 But the synonym can’t be consumed from display control for now

binduak 17 hours ago

If I add a synonym to the concept and make it as “preferred”, then the observation values which were showing on the display control are no longer visible. Only when I remove the synonym for the concept then the observations are showing up on the display control. I think the existing Obs display control doesn’t have support for synonym.

gurpreet 17 hours ago

Synonyms are for “search”… which means UI → Server (Synonym). In response, one should get FQN and ShortName. The Shortname should be used to show on screen. If OCL doesn’t support Shortname, maybe we can contribute to OCL and fix that? Else we are deviating away and away from original OpenMRS intentions & design.

1

gurpreet 17 hours ago

And it seems there is the concept of Concept_name_tag / preferred names: What's the purpose and use of concept_name_tag? - #3 by darius

Hi @binduak

  1. If i understand your requirement correctly, it seems you wish to display on Bahmni Display Controls (Patient Dashboard), the concept synonym instead of FQN (for ease of readability maybe). Plz confirm.

  2. From OpenMRS perspective, I know that synonyms are for quick search (or lookup) of concepts with easy-to-remember/familiar terms, but for display purposes one is supposed to use the FQN or ShortName. See this: Concept Dictionary Basics - Documentation - OpenMRS Wiki. Are you not able to use ShortName because OCL doesn’t support it yet?

  3. A related discussion: Implementer Interface (Form Builder) Getting concepts name as “Fully Specified Name” - #2 by angshuonline

cc: @akanter @michaelbontyes @angshuonline

(btw, I am not sure if linking to bahmni slack archive is a great idea. we use the OSS license, and our msgs get purged beyond a certain limit)

First, it is important to understand when certain names are being used and for what purpose. The FSN is the unambiguous display name when dealing with the concept in analytic use. It does not have to be the term used in the interface.

Short names and index terms are not unique and should not be used for unambiguous display of concepts. Index terms help find the concept in search, and short names are for display in tight spaces where the context around the name provides sufficient information to disambiguate the concept.

Synonyms are meant to be alternative ways of saying the concept which are more clinically-friendly. They are meant to capture and redisplay the information in the manner the clinician wants. If someone captures ALS by using the term Lou Gehrig’s disease, then you display it back to them with the same name, not translating to the FSN Amyotrophic lateral sclerosis.

Preferred in language tag can be used to differentiate synonyms in search lists or when translating from one language to another.

Also, there is no limitation in OCL in creating shortnames for concepts.

1 Like

@akanter - Thanks for your response.Will add some more context to our usecase.We are trying to use concepts from the CIEL library and we noticed that they don’t have a shortName but synonyms. We don’t want to create a custom concept just to overcome this huddle.

Why do you want to use “short name”? They are not unique and should not be used to identify the concept. If you need a particular synonym or short name that is missing, I can review for addition to CIEL. However, ultimately it is the new OpenMRS Dictionary Manager functionality which will allow you to customize a concept without breaking the link to the original concept.

@muhima08 @binduak @swedhan @matirp235