time_regex: Keywords Specifying Time Expressions

Description Usage Format Details Examples

Description

A vector of regular expressions to identify different forms of time expressions for last dose time. This are the default values used in link{extract_lastdose}.

Usage

1

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

1

medExtractR documentation built on Aug. 1, 2020, 1:07 a.m.