Skip to content

VocabMap

mapping category: vocabulary supports `||`

Maps a vocabulary code to a standard concept id using the OMOP CDM vocabulary.

Resolves the input concept code to its mapped standard concept id by querying the OMOP CDM vocabulary:

select concept_id_1
  from concept
     inner join concept_relationship
        on concept_id = concept_id_1
  where relationship_id = 'Maps to'
     and vocabulary_id = :vocabulary_id
     and concept_code = :concept_code

Parameters

1vocabulary Mandatory — accepts: STRING

The vocabulary used in the mapping.

2default Optional — accepts: INT, NULL

Default value used when no match is found in the vocabulary.

Input type

  • STRING

Output type

  • INT

Examples

SNOMED with default NULL

VocabMap("SNOMED")

ATC with explicit default 0

VocabMap("ATC", 0)

See also

VocabSourceId, UsagiMap, AssertVocabDomain