More...

#include <BloodChemistry.h>

Inheritance diagram for biogears::BloodChemistry:

Public Member Functions

virtual ~BloodChemistry () override
 
const char * classname () const override
 
size_t hash_code () const override
 
void Clear () override
 
  • Deletes all members.
More...
 
void Initialize () override
 Initializes system properties. More...
 
bool Load (const CDM::BioGearsBloodChemistrySystemData &in)
 
CDM::BioGearsBloodChemistrySystemDataUnload () const override
 
  • Deletes all members.
More...
 
void AtSteadyState () override
 Notify systems that steady state has been achieved. More...
 
void PreProcess () override
 Blood Chemistry Preprocess method. More...
 
void Process () override
 Blood Chemistry process method. More...
 
void PostProcess () override
 Blood Chemistry postprocess method. More...
 
bool CalculateCompleteBloodCount (SECompleteBloodCount &cbc)
 Sets data on the complete blood count object. More...
 
bool CalculateComprehensiveMetabolicPanel (SEComprehensiveMetabolicPanel &cmp)
 Sets data on the metabolic panel object. More...
 
SEScalarCalculateCoagulationSOFA ()
 
void CalculateHemolyticTransfusionReaction (bool rhMismatch=false)
 Reaction when incompatible blood is transfused. More...
 
- Public Member Functions inherited from biogears::SEBloodChemistrySystem
 SEBloodChemistrySystem (Logger *logger)
 
 ~SEBloodChemistrySystem () override
 
const SEScalarGetScalar (const char *name) override
 
const SEScalarGetScalar (const std::string &name) override
 
  • A reflextion type call that will return the Scalar associated with the string.
    ex. GetScalar("Hematocrit") will return the SEScalarPercent object associated with Hematocrit
More...
 
bool HasTotalBilirubin () const
 
SEScalarMassPerVolumeGetTotalBilirubin ()
 
double GetTotalBilirubin (const MassPerVolumeUnit &unit) const
 
virtual bool HasInflammatoryResponse () const
 
virtual SEInflammatoryResponseGetInflammatoryResponse ()
 
virtual SEInflammatoryResponseGetInflammatoryResponse () const
 
bool Load (const CDM::BloodChemistrySystemData &in)
 
  • Clears this object then creates and sets members to data in the bind object
More...
 
Tree< const char * > GetPhysiologyRequestGraph () const override
 
  • Clears this object then creates and sets members to data in the bind object
More...
 
bool HasBloodDensity () const
 
  • Check to see if an property or child object has been allocated.
More...
 
SEScalarMassPerVolumeGetBloodDensity ()
 
  • Return the Property/Child object, if it does not exist, it will be allocated.
More...
 
double GetBloodDensity (const MassPerVolumeUnit &unit) const
 
  • Returns the value of the Property, NaN is returned if the property does not exist.
More...
 
bool HasArterialBloodPH () const
 Test if member has been allocated More...
 
SEScalarGetArterialBloodPH ()
 Get member class, allocate if nullptr. More...
 
double GetArterialBloodPH () const
 Test if member has been allocated More...
 
bool HasArterialBloodPHBaseline () const
 Test if member has been allocated More...
 
SEScalarGetArterialBloodPHBaseline ()
 Get member class, allocate if nullptr. More...
 
double GetArterialBloodPHBaseline () const
 Test if member has been allocated More...
 
bool HasVenousBloodPH () const
 Test if member has been allocated More...
 
SEScalarGetVenousBloodPH ()
 Get member class, allocate if nullptr. More...
 
double GetVenousBloodPH () const
 Test if member has been allocated More...
 
bool HasBloodSpecificHeat () const
 Test if member has been allocated More...
 
SEScalarHeatCapacitancePerMassGetBloodSpecificHeat ()
 Get member class, allocate if nullptr. More...
 
double GetBloodSpecificHeat (const HeatCapacitancePerMassUnit &unit) const
 Test if member has been allocated More...
 
bool HasBloodUreaNitrogenConcentration () const
 Test if member has been allocated More...
 
