Description Usage Arguments Details Value Examples
Cost of administration for an intravenous treatment
1 2 | cost_iv_administration(iv_time, cost_first_unit, cost_addl_units,
prorate_first = FALSE)
|
iv_time |
The infusion time, in units compatible with the costs |
cost_first_unit |
cost for the first time unit |
cost_addl_units |
cost for the second time unit |
prorate_first |
can we charge for less than 1 unit of time? See details. |
Simple formula: cost for the first time unit (prorated if
total time is less than one unit and prorate_first == TRUE
)
plus the prorated cost for additional units.
If prorate_first == FALSE
, then the smallest time that
can be charged is one time unit. For example, if time = 0.5
and prorate_first == TRUE
, the function will charge for one
half of a time unit. If time = 0.5 and prorate_first == FALSE
,
the function will charge for a full time unit.
the cost
1 2 3 4 | cost_iv_administration(0.5, 100, 20, prorate_first = TRUE) # = 50
cost_iv_administration(1.5, 100, 20, prorate_first = TRUE) # = 110
cost_iv_administration(0.5, 100, 20, prorate_first = FALSE) # = 100
cost_iv_administration(1.5, 100, 20, prorate_first = FALSE) # = 110
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.