get_hc_din: Get All DINs from Health Canada Drug Product Database

View source: R/get_hc_din.R

get_hc_dinR Documentation

Get All DINs from Health Canada Drug Product Database

Description

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.

Usage

get_hc_din()

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.

Value

A tibble with a single column:

  • din: The Drug Identification Number

Note

Requires an internet connection.

Source

Health Canada Drug Product Database (DPD) API: https://health-products.canada.ca/api/documentation/dpd-documentation-en.html

See Also

GET, fromJSON, as_tibble, rename

Examples


  # This function requires an internet connection and downloads data from Health Canada
  get_hc_din()



MedxR documentation built on Jan. 14, 2026, 5:08 p.m.