Skip to content

Commit

Permalink
altered logic when t_inf==0 to update to 1/60 for infusion, sc, and im
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanBrooks33 committed Jun 6, 2024
1 parent 880e416 commit 1693710
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions R/new_regimen.R
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,8 @@ new_regimen <- function(
}
if(any(reg$type == "infusion" | reg$type == "sc" | reg$type == "im")) {
if(any(reg$t_inf == 0)) {
reg$t_inf[reg$t_inf == 0 & (type =="sc" | type =="im")] <- 1/60
reg$rate[reg$t_inf == 0 & (type =="sc" | type =="im")] <- 60
reg$t_inf[reg$t_inf == 0 & type == "infusion"] <- 1/60
reg$rate[reg$t_inf == 0 & type == "infusion"] <- 60
reg$t_inf[reg$t_inf == 0] <- 1/60
reg$rate[reg$t_inf == 0] <- 60
}
}
if(any(reg$type == "bolus")) {
Expand Down

0 comments on commit 1693710

Please sign in to comment.