extract_from_prescription: Extract dosage information from free-text English-language...

Description Usage Arguments Details Value Examples

View source: R/extract.R

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

1

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

1

doseminer documentation built on July 19, 2021, 5:06 p.m.