Background

A concept is the basic element of flexibility in OpenMRS. Concepts are the individual data points collected from a population of patients. Concepts include both questions and answers. Therefore, it is very important to have them conform to specific validation rules in order to have a cleaner data set.

Concept Validation Rules - What makes a concept valid?

These apply as per the latest OpenMRS version, there are couple of minor variations between 1.7, 1.8, 1.9, there are major variations in 1.6 and earlier versions.

For all (modern) OpenMRS versions

For OpenMRS 1.7 and above

for OpenMRS 1.9 and above

for OpenMRS 1.10 and above when released

Concept Reference Term Validation Rules (1.9 and above)

See Mapping Concepts to Other terminologies for more about Concept Reference Terms and Map Types

  1. The code and concept reference source are required i.e they shouldn't be blank/null
  2. The code should be unique among all other codes in its Concept Reference source
  3. The reference source should belong to an existing concept i.e Can't add a term to a source that is getting created on the fly along with it.
  4. Can't add a concept reference term to the same reference term multiple times
  5. If a name has been specified for a reference term, it should be unique among all other names in its Concept Reference Source
  6. When adding a  mapping to another reference term, the concept map type and the other term getting mapped to are required
  7. When adding a  mapping to another reference term, the term getting mapped to should be existing i.e Can't map to a term that is getting created on the fly.
  8. Can't map a reference term to itself
  9. Can't map a reference term to the same reference term multiple times

Concept Map Type Validation Rules (1.9 and above)

See Mapping Concepts to Other terminologies for more about Concept Reference Terms and Map Types

  1. The name is required i.e it shouldn't be blank/null
  2. The name should be unique among all other names

Validation module

The Validation Module is a great way to review the concepts and show any errors against the validation rules.  Choose any of these types for reviewing the concept dictionary:

Other validations rules to enforce in the future

  1. A fully specified name can neither be a short name nor an index/search term
  2. Can't add a concept mapping with a retired concept map type or reference term
  3. Can't add a concept mapping to a voided concept reference source
  4. The concept reference source of a  reference term should be non-voided
  5. Can't add a concept reference term map with a retired concept map type or reference term

Useful validation rules for specific concept dictionaries

There is no validation that checks that certain mappings are only used on 1 concept in a concept dictionary. A concept source mapping for a concept dictionary (ie. PIH:12) should only be associated with 1 concept.  ICD10 mappings can be associated to multiple concepts.   

See also