
Get Companies from Health Canada Drug Product Database
Source:R/get_hc_companies.R
get_hc_companies.Rd
Retrieves information on all pharmaceutical companies listed in the
Health Canada Drug Product Database (DPD) using the
RESTful API endpoint /drug/company
.
This includes details such as the company code, company name, address, city, province, postal code, and country. Each record corresponds to a company associated with one or more approved or discontinued drug products.
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:
company_code
: Unique identifier for the companycompany_name
: Official registered name of the companycompany_type
: Type of company (e.g., "DIN OWNER", "Manufacturer")city_name
: City where the company is locatedprovince_name
: Province or territory (if applicable)country_name
: Country namepostal_code
: Postal code or ZIP codestreet_name
: Street address
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 includes a small rate limit delay between successive API requests.
The columns post_office_box
and suite_number
are automatically
removed as they generally contain incomplete or irrelevant information.
If the API request fails or returns an error status code,
the function returns NULL
with an informative message.
Examples
if (interactive()) {
get_hc_companies()
}