inst/shinyApps/QueryLibrary/queries/condition/C01.md

C01: Find condition by concept ID

Description

Find condition by condition ID is the lookup for obtaining condition or disease concept details associated with a concept identifier. This query is a tool for quick reference for the name, class, level and source vocabulary details associated with a concept identifier, either SNOMED-CT clinical finding or MedDRA. This query is equivalent to G01, but if the concept is not in the condition domain the query still returns the concept details with the Is_Disease_Concept_Flag field set to 'No'.

Query

The following is a sample run of the query to run a search for specific disease concept ID.

SELECT
  c.concept_id       AS condition_concept_id,
  c.concept_name     AS condition_concept_name,
  c.concept_code     AS condition_concept_code,
  c.concept_class_id AS condition_concept_class,
  c.vocabulary_id    AS condition_concept_vocab_id,
  CASE c.vocabulary_id
  WHEN 'SNOMED'
    THEN CASE lower(c.concept_class_id)
         WHEN 'clinical finding'
           THEN 'Yes'
         ELSE 'No' END
  WHEN 'MedDRA'
    THEN 'Yes'
  ELSE 'No'
  END                AS is_disease_concept_flag
FROM @vocab.concept AS c
WHERE
  c.concept_id = 192671 AND 
  c.invalid_reason IS NULL
;

Input

| Parameter | Example | Mandatory | Notes | | --- | --- | --- | ------------------------------------------- | | Concept ID | 192671 | Yes | Concept Identifier for 'GI - Gastrointestinal haemorrhage' |

Output

| Field | Description | | --- | ----------------------------------------------- | | Condition_Concept_ID | Condition concept Identifier entered as input | | Condition_Concept_Name | Name of the standard condition concept | | Condition_Concept_Code | Concept code of the standard concept in the source vocabulary | | Condition_Concept_Class | Concept class of standard vocabulary concept | | Condition_Concept_Vocab_ID | Vocabulary the standard concept is derived from as vocabulary code | | Is_Disease_Concept_Flag | Flag indicating whether the Concept ID belongs to a disease concept. 'Yes' if disease concept, 'No' if not a disease concept |

Example output record

| Field | Value | | --- | ----------------------------------------------- | | Condition_Concept_ID | 192671 | | Condition_Concept_Name | GI - Gastrointestinal hemorrhage | | Condition_Concept_Code | 74474003 | | Condition_Concept_Class | Clinical finding | | Condition_Concept_Vocab_ID | SNOMED | | Is_Disease_Concept_Flag | Yes |

Documentation

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



OHDSI/QueryLibrary documentation built on Aug. 1, 2023, 5:42 a.m.