Additional Attributes on Concept Map (Design Page)

This project is assigned to the OpenMRS 1.9 release milestone.  The following design model does *NOT* match the final execution.

Background

Our current concept mapping is fairly low-key and doesn't allow for looser mapping to other terminologies. Our current implementation assumes its almost a 1 to 1.  (Or a "this is that").  In the real world the mapping is less exact.  We need an extra attribute on the concept map to specify this.

We also need to specify the relationship between two mapped terms.  We have no way to do that in openmrs currently.  The goal of this would be to prevent users from having to create actual concepts for each mapped term but still be able to make use of the rich hierarchy in searching, etc.

Initial forum post by Andy

Followup discussion on dev list

Design

Notes on what may be unclear from the image:

  • The concept table is unchanged.

  • The concept_reference_source is really the concept_source table and is unchanged

  • concept_reference_term_map.a_is_to_b is FK to concept_map_type.concept_map_type_id (aka "type_of_map")

  • concept_map.map_type is FK to concept_map_type.concept_map_type_id (aka "type_of_mapping")

UUID
  • Concept reference sources are unique by name & version.  UUID should be generated from these rather than be randomly generated, since we do not want LOINC version 2.32 in one implementation to have a different UUID from LOINC version 2.32 in another implementation

Concept Source
  • hl7_code is derived from the HL7 Coding system table (0396) value.  Must not exceed 20 characters.  Most standard values are defined by HL7 – e.g., "LN" for LOINC.  Local codes should always start with "99".

Requirements

  • Add a map type table.  The map types can be relationships such as IS-A ("same-as", "broader-than", "narrower-than"), "related-to", etc.

  • Add a 'map type' FK to the concept_map table.  This allows concept-to-external-mappings to be more explicit

  • Create a concept_map_term table.

  • Move column concept_map.source to concept_map_term.source_id

  • Move column concept_map.source_code to concept_map_term.code

  • Create a concept_map_term_map table

  • concept_map_term_map.term_a_id FK to concept_map_term.concept_map_term_id

  • concept_map_term_map.term_b_id FK to concept_map_term.concept_map_term_id

  • concept_map_term_map.as_is_to_b FK to concept_map_type.concept_map_id

  • Add admin jsp page for concept_map_type

  • Modify edit concept jsp page to allow managers to set the "map type" and also the "name/label" when defining a concept map

  • Add admin jsp page for managing the concept_map_terms and their relationships (aka map types between terms)

To be discussed:

  • How to display the term hierarchy in a concept search?

  • How to allow someone to select "all concepts and 'child' terms/concepts" ?

Example

Diabetes Mellitus (SNOMED 73211009) is a parent of Diabetes Mellitus, Type 1 (SNOMED 46635009) in the SNOMED system.

Rows in openmrs:
concept_reference_source: one row. source_id=1, name="SNOMED Clinical Terms"
concept_reference_term: 2 rows
1st row: id=1, code=73211009, name=Diabetes Mellitus
2nd row: id=2, code=46635009, name=Diabetes Mellitus, Type 1
concept_reference_term_map: one row. term_a_id=1, term_b_id=2, a_is_to_b=99
concept_map_type: two rows. id=99, name=IS_A; id=1, name=SAME_AS
(could stop there, no need to map to openmrs concepts if you don't want to)
concept: concept_id=1000, name=Diabetes Mellitus
concept_reference_map: concept_id=1000, term_id=1, map_type=1

Assigned Developer

@Wyclif Luyima

Testing the feature

http://buea.openmrs.org:8080/openmrs/

Mentors and Other Interested Parties

  • Mentor: @Ben Wolfe

  • @Andrew Kanter

  • @Glen McCallum

Ticket(s)

type key summary assignee reporter priority status resolution created updated due

Unable to locate Jira server for this macro. It may be due to Application Link configuration.