Todo List
Member AnesthesiaMachine::CalculateGasSource ()
: Do this stuff more generically by looping over all substances
Member BloodChemistry::Process ()
Change system data so that we have ArterialBloodPH (from aorta) and VenousBloodPH (from vena cava)
Member Cardiovascular::AdjustVascularTone ()

Add dilation (decreased resistance) to myocardium supply path if myocardium oxygen deficit event is active.

We are treating all systemic resistance paths equally, including the brain.

Member Cardiovascular::BeginCardiacCycle ()
need to reset the heart elastance min and max at the end of each stabiliation period in AtSteadyState()
Member Cardiovascular::CalculateVitalSigns ()
Make sure irreversible state is hit before we get here.
Member Cardiovascular::ChronicRenalStenosis ()
move this to CV
Member Cardiovascular::Hemorrhage ()
Enforce limits and remove fatal errors.
Member Cardiovascular::MetabolicToneResponse ()

Possibly add a thermoreception model to nervous and move the computation there.

Skip over Brain and Myocardium and add arms and legs

Member Cardiovascular::SetUp ()
We are assuming that the complex renal system is connected. Make it agnostic.
Member Drugs::AdministerSubstanceBolus ()
Add fluid amount to fluid system
Member Drugs::AdministerSubstanceCompoundInfusion ()

Enforce limits and remove the fatal error

correct the mass based on what we have left in the bag

Member Drugs::AdministerSubstanceInfusion ()

sub needs to be const

Enforce limits and remove the fatal error

Need to add fluid amount to fluid system

Support state, and how would a user remove this action?

Member Drugs::CalculateDrugEffects ()
The drug effect is being applied to the baseline, so if the baseline changes the delta heart rate changes.
Member Drugs::CalculatePartitionCoefficients ()
How to support oral absorption - should I check if oral administration then use Oral absorption rate otherwise assume 1?
Member Energy::CalculateSweatRate ()
Convert to sweat density once specific gravity calculation is in
Member Energy::CalculateVitalSigns ()
Move to blood chemistry
Member Energy::Exercise ()
Log an event or info message that available energy is insufficient to meet demand.
Member Gastrointestinal::DigestStomachNutrients (double duration_s)
Remove tuning factor and adjust protein to urea fraction following investigation
Member GeneralMath::PercentTolerance (double expected, double calculated, double epsilon=1e-20)
reevaluate how to handle this - it potentially causes a problem during stabilization
Member Nervous::BaroreceptorFeedback ()
Add decompensation. Perhaps a reduction in the effect that is a function of blood volume below a threshold... and maybe time.
Member Nervous::ChemoreceptorFeedback ()
Compute and apply chemoreceptor-mediated contractility changes
Member Nervous::m_ArterialCarbonDioxideSetPoint_mmHg
Aaron these should be baselines.
Member PulseController::SetupCardiovascular ()
Make these a function of the systolic and diastolic pressure by fitting a curve to the data from the variations test
Member PulseController::SetupRenal ()

The bladder is currently not being modeled as a compliance

Use a compliance here - make sure you remove the current handling of bladder volume in the renal system as a pressure source

Member PulseController::SetupTissue ()
Put Initial Circuit/Compartment data values into the configuration file.
Member PulseSubstances::InitializeLiquidCompartmentNonGases ()
Tristearin is actually all triacylglycerols. Change name.
Member Renal::CalculateOsmoreceptorFeedback ()
get the arota osmolarity instead of sodium concentration
Member Renal::CalculateReabsorptionFeedback ()
turn on colloid osmotic pressure once substances have been handled properly (and GI)
Member Renal::CalculateUltrafiltrationFeedback ()
turn on colloid osmotic pressure once substances have been handled properly (and GI)
Member Renal::UpdateBladderVolume ()
Eventually replace this entire thing with a compliance and model peristaltic flow
Member Respiratory::CalculatePulmonaryFunctionTest (SEPulmonaryFunctionTest &pft) const
Insert more PFT calculations here
Member Respiratory::CalculateVitalSigns ()
Move to blood chemistry
Member Respiratory::Intubation ()
Make this a modifier (i.e. multiplier), instead of setting it directly
Member Respiratory::RespiratoryDriver ()
rename "StartOfConsiousInhale"
Member Respiratory::SetUp ()
figure out how to modify these resistances without getting the cv circuit - maybe add a parameter, like baroreceptors does
Member Tissue::AtSteadyState ()
Replace with new Consume Methodology
Member Tissue::CalculateDiffusion ()

Enable non-advective transport for all substances

I believe we can optimize with a cache of these values. Also, we can cache permeabilityCoefficient_mL_Per_s_g which is not a function of the tissue properties

Define relationship between tissue mass and membrane area.

Compute the pump rate from an empirically-determined baseline pump rate.

Decrement glucose from EC for energy and decrement/increment from EC for conversions (glycogen, gluconeogenesis, etc).

Compute the pump rate from an empirically-determined baseline pump rate.

Member Tissue::CalculateMetabolicConsumptionAndProduction (double time)

Remove this temporary blood increment when diffusion is operational (0.125 is tuning factor)

This is the reason for the decrease in O2 consumption and CO2 production with oxygen depletion. It looks like we are mixing models here.

Remove this temporary blood increment when diffusion is fully operational

Remove this temporary blood increment when diffusion is fully operational

Remove this temporary blood increment when diffusion is operational (0.125 is tuning factor)

Creatinine production rate should be a function of muscle mass.

Remove this temporary blood increment when diffusion is fully operational

Fully implement endocrine glucose control and remove this temporary blood increment once diffusion is fully operational

Member Tissue::GlucoseLipidControl (double time)

Switch to active transport methodology when ready

Determine better value for the transfer time constant from 24 hour glucose and insulin profiles

Member Tissue::Process ()
Remove SetBodyState hardcode and replace with computed values after substance redux is complete