drug_quantity: Return the amount of a drug to be ordered

View source: R/drug_quantity.R

drug_quantityR Documentation

Return the amount of a drug to be ordered

Description

Return the amount of a drug to be ordered

Usage

drug_quantity(
  forecast,
  distribution,
  min_stock,
  max_stock,
  p_min,
  p_max,
  inv_i,
  delta_pref,
  outstanding_orders
)

Arguments

forecast

dataframe with two columns- mean_demand and sd_demand

distribution

distr6 object defining the distribution of order arrival

min_stock

number level below which we want a probability < p_min of falling

max_stock

number level above which we want a prob < p_max of rising

p_min

number probability of going into emergency stock

p_max

number probability of ordering too much

inv_i

int the inventory at the time of this (the i'th) order

delta_pref

int the preferred order interval for drug in question

outstanding_orders

int the number of units in outstanding orders

Value

number giving amount to order


CDU-data-science-team/pharmacyReporting documentation built on March 24, 2023, 2:32 p.m.