This query is used to count the condition type concepts (condition_type_concept_id, in the CDM V2 condition_occurrence_type) across all condition occurrence records. The input to the query is a value of a condition_type_concept_id.
SELECT condition_type_freq, condition_type_concept_id, concept_name
FROM (
SELECT condition_type_concept_id,
count(*) AS condition_type_freq
FROM @cdm.condition_occurrence
WHERE condition_concept_id = 372409
GROUP BY condition_type_concept_id
) AS condition_type_count
LEFT JOIN (
SELECT concept_id,
concept_name
FROM @vocab.concept
) AS type_concept
ON condition_type_count.condition_type_concept_id=type_concept.concept_id
ORDER BY condition_type_freq;
| Parameter | Example | Mandatory | Notes | | --- | --- | --- | --- | | condition_concept_id | 31967 | Yes | Condition concept identifier for 'Nausea' |
| Field | Description | | --- | --- | | condition_type_freq | Frequency of a specific condition_type | | condition_type_concept_id | Unique ID for condition_type | | concept_name | Description of the condition's data source |
| Field | Description | | --- | --- | | condition_type_freq | 4735 | | condition_type_concept_id | 38000235 | | concept_name | Outpatient header - 6th position |
https://github.com/OHDSI/CommonDataModel/wiki/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.