# Exercise PK52 - Simulated impact of disease on r-hSOD kinetics

### Background

• Structural model - IV infusion - Two compartment Model

• Route of administration - Rapid intravenous infusion of recombinant human superoxide dismutase (r-hSOD)

• Dosage Regimen - 20mg/kg IV rapid infusion for 15 seconds in two categories of rats

• Number of Subjects - 1 normal rat, 1 clamped (nephrectomized) rat In this model, collection of plasma concentration data of parent drug and concentration of parent and metabolite in urine, will help you to derive/ the parameters: Clearance, Volume of Distribution, Km, Vmax.

### Learning Outcome

1. To note that clearance and volume of central compartment are reduced in clamped rats, as removal of the kidneys increased the effective half life from 10mins in normal rats to 90mins in nephrectomized rats.

2. The time to steady state might differ 9-fold between the two groups.

3. Importance of kidneys in the elimination of r-hSOD and the impact of kidney disease/nephrectomy in the overall kinetics of the drug.

### Objectives

In this tutorial, you will learn how to construct a simple two compartment model with 2 set of parameters corresponding to normal and clamped rats.

### Libraries

Call the "necessary" libraries to get started

using Random
using Pumas
using PumasUtilities
using CairoMakie


### Model

pk_52           = @model begin
desc        = "Two Compartment Model"
timeu       = u"minute"
end

@param begin
"Clearance (mL/min/kg)"
tvcl       ∈ RealDomain(lower=0)
"Volume of Central Compartment (ml/min/kg)"
tvvc       ∈ RealDomain(lower=0)
"Volume of Peripheral Compartment (ml/min/kg)"
tvvp       ∈ RealDomain(lower=0)
"Intercompartmental Clearance (ml/min/kg)"
tvcld      ∈ RealDomain(lower=0)
Ω          ∈ PDiagDomain(4)
σ²_prop    ∈ RealDomain(lower=0)
end

@random begin
η           ~ MvNormal(Ω)
end

@pre begin
Cl          = tvcl * exp(η)
Vc          = tvvc * exp(η)
Vp          = tvvp * exp(η)
Cld         = tvcld * exp(η)
end

@dynamics begin
Central'    = -(Cl/Vc)*Central - (Cld/Vc)*Central + (Cld/Vp) * Peripheral
Peripheral' =  (Cld/Vc)*Central - (Cld/Vp)*Peripheral
end

@derived begin
cp          = @. Central/Vc
"""
Observed Concentration (ug/mL)
"""
dv          ~ @. Normal(cp,sqrt(cp^2*σ²_prop))
end
end

PumasModel
Parameters: tvcl, tvvc, tvvp, tvcld, Ω, σ²_prop
Random effects: η
Covariates:
Dynamical variables: Central, Peripheral
Derived: cp, dv
Observed: cp, dv


### Parameters

Parameters are provided for the simulation as below. tv represents the typical value for parameters.

• $tvcl$ - Clearance (mL/min/kg)

• $tvvc$ - Volume of Central Compartment (ml/min/kg)

• $tvvp$ - Volume of Peripheral CompartmentRenal (ml/min/kg)

• $tq$ - Intercompartmental Clearance (ml/min/kg)

• $Ω$ - Between Subject Variability

• $σ$ - Residual errors

param1 = (tvcl    = 3.0,
tvvc    = 31,
tvvp    = 15,
tvcld   = 0.12,
Ω       = Diagonal([0.0,0.0,0.0,0.0]),
σ²_prop = 0.04)

param2 = (tvcl    = 0.22,
tvvc    = 16,
tvvp    = 13,
tvcld   = 0.09,
Ω       = Diagonal([0.0,0.0,0.0,0.0]),
σ²_prop = 0.04)

param  = vcat(param1, param2)


### Dosage Regimen

A dose of 20 mg/kg to a single rat of 2 categories (normal and clamped)

ev1      = DosageRegimen(20000, cmt = 1)
sub1     = Subject(id = "Normal_Rat", events = ev1, covariates = (Rat = "Normal_Rat",))
sub2     = Subject(id = "Clamped_Rat", events = ev1, covariates = (Rat = "Clamped_Rat",))
pop2_sub = [sub1,sub2]

Population
Subjects: 2
Covariates: Rat
Observations:


### Simulation

Simulate the plasma concentration after IV infusion

Random.seed!(123)
sim_pop2_sub = map(((subject, param),) -> simobs(pk_52, subject, param, obstimes=0:0.1:500), zip(pop2_sub, param))


### Visualization

f, a, p = sim_plot(pk_52, sim_pop2_sub,
observations = :cp,
color = :redsblues,
linewidth = 4,
axis = (xlabel = "Time (hrs)",
ylabel = "PK52 Concentrations (μg/L)",
xticks = 0:50:500, yscale = log10,
title="Simulated impact of disease on r-hSOD kinetics"))
axislegend(a)
f 