SEScalarMassPerVolumeGetBloodUreaNitrogenConcentration ()
 Get member class, allocate if nullptr. More...
 
double GetBloodUreaNitrogenConcentration (const MassPerVolumeUnit &unit) const
 Test if member has been allocated More...
 
bool HasCarbonDioxideSaturation () const
 Test if member has been allocated More...
 
SEScalarFractionGetCarbonDioxideSaturation ()
 Get member class, allocate if nullptr. More...
 
double GetCarbonDioxideSaturation () const
 Test if member has been allocated More...
 
bool HasCarbonMonoxideSaturation () const
 Test if member has been allocated More...
 
SEScalarFractionGetCarbonMonoxideSaturation ()
 Get member class, allocate if nullptr. More...
 
double GetCarbonMonoxideSaturation () const
 Test if member has been allocated More...
 
bool HasHematocrit () const
 Test if member has been allocated More...
 
SEScalarFractionGetHematocrit ()
 Get member class, allocate if nullptr. More...
 
double GetHematocrit () const
 Test if member has been allocated More...
 
bool HasHemoglobinContent () const
 Test if member has been allocated More...
 
SEScalarMassGetHemoglobinContent ()
 Get member class, allocate if nullptr. More...
 
double GetHemoglobinContent (const MassUnit &unit) const
 Test if member has been allocated More...
 
bool HasHemoglobinLostToUrine () const
 Test if member has been allocated More...
 
SEScalarMassGetHemoglobinLostToUrine ()
 Get member class, allocate if nullptr. More...
 
double GetHemoglobinLostToUrine (const MassUnit &unit) const
 Test if member has been allocated More...
 
bool HasOxygenSaturation () const
 Test if member has been allocated More...
 
SEScalarFractionGetOxygenSaturation ()
 Get member class, allocate if nullptr. More...
 
double GetOxygenSaturation () const
 Test if member has been allocated More...
 
bool HasOxygenVenousSaturation () const
 Test if member has been allocated More...
 
SEScalarFractionGetOxygenVenousSaturation ()
 Get member class, allocate if nullptr. More...
 
double GetOxygenVenousSaturation () const
 Test if member has been allocated More...
 
bool HasPhosphate () const
 Test if member has been allocated More...
 
SEScalarAmountPerVolumeGetPhosphate ()
 Get member class, allocate if nullptr. More...
 
double GetPhosphate (const AmountPerVolumeUnit &unit) const
 Test if member has been allocated More...
 
bool HasPlasmaVolume () const
 Test if member has been allocated More...
 
SEScalarVolumeGetPlasmaVolume ()
 Get member class, allocate if nullptr. More...
 
double GetPlasmaVolume (const VolumeUnit &unit) const
 Test if member has been allocated More...
 
bool HasPulseOximetry () const
 Test if member has been allocated More...
 
SEScalarFractionGetPulseOximetry ()
 Get member class, allocate if nullptr. More...
 
double GetPulseOximetry () const
 Test if member has been allocated More...
 
bool HasRedBloodCellAcetylcholinesterase () const
 Test if member has been allocated More...
 
SEScalarAmountPerVolumeGetRedBloodCellAcetylcholinesterase ()
 Get member class, allocate if nullptr. More...
 
double GetRedBloodCellAcetylcholinesterase (const AmountPerVolumeUnit &unit) const
 Test if member has been allocated More...
 
bool HasRedBloodCellCount () const
 Test if member has been allocated More...
 
SEScalarAmountPerVolumeGetRedBloodCellCount ()
 Get member class, allocate if nullptr. More...
 
double GetRedBloodCellCount (const AmountPerVolumeUnit &unit) const
 Test if member has been allocated More...
 
bool HasStrongIonDifference () const
 Test if member has been allocated More...
 
SEScalarAmountPerVolumeGetStrongIonDifference ()
 Get member class, allocate if nullptr. More...
 
double GetStrongIonDifference (const AmountPerVolumeUnit &unit) const
 Test if member has been allocated More...
 
bool HasShuntFraction () const
 Test if member has been allocated More...
 
