Drug Era‎ > ‎

DER17: Counts of drug era records stratified by observation month

This query is used to count the drug era records stratified by observation month. The input to the query is a value (or a comma-separated list of values) of a month. If the input is ommitted, all possible values are summarized.

Input:
 Parameter  Example  Mandatory  Notes
list of month numbers 3, 5 Yes

Sample query run:
The following is a sample run of the query. The input parameters are highlighted in blue

select  extract(month from er.drug_era_start_date) month_num, COUNT(1) as eras_in_month_count 
from drug_era er
where extract(month from er.drug_era_start_date) in (3, 5)
group by extract(month from er.drug_era_start_date)
order by 1 
;
Output:
Output field list:
 Field  Description
drug_era_id A system-generated unique identifier for each drug era.
drug_era_start_date The start date for the drug era constructed from the individual instances of drug exposures. It is the start date of the very first chronologically recorded instance of utilization of a drug.
month

Sample output record:
 Field  Description
drug_era_id
drug_era_start_date
month
Comments