inst/QueryLibrary/Aggregate/general/G15.md

G15: Statistic about Concepts, Vocabularies, Classes and Levels

Description

This query generates the list of all vocabularies in the CONCEPT table (Standard and non-standard), their class, level and frequency.

Query

SELECT
  vocabulary_id    AS vocabulary_id,
  concept_class_id AS concept_class_id,
  standard_concept AS standard_concept,
  COUNT(*)::integer         AS num_records
FROM @vocab.concept
GROUP BY
  vocabulary_id,
  concept_class_id,
  standard_concept
ORDER BY vocabulary_id, concept_class_id, standard_concept
;

Input

None

Output

| Field | Description | | --- | --- | | vocabulary_id | OMOP Vocabulary ID | | concept_class | Concept Class | | standard_concept | 'S' if concept is standard, 'C' if a classification concept or empty if non-standard.| | num_records | Number of concepts |

Example output record

| Field | Value | | --- | --- | | vocabulary_id | SNOMED | | concept_class | Procedure | | standard_concept | 'S' | | num_records | 20286 |

Documentation

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



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