SEScalarFractionGetShuntFraction ()
 Get member class, allocate if nullptr. More...
 
double GetShuntFraction () const
 Test if member has been allocated More...
 
bool HasTotalProteinConcentration () const
 Test if member has been allocated More...
 
SEScalarMassPerVolumeGetTotalProteinConcentration ()
 Get member class, allocate if nullptr. More...
 
double GetTotalProteinConcentration (const MassPerVolumeUnit &unit) const
 Test if member has been allocated More...
 
bool HasRhTransfusionReactionVolume () const
 Test if member has been allocated More...
 
virtual SEScalarVolumeGetRhTransfusionReactionVolume ()
 Test if rh mismatch More...
 
double GetRhTransfusionReactionVolume (const VolumeUnit &unit) const
 Test if member has been allocated More...
 
bool HasVolumeFractionNeutralPhospholipidInPlasma () const
 Test if member has been allocated More...
 
SEScalarFractionGetVolumeFractionNeutralPhospholipidInPlasma ()
 Get member class, allocate if nullptr. More...
 
double GetVolumeFractionNeutralPhospholipidInPlasma () const
 Test if member has been allocated More...
 
bool HasVolumeFractionNeutralLipidInPlasma () const
 Test if member has been allocated More...
 
SEScalarFractionGetVolumeFractionNeutralLipidInPlasma ()
 Get member class, allocate if nullptr. More...
 
double GetVolumeFractionNeutralLipidInPlasma () const
 Test if member has been allocated More...
 
bool HasWhiteBloodCellCount () const
 Test if member has been allocated More...
 
SEScalarAmountPerVolumeGetWhiteBloodCellCount ()
 Get member class, allocate if nullptr. More...
 
double GetWhiteBloodCellCount (const AmountPerVolumeUnit &unit) const
 Test if member has been allocated More...
 
bool HasArterialCarbonDioxidePressure () const
 Test if member has been allocated More...
 
SEScalarPressureGetArterialCarbonDioxidePressure ()
 Get member class, allocate if nullptr. More...
 
double GetArterialCarbonDioxidePressure (const PressureUnit &unit) const
 Test if member has been allocated More...
 
bool HasArterialOxygenPressure () const
 Test if member has been allocated More...
 
SEScalarPressureGetArterialOxygenPressure ()
 Get member class, allocate if nullptr. More...
 
double GetArterialOxygenPressure (const PressureUnit &unit) const
 Test if member has been allocated More...
 
bool HasPulmonaryArterialCarbonDioxidePressure () const
 Test if member has been allocated More...
 
SEScalarPressureGetPulmonaryArterialCarbonDioxidePressure ()
 Get member class, allocate if nullptr. More...
 
double GetPulmonaryArterialCarbonDioxidePressure (const PressureUnit &unit) const
 Test if member has been allocated More...
 
bool HasPulmonaryArterialOxygenPressure () const
 Test if member has been allocated More...
 
SEScalarPressureGetPulmonaryArterialOxygenPressure ()
 Get member class, allocate if nullptr. More...
 
double GetPulmonaryArterialOxygenPressure (const PressureUnit &unit) const
 Test if member has been allocated More...
 
bool HasPulmonaryVenousCarbonDioxidePressure () const
 Test if member has been allocated More...
 
SEScalarPressureGetPulmonaryVenousCarbonDioxidePressure ()
 Get member class, allocate if nullptr. More...
 
double GetPulmonaryVenousCarbonDioxidePressure (const PressureUnit &unit) const
 Test if member has been allocated More...
 
bool HasPulmonaryVenousOxygenPressure () const
 Test if member has been allocated More...
 
SEScalarPressureGetPulmonaryVenousOxygenPressure ()
 Get member class, allocate if nullptr. More...
 
double GetPulmonaryVenousOxygenPressure (const PressureUnit &unit) const
 Test if member has been allocated More...
 
bool HasVenousCarbonDioxidePressure () const
 Test if member has been allocated More...
 
SEScalarPressureGetVenousCarbonDioxidePressure ()
 Get member class, allocate if nullptr. More...
 
