Package 'OralOpioids'

Title: Retrieving Oral Opioid Information
Description: Provides details such as Morphine Equivalent Dose (MED), brand name and opioid content which are calculated of all oral opioids authorized for sale by Health Canada and the FDA based on their Drug Identification Number (DIN) or National Drug Code (NDC). MEDs are calculated based on recommendations by Canadian Institute for Health Information (CIHI) and Von Korff et al (2008) and information obtained from Health Canada's Drug Product Database's monthly data dump or FDA Daily database for Canadian and US databases respectively. Please note in no way should output from this package be a substitute for medical advise. All medications should only be consumed on prescription from a licensed healthcare provider.
Authors: Ankona Banerjee [aut, cre] , Erik Stricker [aut]
Maintainer: Ankona Banerjee <[email protected]>
License: GPL-3
Version: 2.0.4
Built: 2025-02-08 03:52:15 UTC
Source: https://github.com/ankonahouston/oralopioids

Help Index


Get the Brand name from Health Canada by using the DIN or NDC

Description

Brand retrieves the Brand name for an Oral Opioid from the HealthCanada_Opioid_Table.

Usage

Brand(Drug_ID, Opioid_Table)

Arguments

Drug_ID

A numeric value for the DIN or NDC. Exclude all zeros in front.

Opioid_Table

Opioid dataset which can be loaded by using the load_HealthCanada_Opioid_Table() or load_FDA_Opioid_Table() function. The name you use to call the function should be input here.

Value

Brand name

Examples

FDA_Opioid_Table <- load_Opioid_Table(no_download = TRUE, country="US")
HealthCanada_Opioid_Table <- load_Opioid_Table(no_download = TRUE, country="Canada")
Brand(786535, HealthCanada_Opioid_Table)
Brand("0093-0058", FDA_Opioid_Table)

Obtain the latest Opioid data from the FDA

Description

load_FDA_Opioid_Table compares the date of the local FDA_Opioid_Table and compares it with the latest date of data provided by FDA. In case the local file is outdated, an updated file will be generated.

Usage

load_FDA_Opioid_Table(filelocation = "", no_download = FALSE, verbose = TRUE)

Arguments

filelocation

String. The directory on your system where you want the dataset to be downloaded. If "", filelocation will be set to the download path within the OralOpioids package installation directory.

no_download

Logical. If set to TRUE, no downloads will be executed and no user input is required. Default: FALSE.

verbose

Logical. Indicates whether messages will be printed in the console. Default: TRUE.

Value

The function returns the FDA_Opioid_Table as a data.frame. Comments on the data.frame include a status message (msg), the FDA_Opioid_Table save path (path), a disclaimer, and the source for the retrieved data (source_url_data and source_url_dosing).

Examples

FDA_Opioid_Table <- load_FDA_Opioid_Table(no_download = TRUE)
  head(FDA_Opioid_Table)

Obtain the latest Opioid data from Health Canada

Description

load_HealthCanada_Opioid_Table compares the date of the local HealthCanada_Opioid_Table and compares it with the latest date of data provided Health Canada. In case the local file is outdated, an updated file will be generated.

Usage

load_HealthCanada_Opioid_Table(
  filelocation = "",
  no_download = FALSE,
  verbose = TRUE
)

Arguments

filelocation

String. The directory on your system where you want the dataset to be downloaded. If "", filelocation will be set to the download path within the OralOpioids package installation directory.

no_download

Logical. If set to TRUE, no downloads will be executed and no user input is required. Default: FALSE.

verbose

Logical. Indicates whether messages will be printed in the console. Default: TRUE.

Value

The function returns the HealthCanada_Opioid_Table as a data.frame. Comments on the data.frame include a status message (msg), the HealthCanada_Opioid_Table save path (path), a disclaimer, and the source for the retrieved data (source_url_data and source_url_dosing).

Examples

HealthCanada_Opioid_Table <- load_HealthCanada_Opioid_Table(no_download = TRUE)
  head(HealthCanada_Opioid_Table)

Obtain the latest Opioid data

Description

load_Opioid_Table compares the date of the local Opioid_Table and compares it with the latest date of data. In case the local file is outdated, an updated file will be generated.

Usage

load_Opioid_Table(
  filelocation = "",
  no_download = FALSE,
  verbose = TRUE,
  country = "ca"
)

Arguments

filelocation

String. The directory on your system where you want the dataset to be downloaded. If "", filelocation will be set to the download path within the OralOpioids package installation directory.

no_download

Logical. If set to TRUE, no downloads will be executed and no user input is required. Default: FALSE.

verbose

Logical. Indicates whether messages will be printed in the console. Default: TRUE.

