
Search Drug Products by Brand Name in Health Canada Drug Product Database
Source:R/get_hc_search_drug.R
get_hc_search_drug.RdRetrieves 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.
Source
Health Canada Drug Product Database (DPD) API: https://health-products.canada.ca/api/documentation/dpd-documentation-en.html
Value
A tibble with the following columns:
drug_code: Unique code identifying the drug productclass_name: Class of drug (e.g., Human, Veterinary)din: Drug Identification Number (DIN)brand_name: Brand or trade name of the productnumber_of_ais: Number of active ingredientsai_group_no: Active ingredient group numbercompany_name: Manufacturer namelast_update_date: Date of last update in the database
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.
Examples
# \donttest{
# This function requires an internet connection and downloads data from Health Canada
get_hc_search_drug("NEMBUTAL")
#> # A tibble: 2 × 8
#> drug_code class_name din brand_name number_of_ais ai_group_no company_name
#> <int> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 114 Human 000000… NEMBUTAL … 1 0106017001 ABBOTT LABO…
#> 2 2576 Human 000002… NEMBUTAL … 1 0106017003 ABBOTT LABO…
#> # ℹ 1 more variable: last_update_date <chr>
# }