double GetVenousCarbonDioxidePressure (const PressureUnit &unit) const
 Test if member has been allocated More...
 
bool HasVenousOxygenPressure () const
 Test if member has been allocated More...
 
SEScalarPressureGetVenousOxygenPressure ()
 Get member class, allocate if nullptr. More...
 
double GetVenousOxygenPressure (const PressureUnit &unit) const
 Test if member has been allocated More...
 
- Public Member Functions inherited from biogears::SESystem
 SESystem (Logger *logger)
 
virtual ~SESystem ()
 
bool Load (const CDM::SystemData &in)
 
- Public Member Functions inherited from biogears::Loggable
 Loggable ()
 
 Loggable (Logger *log)
 
virtual ~Loggable ()
 
virtual LoggerGetLogger () const
 

Static Public Member Functions

static size_t TypeHash ()
 
static constexpr char const *const TypeTag ()
 Hopefully this returns a unique ID for every type. More...
 
- Static Public Member Functions inherited from biogears::SEBloodChemistrySystem
static size_t TypeHash ()
 
static constexpr char const *const TypeTag ()
 
- Static Public Member Functions inherited from biogears::SESystem
static const SEScalarGetScalar (const char *name, std::vector< SESystem * > *systems)
 
static const SEScalarGetScalar (const std::string &name, std::vector< SESystem * > *systems)
 

Protected Member Functions

 BloodChemistry (BioGears &bg)
 
void Unload (CDM::BioGearsBloodChemistrySystemData &data) const
 
void SetUp () override
 Initializes parameters for BloodChemistry Class. More...
 
void CheckBloodSubstanceLevels ()
 Checks the blood substance (oxygen, carbon dioxide, glucose, etc.) levels and sets events. More...
 
void InflammatoryResponse ()
 Track inflammation from infections, burns, and hemorrhages. More...
 
void ManageSIRS ()
 Simulate effects of systemic pathogen after infection. More...
 
void ProcessOverride ()
 determine override requirements from user defined inputs More...
 
void OverrideControlLoop ()
 
- Protected Member Functions inherited from biogears::SEBloodChemistrySystem
void Unload (CDM::BloodChemistrySystemData &data) const
 
  • Create and push all data values to a bind class
More...
 
- Protected Member Functions inherited from biogears::SESystem
void Unload (CDM::SystemData &data) const
 
- Protected Member Functions inherited from biogears::Loggable
virtual void Debug (const char *msg, const char *origin="") const
 
virtual void Debug (const std::string &msg, const std::string &origin=empty) const
 
virtual void Debug (std::ostream &msg, const std::string &origin=empty) const
 
virtual void Info (const char *msg, const char *origin="") const
 
virtual void Info (const std::string &msg, const std::string &origin=empty) const
 
virtual void Info (std::ostream &msg, const std::string &origin=empty) const
 
virtual void Warning (const char *msg, const char *origin="") const
 
virtual void Warning (const std::string &msg, const std::string &origin=empty) const
 
virtual void Warning (std::ostream &msg, const std::string &origin=empty) const
 
virtual void Error (const char *msg, const char *origin="") const
 
virtual void Error (const std::string msg, const std::string origin=empty) const
 
virtual void Error (std::ostream &msg, const std::string &origin=empty) const
 
virtual void Fatal (const char *msg, const char *origin="") const
 
virtual void Fatal (const std::string &msg, const std::string &origin=empty) const
 
virtual void Fatal (std::ostream &msg, const std::string &origin=empty) const
 
- Protected Member Functions inherited from biogears::BioGearsSystem
virtual void LoadState ()
 

Static Protected Member Functions

static auto make_unique (BioGears &bg) -> std::unique_ptr< BloodChemistry >
 

Protected Attributes

BioGearsm_data
 
RunningAverage m_ArterialOxygen_mmHg
 
RunningAverage m_ArterialCarbonDioxide_mmHg
 
SEPatientm_Patient
 
SEPatientActionCollectionm_PatientActions
 
double m_redBloodCellVolume_mL
 
double m_HbLostToUrine_g
 
