extract_from_prescription {doseminer} | R Documentation |
Extract dosage information from free-text English-language prescriptions
Description
This is the main workhorse function for the doseminer
package.
Pass in a character vector of prescribing instructions and it will extract
structured dosage information.
Usage
extract_from_prescription(txt)
Arguments
txt |
A character vector of freetext prescriptions |
Details
To avoid redundant computation, it is recommended to remove duplicate
elements from the input vector. The results can be joined back to the
original data using the raw
column.
Value
A data.frame
with seven columns:
- raw
the input character vector
- output
a residual character vector of 'non-extracted' text. For debugging.
- freq
number of doses administered per day
- itvl
number of days between doses
- dose
quantity of medication in each dose
- unit
unit of measurement of medication, if any
- optional
integer. Can the dose be zero? 1 if yes, otherwise 0
Examples
extract_from_prescription(example_prescriptions)
[Package doseminer version 0.1.2 Index]