decision_9: Decision 9: handle overlapping prescription periods

Description Usage Arguments Details See Also

View source: R/algorithm.R

Description

In situations where one prescription starts before another (for the same patient and drug) finishes, this function will either implicitly sum the doses (i.e. do nothing) or it will divide the intervals into non-overlapping subsets, shifting these sub-intervals forward in time until there is no overlap.

Usage

1
decision_9(data, decision = "a")

Arguments

data

a data frame

decision

one of the following strings:

"a"

allow overlapping prescriptions (implicitly sum doses)

"b"

move later prescription to next available time that this product is not prescribed

Details

The underlying algorithm for shifting overlapping intervals is implemented by the internal function shift_interval.

See Also

Other decision functions: decision_10(), decision_1(), decision_2(), decision_3(), decision_4(), decision_5(), decision_6(), decision_7(), decision_8(), drug_prep()


belayb/drugprepr documentation built on Dec. 19, 2021, 7:44 a.m.