dbparser (version 1.2.0)

drug_products: Drug Products parser

Description

A list of commercially available products in Canada and the United States that contain the drug.

Usage

drug_products(
  save_table = FALSE,
  save_csv = FALSE,
  csv_path = ".",
  override_csv = FALSE,
  database_connection = NULL
)

Value

a tibble with 32 variables:

name

The proprietary name(s) provided by the manufacturer for any commercially available products containing this drug.

labeller

The corporation responsible for labelling this product.

ndc-id

The National Drug Code (NDC) identifier of the drug

ndc-product-code

The National Drug Code (NDC) product code from the FDA National Drug Code directory.

dpd-id

Drug Product Database (DPD) identification number (a.k.a. DIN) from the Canadian Drug Product Database. Only present for drugs that are marketed in Canada

ema-product-code

EMA product code from the European Medicines Agency Database. Only present for products that are authorised by central procedure for marketing in the European Union.

ema-ma-number

EMA marketing authorisation number from the European Medicines Agency Database. Only present for products that are authorised by central procedure for marketing in the European Union.

started-marketing-on

The starting date for market approval.

ended-marketing-on

The ending date for market approval.

dosage-form

The pharmaceutical formulation by which the drug is introduced into the body.

strength

The amount of active drug ingredient provided in the dosage

route

The path by which the drug or product is taken into the body

fda-application-number

The New Drug Application [NDA] number assigned to this drug by the FDA.

over-the-counter

A list of Over The Counter (OTC) forms of the drug.

generic

Whether this product is a generic drug.

approved

Indicates whether this drug has been approved by the regulating government.

country

The country where this commercially available drug has been approved.

source

Source of this product information. For example, a value of DPD indicates this information was retrieved from the Canadian Drug Product Database.

standing

One of good, discordant, or deprecated. Distinguishes products with up to date ingredient information (good) from products with conflicting information (discordant) or products that have been removed from an active label (deprecated).

standing-updated-on

The date on which the standing was last updated

standing-reason

Explains the non-good standing of the product. One of: ingredient_change, code_duplication, invalid, or removed.

jurisdiction-marketing-category

The marketing category of this product in its jurisdiction

branded

Whether this product has a named brand

prescription

Whether this product is only available with a prescription

unapproved

Whether this product is not approved in its jurisdiction

vaccine

Whether this product is a vaccine

allergenic

Whether this product is used in allergenic testing

cosmetic

Whether this product is a cosmetic, such as sunscreen

kit

Whether this product is a kit composed of multiple distinct parts

solo

Whether this product has only a single active ingredient

available

Whether this product can be sold in its jurisdiction

drugbank_id

drugbank id

Arguments

save_table

boolean, save table in database if true.

save_csv

boolean, save csv version of parsed tibble if true

csv_path

location to save csv files into it, default is current location, save_csv must be true

override_csv

override existing csv, if any, in case it is true in the new parse operation

database_connection

DBI connection object that holds a connection to user defined database. If save_table is enabled without providing value for this function an error will be thrown.

read_drugbank_xml_db

read_drugbank_xml_db function must be called first before any parser.

If read_drugbank_xml_db is called before for any reason, so no need to call it again before calling this function.

See Also

Other drugs: drug_affected_organisms(), drug_ahfs_codes(), drug_atc_codes(), drug_calc_prop(), drug_categories(), drug_classification(), drug_dosages(), drug_ex_identity(), drug_exp_prop(), drug_external_links(), drug_food_interactions(), drug_general_information(), drug_groups(), drug_interactions(), drug_intern_brand(), drug_manufacturers(), drug_mixtures(), drug_packagers(), drug_patents(), drug_pdb_entries(), drug_pharmacology(), drug_prices(), drug_reactions_enzymes(), drug_reactions(), drug_salts(), drug_sequences(), drug_snp_adverse_reactions(), drug_snp_effects(), drug_syn()

Examples

Run this code
if (FALSE) {
# the same parameters and usage will be applied for any parser
# return only the parsed tibble
run_all_parsers()

# will throw an error, as database_connection is NULL
run_all_parsers(save_table = TRUE)

# save in database in SQLite in memory database and return parsed tibble
sqlite_con <- DBI::dbConnect(RSQLite::SQLite())
run_all_parsers(save_table = TRUE, database_connection = sqlite_con)

# save parsed tibble as csv if it does not exist in current location,
# and return parsed tibble.
# if the csv exist before read it and return its data.
run_all_parsers(save_csv = TRUE)

# save in database, save parsed tibble as csv,
# if it does not exist in current location and return parsed tibble.
# if the csv exist before read it and return its data.
run_all_parsers(save_table = TRUE, save_csv = TRUE,
database_connection = sqlite_con)

# save parsed tibble as csv if it does not exist in given location,
# and return parsed tibble.
# if the csv exist before read it and return its data.
run_all_parsers(save_csv = TRUE, csv_path = TRUE)

# save parsed tibble as csv if it does not exist in current location and
# return parsed tibble.
# if the csv exist override it and return it.
run_all_parsers(save_csv = TRUE, csv_path = TRUE, override = TRUE)
}

Run the code above in your browser using DataLab