double m_RhTransfusionReactionVolume_mL
 
double m_HbPerRedBloodCell_ug_Per_ct
 
SEInflammatoryResponsem_InflammatoryResponse
 
double m_RhFactorMismatch_ct
 
SELiquidCompartmentm_aorta
 
SELiquidSubstanceQuantitym_aortaO2
 
SELiquidSubstanceQuantitym_aortaCO2
 
SELiquidSubstanceQuantitym_aortaCO
 
SELiquidSubstanceQuantitym_aortaBicarbonate
 
SELiquidSubstanceQuantitym_brainO2
 
SELiquidSubstanceQuantitym_myocardiumO2
 
SELiquidSubstanceQuantitym_pulmonaryArteriesO2
 
SELiquidSubstanceQuantitym_pulmonaryArteriesCO2
 
SELiquidSubstanceQuantitym_pulmonaryVeinsO2
 
SELiquidSubstanceQuantitym_pulmonaryVeinsCO2
 
SELiquidCompartmentm_venaCava
 
SELiquidSubstanceQuantitym_venaCavaO2
 
SELiquidSubstanceQuantitym_venaCavaCO2
 
SELiquidSubstanceQuantitym_venaCavaAlbumin
 
SELiquidSubstanceQuantitym_venaCavaAminoAcids
 
SELiquidSubstanceQuantitym_venaCavaBicarbonate
 
SELiquidSubstanceQuantitym_venaCavaCalcium
 
SELiquidSubstanceQuantitym_venaCavaChloride
 
SELiquidSubstanceQuantitym_venaCavaCreatinine
 
SELiquidSubstanceQuantitym_venaCavaEpinephrine
 
SELiquidSubstanceQuantitym_venaCavaGlucagon
 
SELiquidSubstanceQuantitym_venaCavaGlucose
 
SELiquidSubstanceQuantitym_venaCavaInsulin
 
SELiquidSubstanceQuantitym_venaCavaKetones
 
SELiquidSubstanceQuantitym_venaCavaLactate
 
SELiquidSubstanceQuantitym_venaCavaPotassium
 
SELiquidSubstanceQuantitym_venaCavaRBC
 
SELiquidSubstanceQuantitym_venaCavaSodium
 
SELiquidSubstanceQuantitym_venaCavaTriacylglycerol
 
SELiquidSubstanceQuantitym_venaCavaUrea
 
double m_donorRBC_ct
 
double m_patientRBC_ct
 
double m_2Agglutinate_ct
 
double m_p3Agglutinate_ct
 
double m_d3Agglutinate_ct
 
double m_4Agglutinate_ct
 
double m_RemovedRBC_ct
 
- Protected Attributes inherited from biogears::SEBloodChemistrySystem
SEScalarMassPerVolumem_BloodDensity
 
SEScalarm_ArterialBloodPH
 
SEScalarm_ArterialBloodPHBaseline
 
SEScalarm_VenousBloodPH
 
SEScalarHeatCapacitancePerMassm_BloodSpecificHeat
 
SEScalarMassPerVolumem_BloodUreaNitrogenConcentration
 
SEScalarFractionm_CarbonDioxideSaturation
 
SEScalarFractionm_CarbonMonoxideSaturation
 
SEScalarFractionm_Hematocrit
 
SEScalarMassm_HemoglobinContent
 
SEScalarMassm_HemoglobinLostToUrine
 
SEScalarFractionm_OxygenSaturation
 
SEScalarFractionm_OxygenVenousSaturation
 
SEScalarAmountPerVolumem_Phosphate
 
SEScalarVolumem_PlasmaVolume
 
SEScalarFractionm_PulseOximetry
 
SEScalarAmountPerVolumem_RedBloodCellAcetylcholinesterase
 
SEScalarAmountPerVolumem_RedBloodCellCount
 
SEScalarFractionm_ShuntFraction
 
SEScalarAmountPerVolumem_StrongIonDifference
 
SEScalarMassPerVolumem_TotalBilirubin
 
SEScalarMassPerVolumem_TotalProteinConcentration
 
