inst/QueryLibrary/Aggregate/general/G02.md

G02: Find a concept by code from a source vocabulary

This query obtains the concept details associated with a concept code, such as name, class, level and source vocabulary.

Only concepts from the Standard Vocabularies can be searched using this query. If you want to translate codes from other Source Vocabularies to Standard Vocabularies use G06 query.

Query

The following is a sample run of the query to extract details for concept code of ‘74474003’ '. Note that in contrast to concept ID the concept codes are not unique across different vocabularies.

SELECT
  c.concept_id,
  c.concept_name,
  c.concept_code,
  c.concept_class_id,
  c.vocabulary_id
FROM @vocab.concept AS c
WHERE 
  c.concept_code = $1::text AND
  c.invalid_reason IS NULL
;

Input

| Parameter | Example | Mandatory | Notes | | --- | --- | --- | --- | | Concept Code | 74474003 | Yes | SNOMED-CT code for "Gastrointestinal hemorrhage". Concept code can be alpha-numeric. |

Output

| Field | Description | | --- | --- | | Concept_ID | Concept Identifier entered as input | | Concept_Name | Name of the standard concept | | Concept_Code | Concept code of the standard concept in the source vocabulary | | Concept_Class | Concept class of standard vocabulary concept | | Vocabulary_ID | Name of the vocabulary the standard concept is derived from |

Example output record

| Field | Value | | --- | --- | | Concept_ID | 192671 | | Concept_Name | Gastrointestinal hemorrhage | | Concept_Code | 74474003 | | Concept_Class | Clinical finding | | Vocabulary_ID | SNOMED |

Documentation

https://github.com/OHDSI/CommonDataModel/wiki/CONCEPT



sib-swiss/dsQueryLibraryServer documentation built on Feb. 13, 2025, 8:07 p.m.