stdzStrength {EHR} | R Documentation |
Standardize Strength Entity
Description
This function standardizes the strength entity.
Usage
stdzStrength(str, freq)
Arguments
str |
character vector of extracted strength values |
freq |
character vector of extracted frequency values |
Details
Some strength strings may include multiple values and additional interpretation may be needed. For example ‘2-1’ likely indicates a strength of 2 followed by a strength of 1. Thus a single element may need to be standarized into two elements. This can only happen if the frequency entity is missing or in agreement (‘bid’ for example). See the ‘addl_data’ attribute of the returned vector.
Value
numeric vector
Examples
stdzStrength(c('1.5', '1/2', '1/1/1'))
stdzStrength(c('1.5', '1/2', '1/1/1'), c('am', 'daily', NA))
stdzStrength(c('1.5', '1/2', '1/1/1'), FALSE)
[Package EHR version 0.4-11 Index]