SEScalarVolumem_RhTransfusionReactionVolume
 
SEScalarFractionm_VolumeFractionNeutralPhospholipidInPlasma
 
SEScalarFractionm_VolumeFractionNeutralLipidInPlasma
 
SEScalarAmountPerVolumem_WhiteBloodCellCount
 
SEScalarPressurem_ArterialCarbonDioxidePressure
 
SEScalarPressurem_ArterialOxygenPressure
 
SEScalarPressurem_PulmonaryArterialCarbonDioxidePressure
 
SEScalarPressurem_PulmonaryArterialOxygenPressure
 
SEScalarPressurem_PulmonaryVenousCarbonDioxidePressure
 
SEScalarPressurem_PulmonaryVenousOxygenPressure
 
SEScalarPressurem_VenousCarbonDioxidePressure
 
SEScalarPressurem_VenousOxygenPressure
 
SEInflammatoryResponsem_InflammatoryResponse
 
- Protected Attributes inherited from biogears::SESystem
std::stringstream m_ss
 
- Protected Attributes inherited from biogears::Loggable
Loggerm_Logger
 

Private Attributes

friend BioGears
 

Friends

class BioGearsEngineTest
 

Additional Inherited Members

- Static Public Attributes inherited from biogears::Loggable
static const std::string empty
 
static const char * empty_cStr
 

Detailed Description

The Blood Chemistry System holds the system-level blood substance data that is computed on the compartment level by other systems.

The goal of the blood chemistry system in the BioGears engine is complete analysis on the blood at any given point during the simulation. The blood chemistry system houses all of the blood concentrations and compositions needed to assess a patient's health. This system is under development and will be improved in future releases to include more substances that can provide clinician level details and assessments, such as a CBC and blood panel.

Constructor & Destructor Documentation

biogears::BloodChemistry::BloodChemistry ( BioGears bg)
protected
biogears::BloodChemistry::~BloodChemistry ( )
overridevirtual

Member Function Documentation

void biogears::BloodChemistry::AtSteadyState ( )
overridevirtual

Notify systems that steady state has been achieved.

Reimplemented from biogears::BioGearsSystem.

SEScalar & biogears::BloodChemistry::CalculateCoagulationSOFA ( )
bool biogears::BloodChemistry::CalculateCompleteBloodCount ( SECompleteBloodCount cbc)

Sets data on the complete blood count object.

Sets data on the complete blood count object to create the CBC.

bool biogears::BloodChemistry::CalculateComprehensiveMetabolicPanel ( SEComprehensiveMetabolicPanel cmp)

Sets data on the metabolic panel object.

Sets data on the metabolic panel object to create the metabolic panel. Uses information from the chem 14 substances that are in BioGears (see bloodchemistry-assessments)

void biogears::BloodChemistry::CalculateHemolyticTransfusionReaction ( bool  rhMismatch = false)

Reaction when incompatible blood is transfused.

Blood reaction causes rbc to become agglutinated/dead and they can no longer bind gases and Hb to transport, thus causing an immune response

Todo:
Move cellular birth/death/healing to its own unique function for more accurate/responsive re-stabilizing after an event (useful outside of HTR)
void biogears::BloodChemistry::CheckBloodSubstanceLevels ( )
protected

Checks the blood substance (oxygen, carbon dioxide, glucose, etc.) levels and sets events.

Checks the oxygen, carbon dioxide, glucose, ketones, and lactate levels in specific compartments of the body. Set events for Hypercapnia, Hypoxia, Brain and MyoCardium Oxygen Deficit, Hypo/hyperglycemia and related events, ketoacidosis, and lactic acidosis based on the levels.

