Learn R Programming

MedxR (version 0.1.0)

get_hc_search_drug: Search Drug Products by Brand Name in Health Canada Drug Product Database

Description

Retrieves drug products from the Health Canada Drug Product Database (DPD) that match a specific brand (commercial) name using the RESTful API endpoint /drug/drugproduct?search=<brand_name>.

This includes details such as the Drug Identification Number (DIN), product name, class, number of active ingredients, company name, and update date for each approved or discontinued pharmaceutical product.

Usage

get_hc_search_drug(brand_name)

Value

A tibble with the following columns:

  • drug_code: Unique code identifying the drug product

  • class_name: Class of drug (e.g., Human, Veterinary)

  • din: Drug Identification Number (DIN)

  • brand_name: Brand or trade name of the product

  • number_of_ais: Number of active ingredients

  • ai_group_no: Active ingredient group number

  • company_name: Manufacturer name

  • last_update_date: Date of last update in the database

Arguments

brand_name

A character string representing the commercial name of the drug.

Details

This function sends a GET request to the Health Canada Drug Product Database API. It supports caching via the memoise package to avoid redundant calls, and respects a rate limit between successive API requests.

If the API request fails, returns no matches, or returns an error status code, the function returns NULL with an informative message.

See Also

Examples

Run this code
# \donttest{
  # This function requires an internet connection and downloads data from Health Canada
  get_hc_search_drug("NEMBUTAL")
# }

Run the code above in your browser using DataLab