lookups: Lookups Table

lookupsR Documentation

Lookups Table

Description

A lookup table of pre-analysed dosage texts to speed up the processing of new texts. Texts which are difficult to interpret or which cause errors can also be added to this table.

Usage

data(lookups)

Format

A data frame with the following 12 variables.

textid

numeric; lookup line identifier

text

character; the dosage text

qty

numeric; quantity per dose

units

character; dose units

freq

numeric; dose frequency per time period

tot

numeric; total dose per time period

max

character: 'max', 'average', or 'exact'

time

numeric; time interval in number of days

change

character: 'first', 'second', or 'nochange'. If doses for different time periods combined using simplify=TRUE, change states which dose contributes to the output.

choice

character; 'choice', 'asneeded', or 'nochoice'

duration

numeric; duration of prescription

daily_dose

numeric; calculated daily dose

Details

Only a single row is permitted per dosage text. Users can specify a 'customlookups' table in the same format to provide alternative lookups. The lookups table is processed by as.drugdose_lookups.

References

Shah AD, Martinez C. An algorithm to derive a numerical daily dose from unstructured text dosage instructions. Pharmacoepidemiol Drug Saf 2006; 15(3): 161-166. doi: 10.1002/pds.1151 http://onlinelibrary.wiley.com/doi/10.1002/pds.1151/

See Also

as.drugdose_singlewords, as.drugdose_multiwords as.drugdose_patterns, as.drugdose_lookups, export, addterm

Examples

# Import the raw table
data("lookups")

# Convert into the lookup table format
lookups <- as.drugdose_lookups(lookups)

CALIBERdrugdose documentation built on July 4, 2024, 3:01 p.m.