Title: | Drug Ontology Parsing Engine |
---|---|
Description: | Provides information on drug names (brand, generic and street) for drugs tracked by the DEA. There are functions that will search synonyms and return the drug names and types. The vignettes have extensive information on the work done to create the data for the package. |
Authors: | Raymond Balise [aut, cre] , Layla Bouzoubaa [aut] , Gabriel Odom [aut] , Nathaniel Castor [aut] |
Maintainer: | Raymond Balise <[email protected]> |
License: | MIT + file LICENSE |
Version: | 2.1.0 |
Built: | 2024-10-31 18:38:24 UTC |
Source: | https://github.com/ctn-0094/dope |
Given a Drug Lookup table as returned by the function
lookup
, collapse rows from unwanted columns
compress_lookup( lookupTable, compressOriginalWord = FALSE, compressClass = FALSE, compressCategory = FALSE, compressSynonym = TRUE )
compress_lookup( lookupTable, compressOriginalWord = FALSE, compressClass = FALSE, compressCategory = FALSE, compressSynonym = TRUE )
lookupTable |
A lookup table with category |
compressOriginalWord |
Should the search word(s) be collapsed? Defaults to
|
compressClass |
Should the drug class be collapsed? Defaults to
|
compressCategory |
Should the drug category be collapsed? Defaults to
|
compressSynonym |
Should the drug synonym / street name be collapsed?
Defaults to |
A compressed lookup table, with unwanted columns removed.
longExampleTable <- lookup("dope", "methamphetamine") compress_lookup(longExampleTable) compress_lookup(longExampleTable, compressCategory = TRUE)
longExampleTable <- lookup("dope", "methamphetamine") compress_lookup(longExampleTable) compress_lookup(longExampleTable, compressCategory = TRUE)
A dataset containing a unique record for each the drug categories and their respective brand names.
data(dea_brands)
data(dea_brands)
A tibble with 28 rows and 2 variables:
the drug category
Drug brand name
A dataset containing
data(dea_controlled)
data(dea_controlled)
A tibble with 29 rows and 3 variables:
formal drug name
DEA number
drug schedule number
Yes No indicator if the drug is a narcotic
synonym name
A dataset containing a record for each drug category listed on https://www.dea.gov/factsheets, the class in which that drug belongs in and path to the factsheet.
data(dea_factsheets)
data(dea_factsheets)
A tibble with 29 rows and 3 variables:
the drug class
the drug category
the unique path to the drug's factsheet
https://www.dea.gov/factsheets
A dataset containing slag provided by the DEA
data(dea_street_names)
data(dea_street_names)
A tibble with 1734 rows and 3 variables:
DEA drug category
Brand name of drug
slang name
A dataset containing a record of drugs used by a patient. The textdrug
field is unstructured.
data(drug_df)
data(drug_df)
A tibble with 500 rows and 3 variables:
A free-text field of drug names
Patient sex
Patient race
These are extraneous words or characters found in several clinical data that have been accumulated to form a vector that can be used to parse out drug names from corpus of text.
data(drug_stop_words)
data(drug_stop_words)
A vector with 47 words:
A dataset containing a unique record for each the drug names and their classes and categories.
data(iqvia)
data(iqvia)
A tibble with 125 rows and 3 variables:
drug category
the drug class
drug name
This function provides a table with drug class and category information all of the known drugs.
lookup( drug_vec = NULL, ..., searchClass = TRUE, searchCategory = TRUE, searchSynonym = TRUE )
lookup( drug_vec = NULL, ..., searchClass = TRUE, searchCategory = TRUE, searchSynonym = TRUE )
drug_vec |
a vector of strings holding possible drug names |
... |
multiple strings holding possible drug names |
searchClass |
Should the substances listed in |
searchCategory |
Should the substances listed in |
searchSynonym |
Should the substances listed in |
A lookup table with category data.frame
having four columns:
original search term, drug class, drug category, and drug street name.
lookup("zip", "shrooms")
lookup("zip", "shrooms")
A dataset containing a record for each drug synonym
data(lookup_df)
data(lookup_df)
A tibble with 4,296 rows and 3 variables:
the drug class
the drug category
drug synonym
This function provides a table with drug synonyms that have the same class and category as the search term.
lookup_syn(drug_name)
lookup_syn(drug_name)
drug_name |
a string of a single drug name. |
A lookup table with category data.frame
having three columns:
drug class, drug category match, and synonym name.
lookup_syn("zip")
lookup_syn("zip")
A dataset containing a record for a drug rleated term and it's description. This contains both drug names and other things like drug amounts.
data(noslang_raw)
data(noslang_raw)
A tibble with 3172 rows and 2 variables:
Slang term
Text description of drug term
A dataset containing a record for a drug slang term and it's description.
data(noslang_street_names)
data(noslang_street_names)
A tibble with 3172 rows and 2 variables:
Slang term
Text description of drug term
This function provides a dataframe of parsed out strings from a free text field, input as a vector, specified by the user.
parse(drug_vec)
parse(drug_vec)
drug_vec |
A vector containing the free text to be parsed |
A n x 1 vector of class character
.
parse("Lortab and Percocet")
parse("Lortab and Percocet")