Migrate Concepts and Concept Sets

Purpose and Benefits

Bahmni supports import of concepts via CSV files. There are two types of data you can create via CSV import:

  • Concept  
  • Concept Set. 

With Concept Set import, multiple Concepts or Concept Sets can be grouped under a parent concept. 

Note

From v0.90 Bahmni, We are supporting the CSV import of special characters/non-english characters. This is done as part of this Jira card.

Types of CSV Imports

Bahmni has different CSV formats for import of Concepts and Concept Sets. For each type of import we have attached a sample file with some example rows.

1. Concept

New concepts can be created by uploading a concepts.csv file containing the below mentioned fields:

 

Key
Use
Mandatory
uuidConcept will created with this uuid Y
nameName of the Concept Y
description N
classClass can be Misc/Abnormal depending on the concept type.Y
shortnameBahmni will use shortname while showing the concept.Y
datatypeDatatype can be Numeric/Boolean/Coded or N/AY
unitsCan mention for Numeric datatypeN
High Normal

Can mention for Numeric datatype

N
Low NormalCan mention for Numeric datatypeN
locale N
synonym.1 N
answer.1/2/3Should be the fully specified name of concept. The datatype should be Coded.N
reference-term-source N
reference-term-code N
reference-term-relationship N

Before putting a Concept value in answer(s) section make sure that the Concept already exists in the system. If not, then put a row/section before the parent Concept row in CSV. This is done to ensure that the child Concept information gets imported before the parent Concept is imported. Otherwise, the parent Concept will not be able to refer to a non-existent child Concept.

 

 

2. Concept Set

New concept set can be created by uploading the concept_sets.csv and filling up the below fields:

Key
Use
Mandatory
uuidConcept-Set will created with this uuid Y
nameName of the Concept-Set Y
description N
classClass can be Misc/Concept Details depending on the concept-set type.Y
shortnameBahmni will use shortname while showing the concept-setY
child.1/2/3/4Should be the fully specified name of concept or concept-set.Y
reference-term-source N
reference-term-code N
reference-term-relationship N

Before putting a Concept or Concepts or Concept Set as child make sure that the Concept(s) or Concept Set(s) already exists in the system. If not, then put a row/section before the parent Concept Set row in CSV. This is done to ensure that the child Concept Set information gets imported before the parent Concept Set is imported. Otherwise, the parent Concept Set will not be able to refer to a non-existent child Concept.

Also, it is suggested to import all Concepts first, and then import Concept Sets, since sets cannot refer to non-existent concepts.


The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)