country

String. Either "ca" (Canada), or "usa" (USA). Default: "ca".

Value

The function returns the Opioid_Table as a data.frame. Comments on the data.frame include a status message (msg), the Opioid_Table save path (path), a disclaimer, and the source for the retrieved data (source_url_data and source_url_dosing).

Examples

FDA_Opioid_Table <- load_Opioid_Table(no_download = TRUE, country = "usa")
  head(FDA_Opioid_Table)

Get the Morphine Equivalent Dose (MED) by using the DIN or NDC

Description

MED retrieves the Morphine Equivalent Dose from the Opioid_Table.

Usage

MED(Drug_ID, Opioid_Table)

Arguments

Drug_ID

A numeric value for the DIN or NDC. Exclude all zeros in front.

Opioid_Table

Opioid dataset which can be loaded by using the load_HealthCanada_Opioid_Table() or load_FDA_Opioid_Table() function. The name you use to call the function should be input here.

Value

MED: Morphine Equivalent Dose

Examples

FDA_Opioid_Table <- load_Opioid_Table(no_download = TRUE, country="US")
HealthCanada_Opioid_Table <- load_Opioid_Table(no_download = TRUE, country="Canada")
MED(786535, HealthCanada_Opioid_Table)
MED("0093-0058", FDA_Opioid_Table)

Maximum number of units/millilitres of oral opioids allowed per day assuming a daily limit of 50 MED/day for a DIN or NDC from the Opioid Table by using the DIN or NDC

Description

MED_50 gives us the maximum nuber of units (e.g. tablets or capsules for solid oral opioids and no. of millilitres for liquid oral opioids that are safe assuming a Morphine equivalent Dose of 50.)

Usage

MED_50(Drug_ID, Opioid_Table)

Arguments

Drug_ID

A numeric value for the DIN or NDC. Exclude all zeros in front.

Opioid_Table

Opioid dataset which can be loaded by using the load_HealthCanada_Opioid_Table() or load_FDA_Opioid_Table() function. The name you use to call the function should be input here.

Value

no. of units to reach 50 MED

Examples

FDA_Opioid_Table <- load_Opioid_Table(no_download = TRUE, country="US")
HealthCanada_Opioid_Table <- load_Opioid_Table(no_download = TRUE, country="Canada")
MED_50(786535, HealthCanada_Opioid_Table)
MED_50("0093-0058", FDA_Opioid_Table)

Maximum number of units/millilitres of oral opioids allowed per day assuming a daily limit of 90 MED/day for a DIN or NDC from the Opioid Table by using the DIN the NDC

Description

MED_90 gives us the maximum number of units (e.g. tablets or capsules for solid oral opioids and no. of millilitres for liquid oral opioids that are safe assuming a Morphine equivalent Dose of 90.)

Usage

MED_90(Drug_ID, Opioid_Table)

Arguments

Drug_ID

A numeric value for the DIN or NDC. Exclude all zeros in front.

Opioid_Table

Opioid dataset which can be loaded by using the load_HealthCanada_Opioid_Table() or load_FDA_Opioid_Table() function. The name you use to call the function should be input here.

Value

no. of units to reach 90 MED

Examples

FDA_Opioid_Table <- load_Opioid_Table(no_download = TRUE, country="US")
HealthCanada_Opioid_Table <- load_Opioid_Table(no_download = TRUE, country="Canada")
MED_90(786535, HealthCanada_Opioid_Table)
MED_90("0093-0058", FDA_Opioid_Table)

Get the Opioid content from Health Canada by using the DIN or NDC

Description

Opioid retrieves the Opioid content from the Opioid_Table.

Usage

Opioid(Drug_ID, Opioid_Table)

Arguments

Drug_ID

A numeric value for the DIN or NDC. Exclude all zeros in front.

Opioid_Table

Opioid dataset which can be loaded by using the load_HealthCanada_Opioid_Table() or load_FDA_Opioid_Table() function. The name you use to call the function should be input here.

Value

Opioid content

Examples

FDA_Opioid_Table <- load_Opioid_Table(no_download = TRUE, country="US")
HealthCanada_Opioid_Table <- load_Opioid_Table(no_download = TRUE, country="Canada")
Opioid(786535, HealthCanada_Opioid_Table)
Opioid("0093-0058", FDA_Opioid_Table)

OralOpioids: Obtain the latest information on Morphine equivalent doses provided by HealthCanada and the FDA

Description

This package provides details on Oral Opioids approved for sale by Health Canada and the FDA. Please note that the output generated by the package should not be substituted for clinical advise and any medication should be only consumed at the advise of a licensed healthcare provider.