Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples where TDM is not available. #56

Open
Theodore-Loach opened this issue Sep 17, 2024 · 5 comments
Open

Examples where TDM is not available. #56

Theodore-Loach opened this issue Sep 17, 2024 · 5 comments

Comments

@Theodore-Loach
Copy link

Hey there, I didn't see any better place to ask questions, so I'm just making use of the issue system in place:

Just to contextualize my vast ignorance, I do not have a background in Pharmacology, so forgive any glaring misunderstandings on my part.

I'm trying to understand better how I could use this package in cases where TDM is not available (assuming that this means the DV column is 'NA' for every row). I'm was hoping to see if you could provide an example of what that looks like, or if I am going down the wrong line of thought about how these models can be used?

Thanks for any help!

@levenc
Copy link
Owner

levenc commented Sep 18, 2024

Hi @Theodore-Loach
You are correct: posologyr can be used in the absence of therapeutic drug monitoring. The classic situation is treatment initiation, when we try to select the optimal dose a priori.

There are several ways to do this. Here are a few examples.

Using poso_simu_pop() with n_simul=0

# a prior population model
mod_amikacin_Burdet2015 <- function() {
    ini({
      THETA_Cl=4.3
      THETA_Vc=15.9
      THETA_Vp=21.4
      THETA_Q=12.1
      ETA_Cl + ETA_Vc + ETA_Vp + ETA_Q ~
        c(0.1,
          0.01     ,   0.05 ,
          0.01     ,   0.02 ,   0.2  ,
          -0.06    ,   0.004,   0.003,    0.08)
      add_sd <- 0.2
      prop_sd <- 0.1
    })
    model({
      TVCl  = THETA_Cl*(CLCREAT4H/82)^0.7
      TVVc  = THETA_Vc*(TBW/78)^0.9*(PoverF/169)^0.4
      TVVp  = THETA_Vp
      TVQ   = THETA_Q
      Cl    = TVCl*exp(ETA_Cl)
      Vc    = TVVc*exp(ETA_Vc)
      Vp    = TVVp*exp(ETA_Vp)
      Q     = TVQ *exp(ETA_Q)
      ke    = Cl/Vc
      k12   = Q/Vc
      k21   = Q/Vp
      Cp    = centr/Vc
      d/dt(centr)  = - ke*centr - k12*centr + k21*periph
      d/dt(periph) =            + k12*centr - k21*periph

      Cp ~ add(add_sd) + prop(prop_sd) + combined1()
    })
  }

# a minimal dataset, without observations, but with covariates
df_patientA <- data.frame(ID=1,TIME=0,
                                DV=NA,
                                EVID=0,
                                AMT=0,
                                CLCREAT4H=50,TBW=62,PoverF=169)

# using poso_simu_pop with n_simul = 0 we get the typical values of the PK parameters
# with the individual values of the covariates provided in the dataset

priorPatient  <- poso_simu_pop(dat=df_patientA,
                                prior_model=mod_amikacin_Burdet2015,
                                n_simul = 0)

# the dosing optim functions can now be used for a priori dosing selection with
# the parameters from priorPatient$model$params

poso_dose_conc(df_patientA,
               mod_amikacin_Burdet2015,
               time_c=1,duration=0.5,
               target_conc=60,
               indiv_param = priorPatient$model$params)

Using the argument estim_method = "prior"

# the dosing optim functions can sample from the multivariate distribution
# of inter-individual variability (10^5 samples are used)

# p is the proportion of the distribution of concentrations to consider for the optimization
# here it means that the poso_dose_conc optimizes for 50% of the population reaching a concentration
# of at least 60 mg/L at t = 1 hour

# If p is omitted, poso_dose_conc will silently fall back to the MAP-BE estimation for now
# I am adding a warning for the next release

poso_dose_conc(df_patientA,
               mod_amikacin_Burdet2015,
               time_c=1,
               duration=0.5,
               target_conc=60,
               estim_method = "prior",
               p=0.5)               

Tricking posologyr into estimating an individual PK profile without dosing information

Now that I think about it, this is not the most elegant way but this is the approach described in the documentation: https://levenc.github.io/posologyr/articles/a_priori_dosing.html

# a minimal dataset, without observations, but with covariates
df_patientA <- data.frame(ID=1,TIME=0,
                                DV=0,  # for this trick to work, DV can't be NA
                                EVID=0,
                                AMT=0,
                                CLCREAT4H=50,TBW=62,PoverF=169)

# poso_dose_conc performs MAP-BE estimation without dosing information

poso_dose_conc(df_patientA,
               mod_amikacin_Burdet2015,
               time_c=1,
               duration=0.5,
               target_conc=60)               

@Theodore-Loach
Copy link
Author

Theodore-Loach commented Oct 3, 2024

Hey Cyril, thank you so much for these examples and help. This helped a lot in getting going!

I just wanted to check with you that I am not misusing this library by using it to sequentially optimise doses for situations where TDM is not available. By building up a simulated events table from poso_dose_conc and poso_simu_pop output and feeding it back in to these functions?

E.g. using your vancomycin example model. One 1-hour infusion every 24 hours for a 3-day period. Optimising for a CONC of 16.6667 at the end of infusion.

ID TIME DV EVID AMT DUR CLCREAT WT DIAL
1 0 NA 1 1044.4532 1 48.94 70 0
1 24 5.809361 0 0.0000 0 48.94 70 0
1 24 NA 1 855.2220 1 48.94 70 0
1 48 8.224021 0 0.0000 0 48.94 70 0
1 48 NA 1 779.3274 1 48.94 70 0
1 72 9.245791 0 0.0000 0 48.94 70 0

image

@levenc
Copy link
Owner

levenc commented Oct 5, 2024

Hi Theodore, I wouldn't call it misuse, but it is unexpected for me!

Could you tell me more about the problem you're trying to solve? Maybe I can help.

@Theodore-Loach
Copy link
Author

We're exploring the feasibility of being able to provide clinicians, personalised dose calculators in a public health system (New Zealand). So we want to see if it's possible and sensible to try and do this for single and multi-dose regimes with no TDM. Not suggesting that my example above is a suggested use of Vanc either.

@levenc
Copy link
Owner

levenc commented Oct 20, 2024

I see, a simpler approach in this case might be to define additional doses in the call to the optimization function:

poso_dose_conc(dat = df_patient,
               prior_model = mod_vancomycin,
               time_c=(4*12),
               time_dose=0,
               target_conc = 10,
               duration=1,
               indiv_param=priorPatient$model$params,
               add_dose=3,
               interdose_interval=12)

This example optimizes the dose at which repeated administrations of vancomycin should be given over a period of one hour, every 12 hours, to achieve a target concentration of 10 mg/L at 48 hours after treatment initiation (just before the 5th dose).

We are also trying to provide customized dose calculators for clinicians working in the French health care system (as well as TDM based tools for laboratories).

I'd be happy to extend the discussion beyond github if you'd like. You can contact me at cyril.leven at univ-brest.fr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants