
Get Pharmaceutical Forms from Health Canada Drug Product Database
Source:R/get_hc_forms.R
get_hc_forms.RdRetrieves information on all pharmaceutical dosage forms listed in the
Health Canada Drug Product Database (DPD) using the
RESTful API endpoint /drug/form.
This includes details such as the drug code, form code, and the pharmaceutical form name (e.g., tablet, capsule, solution).
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 product.pharm_form_code: Code representing the pharmaceutical form.pharm_form_desc: Description of the pharmaceutical form (e.g., Tablet, Capsule, Solution).
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 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_forms()
#> # A tibble: 62,167 × 3
#> drug_code pharmaceutical_form_code pharmaceutical_form_name
#> <int> <int> <chr>
#> 1 9580 43 Ointment
#> 2 6309 43 Ointment
#> 3 6529 43 Ointment
#> 4 11946 43 Ointment
#> 5 10005 43 Ointment
#> 6 9581 43 Ointment
#> 7 10881 43 Ointment
#> 8 10995 43 Ointment
#> 9 11634 43 Ointment
#> 10 10133 43 Ointment
#> # ℹ 62,157 more rows
# }