get_hc_forms: Get Pharmaceutical Forms from Health Canada Drug Product...

View source: R/get_hc_forms.R

get_hc_formsR Documentation

Get Pharmaceutical Forms from Health Canada Drug Product Database

Description

Retrieves 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).

Usage

get_hc_forms()

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 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).

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

Examples


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



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