drug_prep {drugprepr}R Documentation

Run drug preparation algorithm

Description

Run drug preparation algorithm

Usage

drug_prep(data, plausible_values, decisions = rep("a", 10))

Arguments

data

data frame containing prescription data

plausible_values

data frame containing variables prodcode, min_qty, max_qty, min_ndd, max_ndd describing plausible ranges for values for each drug

decisions

character vector of length 10

Value

A data frame including estimated stop_date for each prescription

See Also

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

Examples

plausible_values <- data.frame(
  prodcode = c('a', 'b', 'c'),
  min_qty = 0,
  max_qty = c(50, 100, 200),
  min_ndd = 0,
  max_ndd = c(10, 20, 30)
)
drug_prep(example_therapy,
          plausible_values,
          decisions = c('a', 'a', 'a', 'a', 'a',
                        'c', 'a', 'a', 'a', 'a'))


[Package drugprepr version 0.0.4 Index]