This function is an interface to the
within the medExtractR package, and allows drug dosing information to be extracted
from free-text sources, e.g., clinical notes.
extractMed(note_fn, drugnames, drgunit, windowlength, max_edit_dist = 0, ...)
File name(s) for the text file(s) containing the clinical notes. Can be a character string for an individual note, or a vector or list of file names for multiple notes.
Vector of drug names for which dosing information should be extracted. Can include various forms (e.g., generic, brand name) as well as abbreviations.
Unit of the drug being extracted, e.g., 'mg'
Length of the search window (in characters) around the drug name in which to search for dosing entities
Maximum edit distance allowed when attempting to extract
Additional arguments to
Medication information, including dosing data, is often stored in free-text sources such as
clinical notes. The
extractMed function serves as a convenient wrapper for the
medExtractR package, a natural language processing system written in R for extracting
medication data. Within
identifies dosing data for drug(s) of interest, specified by the
using rule-based and dictionary-based approaches. Relevant dosing entities include medication
strength (identified using the
unit argument), dose amount, dose given intake, intake
time or frequency of dose, dose change keywords (e.g., 'increase' or 'decrease'), and time of
last dose. After applying
to extract drug dosing information,
extractMed appends the file name to results to ensure
they are appropriately labeled.
See EHR Vignette for for Extract-Med and Pro-Med-NLP. For more details, see Weeks, et al. 2020.
A data.frame with the extracted dosing information, labeled with file name as an identifier
tac_fn <- list(system.file("examples", "tacpid1_2008-06-26_note1_1.txt", package = "EHR"), system.file("examples", "tacpid1_2008-06-26_note2_1.txt", package = "EHR"), system.file("examples", "tacpid1_2008-12-16_note3_1.txt", package = "EHR")) extractMed(tac_fn, drugnames = c("tacrolimus", "prograf", "tac", "tacro", "fk", "fk506"), drgunit = "mg", windowlength = 60, max_edit_dist = 2, lastdose=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.