Retrieves all Drug Identification Numbers (DINs) from the Health Canada
Drug Product Database (DPD) using the RESTful API endpoint /drug/drugproduct.
Only the DIN column is returned, renamed as din for convenience.
Source
Health Canada Drug Product Database (DPD) API: https://health-products.canada.ca/api/documentation/dpd-documentation-en.html
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_din()
#> # A tibble: 57,685 × 1
#> din
#> <chr>
#> 1 00000019
#> 2 00000027
#> 3 00000086
#> 4 00000175
#> 5 00000183
#> 6 00000213
#> 7 00000299
#> 8 00000302
#> 9 00000396
#> 10 00000434
#> # ℹ 57,675 more rows
# }
