Concept Data Model

Many new concept* tables were added to OpenMRS 1.9.

Concept schema diagram

Relationships between the tables

Relationships between the tables with column names

Relationship between concept tables and real example

Using the example of the Leprosy concept (see Figure 2), we'll describe some of the concept tables and how this concept is represented in the database. The concept_id is used to link the various tables (in most cases).

Table.Field

Data

Table.Field

Data

concept.class_id

Represented by concept_class 'Diagnosis' with concept_class_id = 4

concept.datatype_id

Represented by concept_datatype 'N/A' with concept_datatype_id = 4

concept_name.name

Leprosy where locale is 'en'

concept_name.concept_name_type

FULLY_SPECIFIED for Leprosy; NULL for Hansen's disease and Hansenosis

concept_name.locale_preferred

'1' for Leprosy, but '0' for Hansen's disease and Hansenosis

concept_name.name

Lèpre where locale is 'fr'

concept_answer.concept_id

The concept_id represents the question (Outpatient Diagnosis)

concept_answer.answer_concept

The concept_id for Leprosy (59), which is an answer to the question (Outpatient Diagnosis)

concept_description.description

The description text for each locale

concept_reference_source.name

ICD-10-WHO (concept_source_id = 3), PIH (concept_source_id = 5)

concept_map_type.name

SAME-AS (concept_map_type_id = 1), NARROWER-THAN (concept_map_type_id = 2)

concept_reference_term.code

A30.9 where concept_source_id = 3 (ICD-10-WHO)

concept_reference_map.concept_map_id

Magical glue which connects concept_id (ie. 59), concept_map_type (ie. NARROWER-THAN), concept_reference_term (ie. ICD-10-WHO A30.9)

concept_word.word

Leprosy, Hansen's, disease, Hansenosis, Lèpre are all individual rows in this table

More information on concept sources can be found here and here.