lookups | R Documentation |
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.
data(lookups)
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
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
.
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/
as.drugdose_singlewords
, as.drugdose_multiwords
as.drugdose_patterns
, as.drugdose_lookups
,
export
, addterm
# Import the raw table
data("lookups")
# Convert into the lookup table format
lookups <- as.drugdose_lookups(lookups)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.