This query is used to count the drug types (drug_type_concept_id) across all drug era records. The input to the query is a value (or a comma-separated list of values) of a drug_type_concept_id. If the input is ommitted, all possible values are summarized.
Input:
Parameter |
Example |
Mandatory |
Notes |
drug_type_concept_id |
|
Yes |
|
<None>
Sample query run:
The following is a sample run of the query. The input parameters are highlighted in blue
select count(distinct r.drug_type_concept_id) as totDrugType
from mdcr_cdm4.drug_era r;
select count(1) as cntRecs, r.drug_type_concept_id
from drug_era r
group by r.drug_type_concept_id
;
Output:
Output field list:
Field |
Description |
drug_era_id |
A system-generated unique identifier for each drug era. |
drug_type_concept_id |
A foreign key to the predefined concept identifier in the vocabulary reflecting the parameters used to construct the drug era. |
Count |
|
Sample output record:
Field |
Description |
drug_era_id |
|
drug_type_concept_id |
|
Count |
|
|