The drug system contains the physiologically based pharmacokinetic (PBPK) model and the pharmacodynamic (PD) model. More...

#include <Drugs.h>

Inherits SEDrugSystem, PulseDrugsSystem, and PulseSystem.

Public Member Functions

virtual ~Drugs ()
 
void Clear ()
 
- Public Member Functions inherited from SEDrugSystem
 SEDrugSystem (Logger *logger)
 
virtual ~SEDrugSystem ()
 
virtual const SEScalarGetScalar (const std::string &name)
 
virtual bool HasBronchodilationLevel () const
 
virtual SEScalarNegative1To1GetBronchodilationLevel ()
 
virtual double GetBronchodilationLevel () const
 
virtual bool HasHeartRateChange () const
 
virtual SEScalarFrequencyGetHeartRateChange ()
 
virtual double GetHeartRateChange (const FrequencyUnit &unit) const
 
virtual bool HasMeanBloodPressureChange () const
 
virtual SEScalarPressureGetMeanBloodPressureChange ()
 
virtual double GetMeanBloodPressureChange (const PressureUnit &unit) const
 
virtual bool HasNeuromuscularBlockLevel () const
 
virtual SEScalar0To1GetNeuromuscularBlockLevel ()
 
virtual double GetNeuromuscularBlockLevel () const
 
virtual bool HasPulsePressureChange () const
 
virtual SEScalarPressureGetPulsePressureChange ()
 
virtual double GetPulsePressureChange (const PressureUnit &unit) const
 
virtual bool HasPupillaryResponse () const
 
virtual SEPupillaryResponseGetPupillaryResponse ()
 
virtual const SEPupillaryResponseGetPupillaryResponse () const
 
virtual void RemovePupillaryResponse ()
 
virtual bool HasRespirationRateChange () const
 
virtual SEScalarFrequencyGetRespirationRateChange ()
 
virtual double GetRespirationRateChange (const FrequencyUnit &unit) const
 
virtual bool HasSedationLevel () const
 
virtual SEScalar0To1GetSedationLevel ()
 
virtual double GetSedationLevel () const
 
virtual bool HasTidalVolumeChange () const
 
virtual SEScalarVolumeGetTidalVolumeChange ()
 
virtual double GetTidalVolumeChange (const VolumeUnit &unit) const
 
virtual bool HasTubularPermeabilityChange () const
 
virtual SEScalarNegative1To1GetTubularPermeabilityChange ()
 
virtual double GetTubularPermeabilityChange () const
 
- Public Member Functions inherited from SESystem
 SESystem (Logger *logger)
 
virtual ~SESystem ()
 
- Public Member Functions inherited from Loggable
 Loggable ()
 
 Loggable (Logger *log)
 
virtual ~Loggable ()
 
virtual LoggerGetLogger () const
 
virtual void Debug (std::string const &msg, std::string const &origin=empty) const
 
