Wiki Spaces
Documentation
Projects
Resources
Get Help from Others
Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack
This page is out of date – it refers to the way that Concept Name Tags were used in OpenMRS versions before 1.7.
Here is a short post mentioning how Concept Name Tags are used in modern OpenMRS versions: https://talk.openmrs.org/t/concept-name-tag/3368/3
ConceptNames are the words or phrases used to express the idea of a Concept within a particular locale. Because there may be many names for any concept, tags were introduced as a way of annotating names to indicate specialization, or the intended use.
Here is a focused subset of the data model showing the context of ConceptNameTags:
Concepts can have multiple names and descriptions. ConceptNames can have multiple tags.
While the ConceptNameTag facility is general purpose, the core framework uses tags to indicate the preferred name to use for a particular locale.
Originally, concepts had only one official name, a short name, and possible synonyms. With the model shown above, all possible text representations for a concept are considered names. Tags are used to differentiate between the set of names for a concept.
ConceptNames can be have one or both of two preferred tag variants:
Tag Pattern | Variable Substitution | Meaning |
preferred_xx | xx = ISO-639 two letter language code | Indicates that the name is preferred for all locales which share the language |
preferred_YY | YY = ISO-3166 two letter country code | Indicates the preferred name to use within a country. |
Preferred Language Rules:
Preferred Country Rules:
This scheme provides considerable flexibility because preferences do not have to exactly match up with the specified locale, as long as the language is compatible. For instance, consider the following names:
Concept Name | Locale | Tags |
measles | en | preferred_US, preferred_GB |
rubeola | en | |
spotty skin | en_us | preferred_en |
rougeole | fr | preferred, preferred_FR |
sarampion | fr_RW | preferred_RW |
The preferred name is the recommended name to use within a particular locale. The locale can be specified as just the language, or for a country. When requesting the preferred name for a Concept, the collection of available names is searched for a ConceptName from a compatible locale which has a preferred tag. If the requested locale only specifies language, then the name may be from any country with a compatible language which is tagged as "preferred language". If the country is specified, then all compatible names are searched for a name with the "preferred country" tag.
It is possible that no name is tagged appropriately for the requested locale, so the result may be null.
The "best" name also uses the preferred tags to rank the available names according the following rules, ordered from "best" to "less good":