Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F/abaird hem validation vcom #87

Open
wants to merge 15 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,10 @@ bool SESubstanceClearance::HasCellBirthRate() const
//-----------------------------------------------------------------------------
SEScalarFrequency& SESubstanceClearance::GetCellBirthRate()
{
if (m_CellBirthRate == nullptr)
if (m_CellBirthRate == nullptr) {
m_hasCellular = true;
m_CellBirthRate = new SEScalarFrequency();
}
return *m_CellBirthRate;
}
//-----------------------------------------------------------------------------
Expand All @@ -314,9 +315,10 @@ bool SESubstanceClearance::HasCellDeathRate() const
//-----------------------------------------------------------------------------
SEScalarFrequency& SESubstanceClearance::GetCellDeathRate()
{
if (m_CellDeathRate == nullptr)
if (m_CellDeathRate == nullptr) {
m_hasCellular = true;
m_CellDeathRate = new SEScalarFrequency();
}
return *m_CellDeathRate;
}
//-----------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ constexpr char idCentralVenousPressure[] = "CentralVenousPressure";
constexpr char idCerebralBloodFlow[] = "CerebralBloodFlow";
constexpr char idCerebralPerfusionPressure[] = "CerebralPerfusionPressure";
constexpr char idDiastolicArterialPressure[] = "DiastolicArterialPressure";
constexpr char idExtremityPressureLeftArm[] = "ExtremityPressure-LeftArm";
constexpr char idExtremityPressureLeftLeg[] = "ExtremityPressure-LeftLeg";
constexpr char idExtremityPressureRightArm[] = "ExtremityPressure-RightArm";
constexpr char idExtremityPressureRightLeg[] = "ExtremityPressure-RightLeg";
constexpr char idExtremityPressureLeftArm[] = "ExtremityPressureLeftArm";
constexpr char idExtremityPressureLeftLeg[] = "ExtremityPressureLeftLeg";
constexpr char idExtremityPressureRightArm[] = "ExtremityPressureRightArm";
constexpr char idExtremityPressureRightLeg[] = "ExtremityPressureRightLeg";
constexpr char idHeartEjectionFraction[] = "HeartEjectionFraction";
constexpr char idHeartRate[] = "HeartRate";
constexpr char idHeartStrokeVolume[] = "HeartStrokeVolume";
Expand Down Expand Up @@ -1068,6 +1068,10 @@ Tree<const char*> SECardiovascularSystem::GetPhysiologyRequestGraph() const
.emplace_back(idCerebralBloodFlow)
.emplace_back(idCerebralPerfusionPressure)
.emplace_back(idDiastolicArterialPressure)
.emplace_back(idExtremityPressureLeftArm)
.emplace_back(idExtremityPressureLeftLeg)
.emplace_back(idExtremityPressureRightArm)
.emplace_back(idExtremityPressureRightLeg)
.emplace_back(idHeartEjectionFraction)
.emplace_back(idHeartRate)
.emplace_back(idHeartStrokeVolume)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ bool BioGears::SetupPatient()
//AGE ---------------------------------------------------------------
double age_yr;
double ageMin_yr = 18.0;
double ageMax_yr = 65.0;
double ageMax_yr = 105.0;
double ageStandard_yr = 44.0;
if (!m_Patient->HasAge()) {
m_Patient->GetAge().SetValue(ageStandard_yr, TimeUnit::yr);
Expand Down Expand Up @@ -607,7 +607,7 @@ bool BioGears::SetupPatient()
double respirationRate_bpm;
double respirationRateStandard_bpm = 14.0;
double respirationRateMax_bpm = 20.0;
double respirationRateMin_bpm = 12.0;
double respirationRateMin_bpm = 10.0;
if (!m_Patient->HasRespirationRateBaseline()) {
respirationRate_bpm = respirationRateStandard_bpm;
m_Patient->GetRespirationRateBaseline().SetValue(respirationRate_bpm, FrequencyUnit::Per_min);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,9 @@ bool BioGearsEngine::InitializeEngine(const std::vector<const SECondition*>* con
}
AtSteadyState(EngineState::AtInitialStableState);

//for debugging, if you change the blood/gases then uncomment this line and update the biogeassubstances file
//m_Substances->WriteBloodGases();

m_State = EngineState::SecondaryStabilization;
// Apply conditions and anything else to the physiology
// now that it's steady with provided patient, environment, and feedback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ void BloodChemistry::Initialize()
GetVolumeFractionNeutralLipidInPlasma().SetValue(0.0023);
GetVolumeFractionNeutralPhospholipidInPlasma().SetValue(0.0013);
GetPhosphate().SetValue(1.1, AmountPerVolumeUnit::mmol_Per_L);
GetStrongIonDifference().SetValue(40.5, AmountPerVolumeUnit::mmol_Per_L);
double otherIons_mmol_Per_L = 0.0;
double strongIonDifference_mmol_Per_L = m_venaCavaSodium->GetMolarity(AmountPerVolumeUnit::mmol_Per_L) + m_venaCavaPotassium->GetMolarity(AmountPerVolumeUnit::mmol_Per_L) - (m_venaCavaChloride->GetMolarity(AmountPerVolumeUnit::mmol_Per_L) + (m_venaCavaLactate->GetMolarity(AmountPerVolumeUnit::mmol_Per_L))) + otherIons_mmol_Per_L;
//strongIonDifference_mmol_Per_L = 40.5;
GetStrongIonDifference().SetValue(strongIonDifference_mmol_Per_L, AmountPerVolumeUnit::mmol_Per_L);
GetTotalBilirubin().SetValue(0.70, MassPerVolumeUnit::mg_Per_dL); //Reference range is 0.2-1.0
GetLymphocyteCellCount().SetValue(1.9e9, AmountPerVolumeUnit::ct_Per_L); //Reference range is 1.3-3.5e9 per liter
GetNeutrophilCellCount().SetValue(3.0e9, AmountPerVolumeUnit::ct_Per_L); //Reference range is 1.5-3.8e9 per liter
Expand Down Expand Up @@ -455,9 +458,9 @@ void BloodChemistry::Process()
m_data.GetSubstances().GetTriacylglycerol().GetBloodConcentration().Set(m_venaCavaTriacylglycerol->GetConcentration());
m_data.GetSubstances().GetUrea().GetBloodConcentration().Set(m_venaCavaUrea->GetConcentration());

double otherIons_mmol_Per_L = -5.4; //Na, K, and Cl baseline concentrations give SID = 45.83, we assume baseline SID = 40.5, thus "other ions" (i.e. Mg, Ca, Ketones) make up -5.3 mmol_Per_L equivalent of charge
double otherIons_mmol_Per_L = 0.0; //Na, K, and Cl baseline concentrations give SID = 45.83, we assume baseline SID = 40.5, thus "other ions" (i.e. Mg, Ca, Ketones) make up -5.3 mmol_Per_L equivalent of charge
double strongIonDifference_mmol_Per_L = m_venaCavaSodium->GetMolarity(AmountPerVolumeUnit::mmol_Per_L) + m_venaCavaPotassium->GetMolarity(AmountPerVolumeUnit::mmol_Per_L) - (m_venaCavaChloride->GetMolarity(AmountPerVolumeUnit::mmol_Per_L) + (m_venaCavaLactate->GetMolarity(AmountPerVolumeUnit::mmol_Per_L))) + otherIons_mmol_Per_L;
//GetStrongIonDifference().SetValue(strongIonDifference_mmol_Per_L, AmountPerVolumeUnit::mmol_Per_L);
GetStrongIonDifference().SetValue(strongIonDifference_mmol_Per_L, AmountPerVolumeUnit::mmol_Per_L);

// Calculate pH
GetArterialBloodPH().Set(m_aorta->GetPH());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -905,8 +905,8 @@ void Cardiovascular::CalculateVitalSigns()

/// \event Patient: blood loss below 60%, irreversible state enacted
// @cite champion2003profile
if (GetBloodVolume().GetValue(VolumeUnit::mL) <= 0.5 * m_patient->GetBloodVolumeBaseline(VolumeUnit::mL)) {
m_ss << "50% of the patient's blood volume has been lost. The patient is now in an irreversible state.";
if (GetBloodVolume().GetValue(VolumeUnit::mL) <= 0.4 * m_patient->GetBloodVolumeBaseline(VolumeUnit::mL)) {
m_ss << "40% of the patient's blood volume has been lost. The patient is now in an irreversible state.";
Warning(m_ss);
/// \irreversible Over half the patients blood volume has been lost.
if (!m_PatientActions->HasOverride()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ void Energy::CalculateVitalSigns()
// The hydrogen ion concentration is a property of the blood
// The events related to blood concentrations should be detected and set in blood chemistry.
double highPh = 8.5;
double lowPh = 6.5; // \cite Edge2006AcidosisConscious
double lowPh = 6.3; // \cite Edge2006AcidosisConscious
m_BloodpH.Sample(m_data.GetBloodChemistry().GetArterialBloodPH().GetValue());
m_BicarbonateMolarity_mmol_Per_L.Sample(m_AortaHCO3->GetMolarity(AmountPerVolumeUnit::mmol_Per_L));
//Only check these at the end of a cardiac cycle and reset at start of cardiac cycle
Expand Down
7 changes: 5 additions & 2 deletions projects/biogears/libBiogears/src/engine/Systems/Nervous.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ void Nervous::Initialize()
//m_data.GetDataTrack().Probe("m_PeripheralPressureDelta_cmH2O ", m_PeripheralPressureDelta_cmH2O);
//m_data.GetDataTrack().Probe("m_OxygenAutoregulatorHeart ", m_OxygenAutoregulatorHeart);
//m_data.GetDataTrack().Probe("m_OxygenAutoregulatorMuscle ", m_OxygenAutoregulatorMuscle);

//m_data.GetDataTrack().Probe("m_AfferentBaroreceptorAortic_Hz ", m_AfferentBaroreceptorAortic_Hz);
//m_data.GetDataTrack().Probe("m_AfferentBaroreceptorCarotid_Hz ", m_AfferentBaroreceptorCarotid_Hz);
}

bool Nervous::Load(const CDM::BioGearsNervousSystemData& in)
Expand Down Expand Up @@ -710,7 +711,9 @@ void Nervous::BaroreceptorFeedback()
m_AfferentBaroreceptorCarotid_Hz = (fBaroMin + fBaroMax * carotidExponent) / (1.0 + carotidExponent);
const double aorticExponent = std::exp((aorticStrainSignal - baselineStrainSignal) / kBaro);
m_AfferentBaroreceptorAortic_Hz = (fBaroMin + fBaroMax * aorticExponent) / (1.0 + aorticExponent);

//m_data.GetDataTrack().Probe("m_AfferentBaroreceptorAortic_Hz ", m_AfferentBaroreceptorAortic_Hz);
//m_data.GetDataTrack().Probe("m_AfferentBaroreceptorCarotid_Hz ", m_AfferentBaroreceptorCarotid_Hz);
//
//Cardiopulmonary (or low pressure) receptors are sensitive to the volume of blood being return to heart
//Since they are located by the heart, they are also effected by changes in transmural pressure.
//This model for cardiopulmonary receptors is based on Lim2013Cardiovascular
Expand Down
10 changes: 10 additions & 0 deletions projects/biogears/libBiogears/src/engine/Systems/Renal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,11 @@ void Renal::CalculateGlomerularTransport(SESubstance& sub)

double massToMove_mg = concentration_mg_Per_mL * flow_mL_Per_s * m_dt * filterability * fractionUnbound;

//scale the mass to move of the lactate during acidosis:
if (sub.GetName() == "Lactate") {
massToMove_mg *= (10.0 / (1 + 24.5 * exp(100 * (m_data.GetBloodChemistry().GetArterialBloodPH().GetValue() - 7.35)))) + 1.0;
}

//Make sure we don't try to move too much
massToMove_mg = std::min(massToMove_mg, glomerularSubQ->GetMass().GetValue(MassUnit::mg));

Expand Down Expand Up @@ -1070,6 +1075,11 @@ void Renal::CalculateReabsorptionTransport(SESubstance& sub)
SELiquidSubstanceQuantity* peritubularSubQ = nullptr;
SEFluidCircuitPath* reabsorptionResistancePath = nullptr;

//we want to adjust the reabsorption in response to ph in the blood
if (sub.GetName() == "Lactate" && m_data.GetBloodChemistry().GetArterialBloodPH().GetValue() < 7.32) {
sub.GetClearance().GetRenalReabsorptionRatio().SetValue(0.000001);
}

double totalReabsorptionRate_mg_Per_s = 0.0;
//We'll apply the factor to the effectively make the FiltrationFraction change by the same amount
//This is determined in Osmoreceptor Feedback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ struct error_functor : Functor<double> {
double totalCO2_mM = CO2_mM + HCO3_mM + 4.0 * HbCO2_mM + 4.0 * HbO2CO2_mM;
double totalO2_mM = O2_mM + 4.0 * HbO2_mM + 4.0 * HbO2CO2_mM;

double f0 = m_SatCalc.m_StrongIonDifference_mmol_Per_L - bicarb_mM - m_SatCalc.m_albumin_g_per_L * (0.123 * pH - 0.631) - m_SatCalc.m_Phosphate_mmol_Per_L * (0.309 * pH - 0.469);
double f0 = m_SatCalc.m_StrongIonDifference_mmol_Per_L - bicarb_mM - (m_SatCalc.m_albumin_g_per_L * (0.123 * pH - 0.631)) - m_SatCalc.m_Phosphate_mmol_Per_L * (0.309 * pH - 0.469);
double f1 = totalCO2_mM - co2_mM - bicarb_mM - 4.0 * CarbonDioxideSaturation * totalHemoglobin_mM;
double f2 = totalO2_mM - o2_mM - 4.0 * OxygenSaturation * totalHemoglobin_mM;

Expand Down
18 changes: 12 additions & 6 deletions projects/biogears/libBiogears/src/engine/Systems/Tissue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ void Tissue::CalculateMetabolicConsumptionAndProduction(double time_s)
const double biologicalDebt = m_data.GetNervous().GetBiologicalDebt().GetValue();
const double exerciseEnergyRequested_kcal = m_data.GetEnergy().GetExerciseEnergyDemand(PowerUnit::kcal_Per_s) * time_s; //Will get added to muscle in tissue loop below
const double otherEnergyDemandAboveBasal_kcal = std::max((TMR_kcal_Per_s - BMR_kcal_Per_s) * time_s * (1.0 - biologicalDebt) - exerciseEnergyRequested_kcal, 0.0); //Due to other factors like shivering -- will get split between muscles and fat stores in tissue loop below
const double hypoperfusionDeficit_kcal = m_data.GetEnergy().GetEnergyDeficit(PowerUnit::kcal_Per_s) * time_s; //Hypoperfusion deficit is "faux" energy value -- it makes system perceive an energy deficit and enter anaerobic production earlier during hemorrhage and sepsis
const double hypoperfusionDeficit_kcal = 1000.0*m_data.GetEnergy().GetEnergyDeficit(PowerUnit::kcal_Per_s) * time_s; //Hypoperfusion deficit is "faux" energy value -- it makes system perceive an energy deficit and enter anaerobic production earlier during hemorrhage and sepsis
double brainNeededEnergy_kcal = .2 * baseEnergyRequested_kcal; //brain requires a roughly constant 20% of basal energy regardless of exercise \cite raichle2002appraising
double nonbrainNeededEnergy_kcal = 0.8 * baseEnergyRequested_kcal + hypoperfusionDeficit_kcal;
double totalEnergyRequested_kcal = brainNeededEnergy_kcal + nonbrainNeededEnergy_kcal + exerciseEnergyRequested_kcal + otherEnergyDemandAboveBasal_kcal; //Use to check math below
Expand Down Expand Up @@ -973,6 +973,9 @@ void Tissue::CalculateMetabolicConsumptionAndProduction(double time_s)
double mandatoryMuscleAnaerobicFraction = 0.028; //There is always some anaerobic consumption in the body, particularly in muscle fibers with few mitochondria \cite boron2012medical
double kcal_Per_day_Per_Watt = 20.6362855;
double maxWorkRate_W = m_Patient->GetMaxWorkRate().GetValue(PowerUnit::W);
double lactateScale = 1.0;
double currentBloodVolume_mL = m_data.GetCardiovascular().GetBloodVolume().GetValue(VolumeUnit::mL);
double bloodVolumeBaseline_mL = m_data.GetPatient().GetBloodVolumeBaseline().GetValue(VolumeUnit::mL);

double sleepTime_min = m_data.GetNervous().GetSleepTime().GetValue(TimeUnit::min); //update value from last computation
double wakeTime_min = m_data.GetNervous().GetWakeTime().GetValue(TimeUnit::min); //update value from last computation
Expand All @@ -986,7 +989,10 @@ void Tissue::CalculateMetabolicConsumptionAndProduction(double time_s)
if (m_PatientActions->HasHemorrhage()) {
double maxBleedingRate_mL_Per_min = 200.0;
double bleedingRate_mL_Per_min = m_data.GetCompartments().GetLiquidCompartment(BGE::VascularCompartment::Ground)->GetInFlow(VolumePerTimeUnit::mL_Per_min);
mandatoryMuscleAnaerobicFraction = 0.5 * bleedingRate_mL_Per_min / maxBleedingRate_mL_Per_min;
mandatoryMuscleAnaerobicFraction = (bleedingRate_mL_Per_min / maxBleedingRate_mL_Per_min);
//also scale based on total blood loss in increase lactate scaling (this perturbes blood volume as a function of hypovolemia up to 8 times production)
lactateScale = 15.5 / (1 + 5.4 * exp(25.0 * ((currentBloodVolume_mL / bloodVolumeBaseline_mL) - 1.0))) + 1;
lactateScale += mandatoryMuscleAnaerobicFraction;
}

//if a patient is sleep deprived scale back how much glucose the brain is using (7%)
Expand Down Expand Up @@ -1434,7 +1440,7 @@ void Tissue::CalculateMetabolicConsumptionAndProduction(double time_s)
if (tissueNeededEnergy_kcal > 0 && totalEnergyAsTissueIntracellularGlucose_kcal >= tissueNeededEnergy_kcal) {
double glucoseToConsume_mol = tissueNeededEnergy_kcal / energyPerMolATP_kcal / anaerobic_ATP_Per_Glucose;
TissueGlucose->GetMass().IncrementValue(-glucoseToConsume_mol * m_Glucose->GetMolarMass(MassPerAmountUnit::g_Per_mol), MassUnit::g);
TissueLactate->GetMass().IncrementValue(glucoseToConsume_mol * lactate_Per_Glucose * m_Lactate->GetMolarMass(MassPerAmountUnit::g_Per_mol), MassUnit::g);
TissueLactate->GetMass().IncrementValue(lactateScale * glucoseToConsume_mol * lactate_Per_Glucose * m_Lactate->GetMolarMass(MassPerAmountUnit::g_Per_mol), MassUnit::g);
tissueNeededEnergy_kcal = 0;
lactateProductionRate_mol_Per_s += glucoseToConsume_mol * lactate_Per_Glucose / time_s;
if (m_AnaerobicTissues.find(tissue->GetName()) == std::string::npos) //for tracking only
Expand All @@ -1444,7 +1450,7 @@ void Tissue::CalculateMetabolicConsumptionAndProduction(double time_s)
else if (tissueNeededEnergy_kcal > 0) {
double glucoseToConsume_mol = totalEnergyAsTissueIntracellularGlucose_kcal / energyPerMolATP_kcal / anaerobic_ATP_Per_Glucose;
TissueGlucose->GetMass().SetValue(0, MassUnit::g);
TissueLactate->GetMass().IncrementValue(glucoseToConsume_mol * lactate_Per_Glucose * m_Lactate->GetMolarMass(MassPerAmountUnit::g_Per_mol), MassUnit::g);
TissueLactate->GetMass().IncrementValue(lactateScale * glucoseToConsume_mol * lactate_Per_Glucose * m_Lactate->GetMolarMass(MassPerAmountUnit::g_Per_mol), MassUnit::g);
tissueNeededEnergy_kcal -= glucoseToConsume_mol * anaerobic_ATP_Per_Glucose * energyPerMolATP_kcal;
lactateProductionRate_mol_Per_s += glucoseToConsume_mol * lactate_Per_Glucose / time_s;
if (m_AnaerobicTissues.find(tissue->GetName()) == std::string::npos) //for tracking only
Expand All @@ -1461,7 +1467,7 @@ void Tissue::CalculateMetabolicConsumptionAndProduction(double time_s)
double glycogenConsumed_g = ((tissueNeededEnergy_kcal + muscleMandatoryAnaerobicNeededEnergy_kcal) / energyAsMuscleGlycogen_kcal) * GetMuscleGlycogen(MassUnit::g);
double glycogenConsumed_mol = glycogenConsumed_g / m_Glucose->GetMolarMass(MassPerAmountUnit::g_Per_mol);
GetMuscleGlycogen().IncrementValue(-glycogenConsumed_g, MassUnit::g);
TissueLactate->GetMass().IncrementValue(glycogenConsumed_mol * lactate_Per_Glycogen * m_Lactate->GetMolarMass(MassPerAmountUnit::g_Per_mol), MassUnit::g);
TissueLactate->GetMass().IncrementValue(lactateScale * glycogenConsumed_mol * lactate_Per_Glycogen * m_Lactate->GetMolarMass(MassPerAmountUnit::g_Per_mol), MassUnit::g);
lactateProductionRate_mol_Per_s += glycogenConsumed_mol * lactate_Per_Glycogen / time_s;
if (m_AnaerobicTissues.find(tissue->GetName()) == std::string::npos && tissueNeededEnergy_kcal != 0) //for tracking only
m_AnaerobicTissues.append(std::string { tissue->GetName() } + " ");
Expand All @@ -1472,7 +1478,7 @@ void Tissue::CalculateMetabolicConsumptionAndProduction(double time_s)
else {
double glycogenConsumed_mol = GetMuscleGlycogen(MassUnit::g) / m_Glucose->GetMolarMass(MassPerAmountUnit::g_Per_mol);
GetMuscleGlycogen().SetValue(0, MassUnit::g);
TissueLactate->GetMass().IncrementValue(glycogenConsumed_mol * lactate_Per_Glycogen * m_Lactate->GetMolarMass(MassPerAmountUnit::g_Per_mol), MassUnit::g);
TissueLactate->GetMass().IncrementValue(lactateScale * glycogenConsumed_mol * lactate_Per_Glycogen * m_Lactate->GetMolarMass(MassPerAmountUnit::g_Per_mol), MassUnit::g);
tissueNeededEnergy_kcal -= glycogenConsumed_mol * anaerobic_ATP_Per_Glycogen * energyPerMolATP_kcal;
lactateProductionRate_mol_Per_s += glycogenConsumed_mol * lactate_Per_Glycogen / time_s;
if (m_AnaerobicTissues.find(tissue->GetName()) == std::string::npos && tissueNeededEnergy_kcal != 0) //for tracking only
Expand Down
36 changes: 18 additions & 18 deletions projects/cli/src/data/PatientGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,24 +148,24 @@ bool PatientGenerator::process(const std::string& name, const std::string& value
} catch (std::exception e) {
rValue = false;
}
} else if ("RightLungFraction" == name) {
PatientData::RightLungRatio_type rlr_data;
try {
rlr_data.value(std::stod(value));
patient.RightLungRatio(rlr_data);
} catch (std::exception e) {
rValue = false;
}
} else if ("SkinSurfaceArea" == name) {
size_t pos;
PatientData::SkinSurfaceArea_type ssa_data;
try {
ssa_data.value(std::stod(value, &pos));
ssa_data.unit(biogears::trim(value.substr(pos)));
patient.SkinSurfaceArea(ssa_data);
} catch (std::exception e) {
rValue = false;
}
//} else if ("RightLungFraction" == name) {
// PatientData::RightLungRatio_type rlr_data;
// try {
// rlr_data.value(std::stod(value));
// patient.RightLungRatio(rlr_data);
// } catch (std::exception e) {
// rValue = false;
// }
//} else if ("SkinSurfaceArea" == name) {
// size_t pos;
// PatientData::SkinSurfaceArea_type ssa_data;
// try {
// ssa_data.value(std::stod(value, &pos));
// ssa_data.unit(biogears::trim(value.substr(pos)));
// patient.SkinSurfaceArea(ssa_data);
// } catch (std::exception e) {
// rValue = false;
// }
} else if ("BasalMetabolicRate" == name) {
size_t pos;
PatientData::BasalMetabolicRate_type bmr_data;
Expand Down
Loading