Is TRUNK-412 the latest version of the data model?

If so, it appears that there can be a relation between a term and a concept or 
between any two terms (regardless of source, your 2nd question).  There is no 
inverse mapping (your 1st question):

*         Concept_reference_term is mapped by concept_map to concept with a 
map_type relationship.

*         Concept_reference_term a has an a_is_to_b concept_map_type to 
concept_reference_term b via concept_reference_term_map
These were different use cases, the first appropriate for mapping standard 
vocabularies to concepts (or for module concept identification) and the second 
appropriate for cross-mappings between or within vocabularies.

To get the bidirectional relationship, one could

a)      put the inverse relationship into concept_map_type as another field;

b)      put the inverse relationship into concept_reference_term_map as a 
b_is_to_a field; or

c)       require 2 concept reference term maps, one with a::b and the other 
with b::a.
If a map_type can have more than one inverse, then (c) is the only option.  If 
one wants map concept to term, then (a) is the only option.

The way the methods getConceptByMapping() and getConceptsByMapping() work 
pretty much determines the direction of the term-concept relationship.  If we 
want to map in the other direction, we may need another signature for these 
functions with a map type parameter, and a function 
List<Concept_Reference_Term> getMapsByConcept(Concept c, ConceptMapType m).


From: [email protected] [mailto:[email protected]] On Behalf Of Wyclif Luyima
Sent: Monday, August 29, 2011 3:45 PM
To: [email protected]
Subject: [OPENMRS-DEV] Concept Reference Term Map associations

Hi,

If term A is mapped to term B, then term A should be be visible to term B as a 
mapped term too, i.e the relationship should be bidirectional. This is not the 
current implementation and i feel it would be strange though i recall when i 
asked this the last time, we chose to ignore it and just make it unidirectional.

And can one map two reference terms in different concept sources or they should 
be in the same dictionary?

Wyclif.
________________________________
Click here to 
unsubscribe<mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l> 
from OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to