This query is used to count the drug exposure records for a certain drug (drug_concept_id). The input to the query is a
value (or a comma-separated list of values) of a drug_concept_id. See vocabulary queries
for obtaining valid drug_concept_id values. If
the input is omitted, all drugs in the data table are summarized.
Input:
Parameter |
Example |
Mandatory |
Notes |
list of drug_concept_id |
40165254, 40165258 |
No |
Crestor 20 and 40 mg tablets |
Sample query run:
The following is a sample run of the query. The input parameters are highlighted in blue.
SELECT concept_name, drug_concept_id, count(*) AS num_records
FROM drug_exposure
JOIN vocabulary.concept ON concept_id = drug_concept_id
WHERE drug_concept_id
IN /* crestor 20 and 40 mg tablets */
( 40165254, 40165258 )
GROUP BY concept_name, drug_concept_id;
Output:
Output field list:
Field |
Description |
drug_name |
An unambiguous, meaningful and descriptive name for the drug concept. |
drug_concept_id |
A foreign key that refers to a standard concept identifier in the vocabulary for the drug concept. |
num_records
|
The number of drug exposure records
|
Sample output record:
Field |
Content |
drug_name |
Rosuvastatin calcium 20 MG Oral Tablet [Crestor] |
drug_concept_id |
40165254 |
num_records
|
191244
|
|