Event:
Patient: Hypercapnia. The carbon dioxide partial pressure has risen above 60 mmHg. The patient is now hypercapnic.
Irreversible:
The carbon dioxide partial pressure is greater than 80 mmHg.
Event:
Patient: End Hypercapnia. The carbon dioxide partial pressure has fallen below 57 mmHg. The patient is no longer considered to be hypercapnic. This event is triggered if the patient was hypercapnic and is now considered to be recovered.
Event:
Patient: Hypoxia Event. The oxygen partial pressure has fallen below 65 mmHg, indicating that the patient is hypoxic.
Irreversible:
Arterial oxygen partial pressure has been critically reduced to below 15 mmHg.
Event:
Patient: End Hypoxia Event. The oxygen partial pressure has rise above 68 mmHg. If this occurs when the patient is hypoxic, it will reverse the hypoxic event. The patient is no longer considered to be hypoxic.
Event:
Patient: Brain Oxygen Deficit Event. The oxygen partial pressure in the brain has dropped to a dangerously low level.
Irreversible:
Brain oxygen pressure has been dangerously low for more than 30 minutes.
Event:
Patient: Critical Brain Oxygen Deficit Event. The oxygen partial pressure in the brain has dropped to a critically low level.
Event:
Patient: End Brain Oxygen Deficit Event. The oxygen partial pressure has risen above 12 mmHg in the brain. If this occurs when the patient has a critical brain oxygen deficit event, it will reverse the event. The brain is not in a critical oxygen deficit.
Irreversible:
Brain oxygen pressure has been critically low for more than 10 minutes.
Event:
Patient: End Brain Oxygen Deficit Event. The oxygen partial pressure has risen above 25 mmHg in the brain. If this occurs when the patient has a brain oxygen deficit event, it will reverse the event. The brain is getting oxygen.
Event:
Patient: The heart is not receiving enough oxygen. Coronary arteries should dilate to increase blood flow to the heart.
Irreversible:
Heart has not been receiving enough oxygen for more than 40 min.
Event:
Patient: End Myocardium Oxygen Event. The heart is now receiving enough oxygen. If this occurs when the patient has a heart oxygen deficit event, it will reverse the event. The brain is getting oxygen.
const char* biogears::BloodChemistry::classname ( ) const
inlineoverridevirtual

Reimplemented from biogears::SEBloodChemistrySystem.

void biogears::BloodChemistry::Clear ( )
overridevirtual

  • Deletes all members.

Reimplemented from biogears::SEBloodChemistrySystem.

size_t biogears::BloodChemistry::hash_code ( ) const
inlineoverridevirtual

Reimplemented from biogears::SEBloodChemistrySystem.

void biogears::BloodChemistry::InflammatoryResponse ( )
protected

Track inflammation from infections, burns, and hemorrhages.

This function uses the Diverse Shock States model of Chow, 2005 to project the inflammatory response induced by various insults. The most important output from this model is Tissue Integrity, which is used to scale resistances on tissue pathways, causing the fluid shift that occurs during sepsis and in the case of large burns. The original model was calibrated for mice and considered endotoxin (pathogen by-products) to be force for infectious inflammation. Endotoxin was replaced by an actively growing pathogen population subjected to phagocytosis from local immune response, neutrophils, and macrophages. Some parameters are adjusted depending on the source of inflamamtion to better capture the time scale and magnitude of response.

\ ToDo: Investigate whether these parameters can be further optimized for humans

void biogears::BloodChemistry::Initialize ( )
overridevirtual

Initializes system properties.

Reimplemented from biogears::BioGearsSystem.

bool biogears::BloodChemistry::Load ( const CDM::BioGearsBloodChemistrySystemData in)
auto biogears::BloodChemistry::make_unique ( BioGears bg) -> std::unique_ptr<BloodChemistry>
staticprotected
void biogears::BloodChemistry::ManageSIRS ( )
protected

Simulate effects of systemic pathogen after infection.

Helper function for Inflammatory Response. If the source of inflammation is a pathogen, this function is called to simulate effects of systemic pathogen infiltration that are not currently modeled mechanistically. At low infection levels, these inflammation markers will remain near their baseline values

void biogears::BloodChemistry::OverrideControlLoop ( )
protected
void biogears::BloodChemistry::PostProcess ( )
overridevirtual

Blood Chemistry postprocess method.

The current BioGears implementation has no specific postprocess functionality.

Implements biogears::BioGearsSystem.

