This query is used to count drug exposure count values (drug_exposure_count) across all drug era records, stratified by drug type (drug_type_concept_id). The input to the query is a value (or a comma-separated list of values) of a drug_exposure_count and a drug_type_concept_id . If the input is omitted, all possible value combinations are summarized.
Input:
Parameter |
Example |
Mandatory |
Notes |
list of drug_exposure_count |
2,5 |
Yes |
|
drug_type_concept_id |
38000182 |
Yes |
|
Sample query run:
The following is a sample run of the query. The input parameters are highlighted in blue
SELECT
count(1) as stat_value,
t.drug_TYPE_concept_id,
t.drug_exposure_count
FROM drug_era t
where
t.drug_exposure_count in (2,5)
and
t.drug_TYPE_concept_id = 38000182
GROUP BY t.drug_TYPE_concept_id,
t.drug_exposure_count
ORDER BY t.drug_TYPE_concept_id,
t.drug_exposure_count
;
Output:
Output field list:
Field |
Description |
drug_type_concept_id |
A foreign key to the predefined concept identifier in the vocabulary reflecting the parameters used to construct the drug era.
|
drug_exposure_count |
The number of individual drug exposure occurrences used to construct the drug era.
|
drug_era |
|
Sample output record:
Field |
Description |
drug_type_concept_id |
|
drug_era |
|
|