Drug Exposure‎ > ‎

DEX32: Counts of drug exposure records per person

This query is used to count the number of drug exposure records (drug_exposure_id) for all persons. The input to the query is a value (or a comma-separated list of values) for a number of records per person. If the input is omitted, all possible values are summarized.

 Parameter  Example  Mandatory  Notes
drug_exposure_id 3, 4  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.person_id
FROM drug_exposure t 
group by t.person_id
having count(1) in (3,4)
Output field list:
 Field  Description
drug_exposure_id A system-generated unique identifier for each drug utilization event.
person_id A foreign key identifier to the person who is subjected to the drug. The demographic details of that person are stored in the person table.
count The number of individual drug exposure occurrences used to construct the drug era.

Sample output record:
 Field  Description