void biogears::BloodChemistry::PreProcess ( )
overridevirtual

Blood Chemistry Preprocess method.

The current BioGears implementation only checks for active Sepsis event.

Implements biogears::BioGearsSystem.

void biogears::BloodChemistry::Process ( )
overridevirtual

Blood Chemistry process method.

The system data (blood concentrations, blood gases, and other blood properties) that are calculated or changed by other systems are set on the blood chemistry system data objects. Events are triggered at specific blood concentrations of certain substances in CheckBloodGasLevels().

Implements biogears::BioGearsSystem.

void biogears::BloodChemistry::ProcessOverride ( )
protected

determine override requirements from user defined inputs

User specified override outputs that are specific to the cardiovascular system are implemented here. If overrides aren't present for this system then this function will not be called during preprocess.

void biogears::BloodChemistry::SetUp ( )
overrideprotectedvirtual

Initializes parameters for BloodChemistry Class.

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

Implements biogears::BioGearsSystem.

static size_t biogears::BloodChemistry::TypeHash ( )
inlinestatic
static constexpr char const* const biogears::BloodChemistry::TypeTag ( )
inlinestatic

Hopefully this returns a unique ID for every type.

CDM::BioGearsBloodChemistrySystemData * biogears::BloodChemistry::Unload ( ) const
overridevirtual

  • Deletes all members.

  • Caller is now the responsible for managing returned object
    I suggest you wrap the object ptr returned with a unique_ptr*

Reimplemented from biogears::SEBloodChemistrySystem.

void biogears::BloodChemistry::Unload ( CDM::BioGearsBloodChemistrySystemData data) const
protected

Friends And Related Function Documentation

friend class BioGearsEngineTest
friend

Member Data Documentation

friend biogears::BloodChemistry::BioGears
private
double biogears::BloodChemistry::m_2Agglutinate_ct
protected
double biogears::BloodChemistry::m_4Agglutinate_ct
protected
SELiquidCompartment* biogears::BloodChemistry::m_aorta
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_aortaBicarbonate
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_aortaCO
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_aortaCO2
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_aortaO2
protected
RunningAverage biogears::BloodChemistry::m_ArterialCarbonDioxide_mmHg
protected
RunningAverage biogears::BloodChemistry::m_ArterialOxygen_mmHg
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_brainO2
protected
double biogears::BloodChemistry::m_d3Agglutinate_ct
protected
BioGears& biogears::BloodChemistry::m_data
protected
double biogears::BloodChemistry::m_donorRBC_ct
protected
double biogears::BloodChemistry::m_HbLostToUrine_g
protected
double biogears::BloodChemistry::m_HbPerRedBloodCell_ug_Per_ct
protected
SEInflammatoryResponse* biogears::BloodChemistry::m_InflammatoryResponse
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_myocardiumO2
protected
double biogears::BloodChemistry::m_p3Agglutinate_ct
protected
SEPatient* biogears::BloodChemistry::m_Patient
protected
SEPatientActionCollection* biogears::BloodChemistry::m_PatientActions
protected
double biogears::BloodChemistry::m_patientRBC_ct
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_pulmonaryArteriesCO2
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_pulmonaryArteriesO2
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_pulmonaryVeinsCO2
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_pulmonaryVeinsO2
protected
double biogears::BloodChemistry::m_redBloodCellVolume_mL
protected
double biogears::BloodChemistry::m_RemovedRBC_ct
protected
double biogears::BloodChemistry::m_RhFactorMismatch_ct
protected
double biogears::BloodChemistry::m_RhTransfusionReactionVolume_mL
protected
SELiquidCompartment* biogears::BloodChemistry::m_venaCava
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaAlbumin
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaAminoAcids
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaBicarbonate
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaCalcium
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaChloride
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaCO2
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaCreatinine
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaEpinephrine
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaGlucagon
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaGlucose
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaInsulin
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaKetones
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaLactate
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaO2
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaPotassium
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaRBC
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaSodium
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaTriacylglycerol
protected
SELiquidSubstanceQuantity* biogears::BloodChemistry::m_venaCavaUrea
protected