virtual void Debug (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Debug (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Info (std::string const &msg, std::string const &origin=empty) const
 
virtual void Info (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Info (const std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Info (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Warning (std::string const &msg, std::string const &origin=empty) const
 
virtual void Warning (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Warning (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Error (std::string const &msg, std::string const &origin=empty) const
 
virtual void Error (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Error (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::string const &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::ostream &msg, std::string const &origin=empty) const
 

Protected Member Functions

 Drugs (PulseController &data)
 
void Initialize ()
 Initializes system properties to valid homeostatic values. More...
 
void SetUp ()
 Initializes parameters for the Drugs Class. More...
 
void AtSteadyState ()
 Determines if the engine is stable. More...
 
void PreProcess ()
 Substance Preprocess function. More...
 
void Process ()
 Substances process function. More...
 
void PostProcess ()
 
void AdministerSubstanceBolus ()
 Increments the mass of a substance to represent drug injection. More...
 
void AdministerSubstanceInfusion ()
 Increments the mass of a substance to represent drug infusion. More...
 
void AdministerSubstanceCompoundInfusion ()
 Increases the substance masses for compounds. More...
 
void CalculatePartitionCoefficients ()
 Calculate partition coefficients for the PK Model. More...
 
void CalculateSubstanceClearance ()
 Calculates the substance mass cleared. More...
 
void CalculatePlasmaSubstanceConcentration ()
 Calculates the concentration of a substance in the plasma. More...
 
void CalculateDrugEffects ()
 Calculates the drug effects on other system parameters. More...
 

Protected Attributes

PulseControllerm_data
 
double m_dt_s
 
SELiquidCompartmentm_aortaVascular
 
SELiquidCompartmentm_venaCavaVascular
 
SELiquidCompartmentm_muscleIntracellular
 
SELiquidCompartmentm_liverVascular
 
SETissueCompartmentm_liverTissue
 
SEFluidCircuitPathm_IVToVenaCava
 
SETissueCompartmentm_fatTissue
 
- Protected Attributes inherited from SEDrugSystem
SEScalarNegative1To1m_BronchodilationLevel
 
SEScalarFrequencym_HeartRateChange
 
SEScalarPressurem_MeanBloodPressureChange
 
SEScalar0To1m_NeuromuscularBlockLevel
 
SEScalarPressurem_PulsePressureChange
 
SEPupillaryResponsem_PupillaryResponse
 
SEScalarFrequencym_RespirationRateChange
 
SEScalar0To1m_SedationLevel
 
SEScalarVolumem_TidalVolumeChange
 
SEScalarNegative1To1m_TubularPermeabilityChange
 
- Protected Attributes inherited from SESystem
std::stringstream m_ss
 
- Protected Attributes inherited from Loggable
Loggerm_Logger
 

Friends

class PBPulsePhysiology
 
class PulseController
 
class PulseEngineTest
 

Additional Inherited Members

- Static Public Member Functions inherited from SESystem
static const SEScalarGetScalar (const std::string &name, std::vector< SESystem *> *systems)
 
- Static Public Attributes inherited from Loggable
static const std::string empty
 

Detailed Description

The drug system contains the physiologically based pharmacokinetic (PBPK) model and the pharmacodynamic (PD) model.

Drug transvascular transport is modeled with a physiologically-based pharmacokinetic (PBPK) model, and the physiologic effects on the body are modeled with a low-fidelity pharmacodynamic (PD) model.

Constructor & Destructor Documentation

◆ Drugs()

Drugs::Drugs ( PulseController data)
protected

◆ ~Drugs()

Drugs::~Drugs ( )
virtual

Member Function Documentation

◆ AdministerSubstanceBolus()

void Drugs::AdministerSubstanceBolus ( )
protected

Increments the mass of a substance to represent drug injection.

The mass of a substance is increased based on the administration of a substance. For a bolus administration, the user specifies a dose (amount), a concentration, and a substance. The calculated mass is then incrementally added to the vena cava over two seconds.

Error:
Error: Unavailable Administration Route
Todo:
Add fluid amount to fluid system

◆ AdministerSubstanceCompoundInfusion()

void Drugs::AdministerSubstanceCompoundInfusion ( )
protected

Increases the substance masses for compounds.

The masses of all substances associated with the compound substance are increased. The mass of each substance is incremented in the vena cava based on the rate specified by the user and a concentration specified in the compound substance file.

Todo:
Enforce limits and remove the fatal error
Error:
Fatal: rate cannot exceed 285 mL/min
Todo:
correct the mass based on what we have left in the bag

◆ AdministerSubstanceInfusion()

void Drugs::AdministerSubstanceInfusion ( )
protected

Increments the mass of a substance to represent drug infusion.

The mass of a substance is increased based on the administration of a substance. For an infusion, the user specifies a concentration and a rate. The calculated mass is then added to the vena cava every time step until the infusion is stopped.

Todo:
sub needs to be const
Todo:
Enforce limits and remove the fatal error
Error:
Fatal: Titration administration cannot be negative
Todo:
Need to add fluid amount to fluid system
Todo:
Support state, and how would a user remove this action?

◆ AtSteadyState()

void Drugs::AtSteadyState ( )
protectedvirtual

Determines if the engine is stable.

When the engine is stable, the CDM makes this call to update the member variable.

Reimplemented from PulseSystem.

◆ CalculateDrugEffects()

void Drugs::CalculateDrugEffects ( )
protected

Calculates the drug effects on other system parameters.

If the substance is a drug with an EC50 value, the effects on heart rate, blood pressure, respiration rate, tidal volume, neuromuscular block level, sedation level, bronchodilation level, and pupillary state are calculated using the current plasma concentration, the EC50, and the maximum drug response.

Todo:
The drug effect is being applied to the baseline, so if the baseline changes the delta heart rate changes.

◆ CalculatePartitionCoefficients()

void Drugs::CalculatePartitionCoefficients ( )
protected

Calculate partition coefficients for the PK Model.

Parameters
vSubstancesCoefficients are calculated for the substances in the vector with IonicState.

The partition coefficients are calculated for each substance in the input vector (active substances). To ensure the diffusion is modeled with PK for the substance, a check is performed for Ionic State. If the property is present the coefficients are calculated. They are calculated for all tissue compartments. coefficients are set on the substance compartment effects for use during the diffusion calculation.

Error:
Fatal: Binding Protein not supported
Todo:
How to support oral absorption - should I check if oral administration then use Oral absorption rate otherwise assume 1?

◆ CalculatePlasmaSubstanceConcentration()

void Drugs::CalculatePlasmaSubstanceConcentration ( )
protected

Calculates the concentration of a substance in the plasma.

If the substance has PK properties, the concentration of the substance in the plasma is calculated. PlasmaConcentration = TotalMassInTheBlood / PlasmaVolume. The plasma concentration is then set on the substance. The concentration computation is obviously erroneous. This is a known issue. See pharmacokinetics

◆ CalculateSubstanceClearance()

void Drugs::CalculateSubstanceClearance ( )
protected

Calculates the substance mass cleared.

If the substance has PK properties, the substance clearance is calculated. The renal, liver, and systemic clearance terms are applied to each anatomy compartment per substance. The amount of mass is then removed from the tissue node each time step. The tissue node mass and concentration are then updated. Sets the amount of substance cleared as a compartment effect for each substance.

◆ Clear()

void Drugs::Clear ( )
virtual

Reimplemented from SEDrugSystem.

◆ Initialize()

void Drugs::Initialize ( )
protectedvirtual

Initializes system properties to valid homeostatic values.

Reimplemented from PulseSystem.

◆ PostProcess()

void Drugs::PostProcess ( )
inlineprotectedvirtual

Implements PulseSystem.

◆ PreProcess()

void Drugs::PreProcess ( )
protectedvirtual

Substance Preprocess function.

The AdminsterSubstances, AdministerIVSubstances, and Hemorrhage actions are processed in this step. The masses of the substances associated with these actions are updated as the actions are processed.

Implements PulseSystem.

◆ Process()

void Drugs::Process ( )
protectedvirtual

Substances process function.

For any drugs circulating in the system the renal and hepatic clearance factors and metabolic factors are assigned to the appropriate compartments. The drug effects categories and system level drug effects are calculated and the values are set on the common data model for use in other systems. Drug effects are only calculated if the PD is enabled.

Implements PulseSystem.

◆ SetUp()

void Drugs::SetUp ( )
protectedvirtual

Initializes parameters for the Drugs Class.

Initializes member variables and system level values on the common data model.

Implements PulseSystem.

Friends And Related Function Documentation

◆ PBPulsePhysiology

friend class PBPulsePhysiology
friend

◆ PulseController

friend class PulseController
friend

◆ PulseEngineTest

friend class PulseEngineTest
friend

Member Data Documentation

◆ m_aortaVascular

SELiquidCompartment* Drugs::m_aortaVascular
protected

◆ m_data

PulseController& Drugs::m_data
protected

◆ m_dt_s

double Drugs::m_dt_s
protected

◆ m_fatTissue

SETissueCompartment* Drugs::m_fatTissue
protected

◆ m_IVToVenaCava

SEFluidCircuitPath* Drugs::m_IVToVenaCava
protected

◆ m_liverTissue

SETissueCompartment* Drugs::m_liverTissue
protected

◆ m_liverVascular

SELiquidCompartment* Drugs::m_liverVascular
protected

◆ m_muscleIntracellular

SELiquidCompartment* Drugs::m_muscleIntracellular
protected

◆ m_venaCavaVascular

SELiquidCompartment* Drugs::m_venaCavaVascular
protected