Chuyển đến nội dung chính

Lesson 14: CONCEPT & VOCABULARY — Standard dictionary foundation

The two tables are central to the Vocabulary system: CONCEPT contains all medical concepts, VOCABULARY manages the origins. Learn standard_concept, domain_id, concept_class_id, vocabulary_id and how to look up on Athena.

🏗️ Architecture — Lesson 14 CONCEPT & VOCABULARY Standard dictionary platform OMOP CDM 5.4 for Beginners — Understand A to Z Part 5: Standardized Vocabularies xdev.asia

Vocabulary ecosystem — CONCEPT, VOCABULARY, RELATIONSHIP, ANCESTOR

Introduction

The Standardized Vocabularies system is the "brain" of OMOP CDM — all clinical data is linked here. This article focuses on two central tables: CONCEPT (containing ~10 million medical concepts) and VOCABULARY (managing 70+ dictionary sources). Understanding these two tables is the key to mastering OMOP.


1. CONCEPT table

1.1. Structure

ColumnTypeDescriptionExample
concept_idINTEGERPK — Globally unique ID201826
concept_nameVARCHAR(255)Concept name"Type 2 diabetes mellitus"
domain_idVARCHAR(20)Domain (which table)"Condition"
vocabulary_idVARCHAR(20)FK → VOCABULARY"SNOMED"
concept_class_idVARCHAR(20)Classification in vocab"Clinical Finding"
standard_conceptVARCHAR(1)S=Standard, C=Classification, NULL"S"
concept_codeVARCHAR(50)Original code in vocabulary"44054006"
valid_start_dateDATEEffective start date2002-01-31
valid_end_dateDATEExpiry date2099-12-31
invalid_reasonVARCHAR(1)NULL=valid, U=updated, D=deletedNULL

1.2. standard_concept — Three types of Concepts

  ┌─────────────────────────────────────────────────────┐
  │ standard_concept = 'S' (Standard)                    │
  │ → Concept "chính thống" dùng trong *_concept_id     │
  │ → VD: SNOMED 201826 "Type 2 diabetes mellitus"      │
  │ → Dùng cho condition_concept_id                      │
  └──────────────────────┬──────────────────────────────┘
                         │ Maps to (nguồn → đích)
  ┌──────────────────────┴──────────────────────────────┐
  │ standard_concept = NULL (Non-standard / Source)      │
  │ → Concept nguồn từ ICD, CPT4, ATC...               │
  │ → VD: ICD10CM 45591837 "E11 - Type 2 DM"           │
  │ → Dùng cho *_source_concept_id                       │
  └─────────────────────────────────────────────────────┘

  ┌─────────────────────────────────────────────────────┐
  │ standard_concept = 'C' (Classification)              │
  │ → Concept dùng cho phân cấp / ancestor              │
  │ → VD: MedDRA PT "Diabetes mellitus"                 │
  └─────────────────────────────────────────────────────┘

1.3. domain_id — Identifies the target table

domain_idCDM TableExample
ConditionsCONDITION_OCCURRENCEDiseases, symptoms
DrugsDRUG_EXPOSUREMedicine
ProcedurePROCEDURE_OCCURRENCETips
MeasurementMEASUREMENTTesting
ObservationOBSERVATIONAcknowledgment
DeviceDEVICE_EXPOSUREEquipment
Spec Anatomic SiteSPECIMENSampling location
VisitVISIT_OCCURRENCEType visit
Type Concept*_type_concept_idData source
GenderPERSONGender
RacePERSONRace
UnitMEASUREMENT.unitUnit
RouteDRUG_EXPOSURE.routeRoute of administration

2. VOCABULARY table

2.1. Structure

ColumnTypeDescription
vocabulary_idVARCHAR(20)PK — ID vocabulary
vocabulary_nameVARCHAR(255)Full name
vocabulary_referenceVARCHAR(255)Reference URL
vocabulary_versionVARCHAR(255)Version
vocabulary_concept_idINTEGERFK → Representative Concept

2.2. Popular Vocabulary

vocabulary_idNameMain domainRole
SNOMEDSNOMED-CTCondition, Procedure, ObservationStandard for clinical use
RxNormRxNormDrugsStandard for medicine
LOINCLOINCMeasurementStandard for testing
ICD10CMICD-10-CMConditionsSource concept diagnosis
ICD10PCSICD-10-PCSProcedureSource concept tips
CPT4CPT-4Procedure, MeasurementSource billing code
ATCATCDrugsClassification of drugs
UCUMUCUMUnitUnit of measurement
GenderOMOP GenderGenderGender
RaceRaceRaceRace
CVXVaccinesDrugsVaccine codes

3. Look up Concept on Athena

