The drug system contains the physiologically based pharmacokinetic (PBPK) model and the pharmacodynamic (PD) model. More...
#include <Drugs.h>
Inherits PulseDrugSystem.
Public Member Functions | |
virtual | ~Drugs () |
void | Clear () |
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 (bool solve_and_transport=true) |
Substances process function. More... | |
void | PostProcess (bool solve_and_transport=true) |
![]() | |
PulseDrugSystem (Logger *logger) | |
virtual | ~PulseDrugSystem ()=default |
virtual const SEScalar * | GetScalar (const std::string &name) override |
![]() | |
SEDrugSystem (Logger *logger) | |
virtual | ~SEDrugSystem () |
virtual bool | HasBronchodilationLevel () const |
virtual SEScalarNegative1To1 & | GetBronchodilationLevel () |
virtual double | GetBronchodilationLevel () const |
virtual bool | HasHeartRateChange () const |
virtual SEScalarFrequency & | GetHeartRateChange () |
virtual double | GetHeartRateChange (const FrequencyUnit &unit) const |
virtual bool | HasMeanBloodPressureChange () const |
virtual SEScalarPressure & | GetMeanBloodPressureChange () |
virtual double | GetMeanBloodPressureChange (const PressureUnit &unit) const |
virtual bool | HasNeuromuscularBlockLevel () const |
virtual SEScalar0To1 & | GetNeuromuscularBlockLevel () |
virtual double | GetNeuromuscularBlockLevel () const |
virtual bool | HasPulsePressureChange () const |
virtual SEScalarPressure & | GetPulsePressureChange () |
virtual double | GetPulsePressureChange (const PressureUnit &unit) const |
virtual bool | HasPupillaryResponse () const |
virtual SEPupillaryResponse & | GetPupillaryResponse () |
virtual const SEPupillaryResponse * | GetPupillaryResponse () const |
virtual void | RemovePupillaryResponse () |
virtual bool | HasRespirationRateChange () const |
virtual SEScalarFrequency & | GetRespirationRateChange () |
virtual double | GetRespirationRateChange (const FrequencyUnit &unit) const |
virtual bool | HasSedationLevel () const |
virtual SEScalar0To1 & | GetSedationLevel () |
virtual double | GetSedationLevel () const |
virtual bool | HasTidalVolumeChange () const |
virtual SEScalarVolume & | GetTidalVolumeChange () |
virtual double | GetTidalVolumeChange (const VolumeUnit &unit) const |
virtual bool | HasTubularPermeabilityChange () const |
virtual SEScalarNegative1To1 & | GetTubularPermeabilityChange () |
virtual double | GetTubularPermeabilityChange () const |
![]() | |
SESystem (Logger *logger) | |
virtual | ~SESystem () |
![]() | |
Loggable (Logger *logger=nullptr) | |
Loggable (std::string const &logfile) | |
virtual | ~Loggable () |
virtual Logger * | GetLogger () const |
virtual void | SetLogger (Logger &logger) |
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 |
std::string | to_string (int i) |
std::string | to_string (unsigned int i) |
std::string | to_string (size_t t) |
std::string | to_string (float f) |
std::string | to_string (double d) |
Protected Member Functions | |
Drugs (PulseData &data) | |
void | ComputeExposedModelParameters () override |
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 | |
PulseData & | m_data |
double | m_dt_s |
SELiquidCompartment * | m_aortaVascular |
SELiquidCompartment * | m_venaCavaVascular |
SELiquidCompartment * | m_muscleIntracellular |
SELiquidCompartment * | m_liverVascular |
SETissueCompartment * | m_liverTissue |
SEFluidCircuitPath * | m_IVToVenaCava |
SETissueCompartment * | m_fatTissue |
![]() | |
SEScalarNegative1To1 * | m_BronchodilationLevel |
SEScalarFrequency * | m_HeartRateChange |
SEScalarPressure * | m_MeanBloodPressureChange |
SEScalar0To1 * | m_NeuromuscularBlockLevel |
SEScalarPressure * | m_PulsePressureChange |
SEPupillaryResponse * | m_PupillaryResponse |
SEScalarFrequency * | m_RespirationRateChange |
SEScalar0To1 * | m_SedationLevel |
SEScalarVolume * | m_TidalVolumeChange |
SEScalarNegative1To1 * | m_TubularPermeabilityChange |
![]() | |
std::stringstream | m_ss |
![]() | |
bool | myLogger |
Logger * | m_Logger |
Friends | |
class | PulseData |
class | PBPulsePhysiology |
class | PulseEngineTest |
Additional Inherited Members | |
![]() | |
static const SEScalar * | GetScalar (const std::string &name, std::vector< SESystem *> *systems) |
![]() | |
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()
|
protected |
◆ ~Drugs()
|
virtual |
Member Function Documentation
◆ 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()
|
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()
|
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()
|
virtual |
Determines if the engine is stable.
When the engine is stable, the CDM makes this call to update the member variable.
Implements PulseSystem.
◆ 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()
|
protected |
Calculate partition coefficients for the PK Model.
- Parameters
-
vSubstances Coefficients 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()
|
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()
|
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()
|
virtual |
Reimplemented from SEDrugSystem.
◆ ComputeExposedModelParameters()
|
overrideprotectedvirtual |
Implements PulseDrugSystem.
◆ Initialize()
|
virtual |
Initializes system properties to valid homeostatic values.
For stabilization only! Called AFTER Setup when stabilizing a new patient
Reimplemented from PulseSystem.
◆ PostProcess()
|
inlinevirtual |
Implements PulseSystem.
◆ PreProcess()
|
virtual |
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()
|
virtual |
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()
|
virtual |
Initializes parameters for the Drugs Class.
Called during both State loading and Patient Stabilization Pull and setup up our data (can be from other systems) Initialize will be called after this and can overwrite any of this data (only if stabilizing)
Implements PulseSystem.
Friends And Related Function Documentation
◆ PBPulsePhysiology
|
friend |
◆ PulseData
|
friend |
◆ PulseEngineTest
|
friend |
Member Data Documentation
◆ m_aortaVascular
|
protected |
◆ m_data
|
protected |
◆ m_dt_s
|
protected |
◆ m_fatTissue
|
protected |
◆ m_IVToVenaCava
|
protected |
◆ m_liverTissue
|
protected |
◆ m_liverVascular
|
protected |
◆ m_muscleIntracellular
|
protected |
◆ m_venaCavaVascular
|
protected |