What is the use of concept_id in Concept table?

I’m trying to POST a FHIR Observation resource but mostly it fails due to : No matching concept found for the given codings.

I’ve observed that mostly when I pass the UUID of a concept, the Observation resource gets POSTed successfully. So can someone explain me the benefit of using concept_id besides indexing the table ?

Below JSON body for creating an Observation:

        {"system": "http://openmrs.org",
         "code": "857",
         "display": "BLOOD UREA NITROGEN"}
      ] }, 
      "code":"mmHg" }, 
    "subject":{ "reference":"Patient/010", 
               "display":"Jinny Bond(Identifier:10)" }, 
      { "high":
       { "value":10.0, 
        "code":"mmHg" }

It’s used for linking the concept* and other (e.g. ‘obs’) tables in the database.

Hi @pascal, Thanks for the answer. I understand it must be used as a reference key in the other tables, but I was actually thinking whether it could be used as the “code” value for Observation resource. To be more precise, standards like snowmed, Loinc, etc uses some 3-4 digits number where as openmrs system has each concept referred using the uuid. So, are we mapping those codes of snowmed, loinc to the concept table’s uuid ??

It’s the primary key right? Quite important :slight_smile:

1 Like

You’ll have to ask our FHIR experts @harsha89 or @surangak.

I believe any linking at the database level (e.g. mapping) is done using concept_id, which is an internal identifier that is never supposed to be exposed. This is different from a UUID, which is used for REST and should be exposed.

I am not sure I understand the question. Most OpenMRS concepts in the CIEL dictionary have maps to SNOMED, LOINC, etc. although these might not be SAME-AS or 1:1 maps.

Hi @akanter, Thanks for the reply. Actually I don’t have the script file for the CIEL dictionary. I’ve sent a mail to you to grant me the access to the dropbox. I think I should first try it out and then let you know how it goes. Thanks :slight_smile:

Concept_id is the database primary key column and is used when joining other tables to the concept table.

1 Like