3.1. Lookup step

  1. Vào athena.ohdsi.org
  2. Gõ từ khóa: "Type 2 diabetes"
  3. Filter:
     - Standard Concept: Standard ✓
     - Domain: Condition ✓
     - Vocabulary: SNOMED ✓
  4. Kết quả:
     concept_id:     201826
     concept_name:   Type 2 diabetes mellitus
     vocabulary_id:  SNOMED
     concept_code:   44054006
     standard_concept: S
     domain_id: Condition

3.2. SQL lookup

-- Tìm Standard Concept cho "tiểu đường type 2"
SELECT concept_id, concept_name, vocabulary_id,
       domain_id, standard_concept, concept_code
FROM concept
WHERE LOWER(concept_name) LIKE '%type 2 diabetes%'
  AND standard_concept = 'S'
  AND domain_id = 'Condition'
ORDER BY concept_name;

-- Tìm Source Concept (ICD-10) mapping đến Standard
SELECT
    c_src.concept_id AS source_concept_id,
    c_src.concept_code AS icd10_code,
    c_src.concept_name AS icd10_name,
    c_std.concept_id AS standard_concept_id,
    c_std.concept_name AS standard_name,
    c_std.vocabulary_id AS standard_vocab
FROM concept c_src
JOIN concept_relationship cr
    ON c_src.concept_id = cr.concept_id_1
    AND cr.relationship_id = 'Maps to'
JOIN concept c_std
    ON cr.concept_id_2 = c_std.concept_id
    AND c_std.standard_concept = 'S'
WHERE c_src.concept_code = 'E11'
  AND c_src.vocabulary_id = 'ICD10CM';

4. concept_class_id — Classification in Vocabulary

4.1. SNOMED

concept_class_idMeaningExample
Clinical FindingsDiseases, symptomsType 2 DM
ProcedureTipsAppendectomy
Body StructureBody structureLiver
SubstanceQualityGlucose
Observable EntitiesMeasured QuantityBlood pressure
Qualifier ValueAdditional ValueSevere

4.2. RxNorm

concept_class_idLevelExample
Ingredient (IN)Active ingredientsMetformin
Clinical Drug Form (CDF)HC + dosage formMetformin Oral Tablet
Clinical Drug (CD)HC + dose + formMetformin 500mg Tab
Branded Drug (BD)Trade nameGlucophage 500mg Tab
Clinical Drug Comp (CDC)HC + doseMetformin 500mg
Brand Name (BN)Trade nameGlucophage
Dose Form (DF)Dosage formOral Tablet

5. DOMAIN table

ColumnTypeDescription
domain_idVARCHAR(20)PK
domain_nameVARCHAR(255)Domain name
domain_concept_idINTEGERFK → concept

6. CONCEPT_CLASS table

ColumnTypeDescription
concept_class_idVARCHAR(20)PK
concept_class_nameVARCHAR(255)Class name
concept_class_concept_idINTEGERFK → concept

7. concept_id = 0 — Special meaning

ConceptsMeaningWhen to use
concept_id = 0"No matching concept"Unable to map
concept_name"No matching concept"
domain_idNULL
vocabulary_id"None"
-- Kiểm tra % records không map được
SELECT
    'condition_occurrence' AS table_name,
    COUNT(*) AS total_records,
    SUM(CASE WHEN condition_concept_id = 0 THEN 1 ELSE 0 END) AS unmapped,
    ROUND(SUM(CASE WHEN condition_concept_id = 0 THEN 1 ELSE 0 END) * 100.0
          / COUNT(*), 1) AS unmapped_pct
FROM condition_occurrence
UNION ALL
SELECT 'drug_exposure', COUNT(*),
    SUM(CASE WHEN drug_concept_id = 0 THEN 1 ELSE 0 END),
    ROUND(SUM(CASE WHEN drug_concept_id = 0 THEN 1 ELSE 0 END) * 100.0
          / COUNT(*), 1)
FROM drug_exposure
UNION ALL
SELECT 'measurement', COUNT(*),
    SUM(CASE WHEN measurement_concept_id = 0 THEN 1 ELSE 0 END),
    ROUND(SUM(CASE WHEN measurement_concept_id = 0 THEN 1 ELSE 0 END) * 100.0
          / COUNT(*), 1)
FROM measurement;

Summary

  1. CONCEPT: ~10 million records, each medical concept has a unique concept_id
  2. standard_concept: S = Standard (mainly used), C = Classification, NULL = Source
  3. domain_id determines which CDM table the data is stored in
  4. VOCABULARY: 70+ dictionary sources (SNOMED, RxNorm, LOINC, ICD-10...)
  5. concept_id = 0: "cannot map" — used when ETL cannot find the Standard Concept
  6. Look up: athena.ohdsi.org or query the CONCEPT table directly

Next article: CONCEPT_RELATIONSHIP & CONCEPT_ANCESTOR — relationship and hierarchy between Concepts.


References