Non Linear Model - Phenytoin

Hi guys, Just learning to simulate with Julia codes and build model libraries. I have written a Non linear model for Phenytoin, Can someone verify if this is modeled correctly? A doubt I have is with entering Vmax values : if we dose the drug every 24 hours does the Vmax value need to be in mg/hr or mg/day?


title : Phenytoin - Non Linear Model

using Pumas
using Plots

Model Development

phenytoin = @model begin

  @param begin
    θ ∈ VectorDomain(4)
  end

  @pre begin
    Vc = θ[1]
    Ka = θ[2]
    Vmax = θ[3]
    Km = θ[4]
  end

  @vars begin
    Cp := Central/Vc
  end

  @dynamics begin
    Depot' = -Ka*Depot
    Central' = Ka*Depot - Vmax*Cp/(Km+Cp)
  end

  @derived begin
    cp = @. Central/Vc
  end
end
  1. A subject of 80kg is administered Phenytoin at population values of Vmax=7mg/kg/day (560mg/day, converted to 23.33mg/hr) and Km=5mg/L to achieve Cpave=15mg/L but the Cpave was found to be 20mg/L(figure=2).
regimen4 = DosageRegimen([600,140], time=[0,0], cmt=[2,1], addl=[0,55], ii=[0,8])
subject4 = Subject(id=1, evs=regimen4)
param4 = (θ = [42,1,23.33,4.94],)
sim4 = simobs(phenytoin, subject4, param4, obstimes=0:0.1:500)
plot(sim4)
  1. The Vmax was then calcuated for the patient and the simulation was carried out which showed the Cpave=20mg/L.
regimen5 = DosageRegimen([600,140], time=[0,0], cmt=[2,1], addl=[0,55], ii=[0,8])
subject5 = Subject(id=1, evs=regimen5)
param5 = (θ = [42,1,21.875,4.94],)
sim5 = simobs(phenytoin, subject5, param5, obstimes=0:0.1:500)
plot(sim5)
  1. A new dosing regimen to achieve the Cpave=15mg/L at the patient specific Vmax is shown below:
regimen6 = DosageRegimen([600,132], time=[0,0], cmt=[2,1], addl=[0,55], ii=[0,8])
subject6 = Subject(id=1, evs=regimen6)
param6 = (θ = [42,1,21.875,4.94],)
sim6 = simobs(phenytoin, subject6, param6, obstimes=0:0.1:500)
plot(sim6)

Hi Parssh,

Welcome to the community.

Just to be clear, what exactly is the part you want us to verify? Looks like the simulation works. What part are you not sure about?

Best,
Vijay

Few comments:

  1. The code seems to be technically correct.
  2. Your specific question about converting Vmax from mg/kg/day to Vmax mg/kg/hr is accurate. Your question perhaps is not that naive.
  3. Few improvements that you might want to consider:
    2a. Have a comment block to include details of the project. I give you an example below.
    2b. You might want to write the model in terms of body weight, so that you dont have to manually calculate the Vmax, and Vc for each patient manually. This is only from a coding convenience.
    2c. I am not so sure about your Vmax per kg model. An allometric model is probably more physiologic.
    ################ Parameter Values ###################
    # Literature source: [reference here]
    # Vmax = 7mg/kg/day (560mg/day, converted to 23.33mg/hr)
    # km = 5 mg/L
    # ka = 1/hr
    # Vc = ??
    # Dose in mg
    # Time in hours [ii also in hours]

    phenytoin = @model begin

      @param begin
        θ ∈ VectorDomain(4)
      end

      @covariates wt

      @pre begin
        Vc = θ[1]*(wt)
        Ka = θ[2]
        Vmax = θ[3]*(wt)
        Km = θ[4]
      end

      @vars begin
        Cp := Central/Vc
      end

      @dynamics begin
        Depot' = -Ka*Depot
        Central' = Ka*Depot - Vmax*Cp/(Km+Cp)
      end

      @derived begin
        cp = @. Central/Vc
      end
    end

    regimen4 = DosageRegimen([600,140], time=[0,0], cmt=[2,1], addl=[0,55], ii=[0,8])
    subject4 = Subject(id=1, evs=regimen4, cvs=(wt=80,))
    param4 = (θ = [0.525,1,0.292,4.94],)
    sim4 = simobs(phenytoin, subject4, param4, obstimes=0:0.1:500)
    plot(sim4)

Thanks @vijay, wish to contribute more to this community. My question has been answered in detail.

Thanks @jogagobburu. The comments are well taken and yes the improvements to the model in specific. This could help me build a population model rather than just a single subject.