Drug Exposure‎ > ‎

DEX19: How many people are taking a drug for a given indication?

 Parameter  Example  Mandatory  Notes
concept_name Acute Tuberculosis Yes

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

SELECT concept_name, count( distinct person_id  )
  FROM drug_exposure
  JOIN /* indication and associated drug ids */
     ( SELECT indication.concept_name, drug.concept_id
         FROM vocabulary.concept indication
         JOIN vocabulary.concept_ancestor ON ancestor_concept_id = indication.concept_id
         JOIN vocabulary.vocabulary indication_vocab 
           ON indication_vocab.vocabulary_id = indication.vocabulary_id
         JOIN vocabulary.concept drug ON drug.concept_id = descendant_concept_id
         JOIN vocabulary.vocabulary drug_vocab ON drug_vocab.vocabulary_id = drug.vocabulary_id
        WHERE indication_vocab.vocabulary_name = 'FDB Indication/Contraindication'
          AND indication.concept_class         = 'Indication or Contra-indication'
          AND indication.concept_name          = 'Acute Tuberculosis'
          AND drug_vocab.vocabulary_name       = 'RxNorm'
          AND drug.concept_level = 1
          AND sysdate BETWEEN drug.valid_start_date AND drug.valid_end_date
     ) ON concept_id = drug_concept_id
 GROUP BY concept_name;

Output field list:
 Field  Description
concept_name The reason the medication was stopped, where available. Reasons include regimen completed, changed, removed, etc.
drug_concept_id A foreign key that refers to a standard concept identifier in the vocabulary for the drug concept.
descendant_concept_id A foreign key to the predefined concept identifier in the vocabulary reflecting the type of drug exposure recorded. It indicates how the drug exposure was represented in the source data: as medication history, filled prescriptions, etc.
valid_start_date The date when the concept was first recorded.
valid_end_date The date when the concept became invalid because it was deleted or superseded (updated) by a new concept. The default value is 31-Dec-2099.

Sample output record:
 Field  Description