This query is used to count conditions (condition_concept_id) across all condition era records stratified by condition era type (condition_type_concept_id, in CDM V2 condition_occurrence_type). The input to the query is a value (or a comma-separated list of values) of a condition_concept_id or a condition_type_concept_id. If the input is omitted, all existing value combinations are summarized.
Input:
Parameter |
Example |
Mandatory |
Notes |
list of condition_concept_id |
254761, 257011, 320128, 432867, 25297 |
No |
|
Sample query run:
The following is a sample run of the query. The input parameters are highlighted in blue
SELECT condition_concept_id, condition_type_concept_id, count(*) AS condition_count
FROM condition_era
WHERE condition_concept_id IN( 254761, 257011, 320128, 432867, 25297 )
GROUP BY condition_concept_id, condition_type_concept_id
ORDER BY condition_concept_id, condition_type_concept_id;
Output:
Output field list:
Field |
Description |
condition_type_concept_id |
A foreign key to the predefined concept identifier in the vocabulary reflecting the parameters used to construct the condition era. |
condition_concept_id |
A foreign key that refers to a standard condition concept identifier in the vocabulary. |
Sample output record:
Field |
Description |
condition_type_concept_id |
|
condition_concept_id |
|
|
|