| This query provides the provider specialties prescribing a given drug, and the frequencies for each provider prescribing the drug (drug exposure records). Note that many databases do not record the prescribing provider for drugs. See vocabulary queries for obtaining valid drug_concept_id values.
The following is a sample run of the query. The input parameters are highlighted in blue.
SELECT c.concept_name AS specialty,
COUNT(*) AS prescriptions_count
FROM @cdm.drug_exposure drug
JOIN @cdm.provider p
ON p.provider_id = drug.provider_id
JOIN @vocab.concept c
ON c.concept_id = p.specialty_concept_id
WHERE c.vocabulary_id = 'Specialty'
AND drug.drug_concept_id = 2213473 /* Influenza virus vaccine */
AND c.standard_concept = 'S'
GROUP BY c.concept_name
ORDER BY prescriptions_count desc;
| Parameter | Example | Mandatory | Notes | | --- | --- | --- | --- | | drug_concept_id | 2213473 | Yes | Influenza virus vaccine |
| Field | Description | | --- | --- | | specialty | The concept name of the specialty concept | | prescriptions_count | The count of drug exposure records providers from the specialties are listed as prescribing provider. |
| Field | Value | | --- | --- | | specialty | Family Practice | | prescriptions_count | 214825 |
https://github.com/OHDSI/CommonDataModel/wiki/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.