time_regex {medExtractR} | R Documentation |
Keywords Specifying Time Expressions
Description
A vector of regular expressions to identify different forms of time
expressions for last dose time. These are the default values used in link{extract_lastdose}
.
Usage
time_regex
Format
A vector with 5 regular expressions for the following categories.
- am/pm
Time is indicated by the presence of ‘am’ or ‘pm’ following a numeric expression.
- military
Time is given in military time, for unambiguous times of 13:00-23:59.
- qualifier_after
Am/pm indication is implicit through a qualifying term like ‘last night’ or ‘this morning’. The qualifier occurs after the time, e.g., ‘10 last night.’
- qualifier_before
Am/pm indication is implicit through a qualifying term like ‘last night’ or ‘this morning’. The qualifier occurs before the time, e.g., ‘last night at 10.’
- duration
Time (in hours) between the last dose and most recent lab value
Details
Certain expressions which might be considered ambiguous are excluded from the regular expressions presented here. For instance, expressions such as ‘600’ could refer to either 6am or 6pm.
Examples
data(time_regex)