From 9d7cd7350567eb7cf8479cf1c9fdf47c79fc44e5 Mon Sep 17 00:00:00 2001 From: Ron Keizer Date: Wed, 8 Oct 2025 17:05:05 +0000 Subject: [PATCH] temp fix for oral --- R/parse_input_data.R | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/R/parse_input_data.R b/R/parse_input_data.R index 3264cf9..7cd92a5 100644 --- a/R/parse_input_data.R +++ b/R/parse_input_data.R @@ -43,6 +43,15 @@ parse_nm_data <- function(data, covariates, group = NULL) { out <- list() out$covariates <- make_covariates_object(data, covariates) out$regimen <- PKPDsim::nm_to_regimen(data) + ## Temporary fix!! + out$regimen$cmt <- data |> + dplyr::filter(EVID == 1) |> + dplyr::pull(CMT) + out$regimen$type <- data |> + dplyr::filter(EVID == 1) |> + dplyr::mutate(type = dplyr::if_else(CMT == 1, "oral", "infusion")) |> + dplyr::pull(type) + ## /tmp obs <- data |> dplyr::filter(.data$EVID == 0) if(!is.null(group)) {