View source: R/get_hc_companies.R
| get_hc_companies | R Documentation |
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.
get_hc_companies()
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.
A tibble with the following columns:
company_code: Unique identifier for the company
company_name: Official registered name of the company
company_type: Type of company (e.g., "DIN OWNER", "Manufacturer")
city_name: City where the company is located
province_name: Province or territory (if applicable)
country_name: Country name
postal_code: Postal code or ZIP code
street_name: Street address
Requires an active internet connection.
Health Canada Drug Product Database (DPD) API: https://health-products.canada.ca/api/documentation/dpd-documentation-en.html
GET,
fromJSON,
as_tibble
# This function requires an internet connection and downloads data from Health Canada
get_hc_companies()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.