Skip to content
This repository was archived by the owner on Jan 25, 2024. It is now read-only.

Commit e5e3c11

Browse files
committed
source additions for new 6.3 release/support
1 parent e9e8e0f commit e5e3c11

File tree

156 files changed

+15054
-1271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+15054
-1271
lines changed

src/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
biogears.version=BioGears_6.1.1-beta
1+
biogears.version=BioGears_6.3.0-beta
22
biogears.home=${basedir}/..
33
biogears.bin=${biogears.home}/bin
44
biogears.config=release

src/build.xml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,13 @@
314314
<ant antfile="build.xml" dir="${biogears.cdm}" target="jar" />
315315
<ant antfile="build.xml" dir="${biogears.engine}" target="compile" />
316316
<ant antfile="build.xml" dir="${biogears.engine}" target="jar" />
317+
<ant antfile="build.xml" dir="${biogears.gui}" target="compile" />
318+
<ant antfile="build.xml" dir="${biogears.gui}" target="jar" />
317319
<!-- Create a jar with all dependencies -->
318320
<delete file="../bin/BioGears.jar"/>
319321
<!-- Create the Jar-->
320322
<jar destfile="../bin/BioGears.jar" excludes="**/Sun_micr.rsa **/Sun_micr.sf">
323+
<zipfileset src="${biogears.bin}/BioGearsGUI.jar" includes="**/*.java **/*.class"/>
321324
<zipfileset src="${biogears.bin}/BioGearsEngine.jar" includes="**/*.java **/*.class"/>
322325
<zipfileset src="${biogears.bin}/CommonDataModel.jar" includes="**/*.java **/*.class"/>
323326
<zipfileset src="${biogears.bin}/DataModelBindings.jar" includes="**/*.java **/*.class"/>
@@ -626,6 +629,16 @@
626629
<target name="buildSDK-windows" depends="copyToSDK-windows" if="deployWindows">
627630
<!-- Make sure howto files compile -->
628631
<ant antfile="build.xml" dir="${biogears.SDK}" target="all" />
632+
<!-- Zip it! -->
633+
<delete file="${biogears.deploy}/${biogears.version}-sdk-windows.zip"/>
634+
<zip destfile="${biogears.deploy}/${biogears.version}-sdk-windows.zip">
635+
<zipfileset dir="${biogears.home}" prefix="${biogears.version}">
636+
<include name="LICENSE"/>
637+
<include name="NOTICE"/>
638+
</zipfileset>
639+
<zipfileset dir="${biogears.SDK}" excludes="howto/build/**, /cmake/msvs*/**" prefix="${biogears.version}"/>
640+
<zipfileset dir="${biogears.doxy}" includes="html/**, Mainpage.html, ReadMe.txt" prefix="${biogears.version}/docs/"/>
641+
</zip>
629642
</target>
630643
<target name="copyToSDK-windows" if="deployWindows">
631644
<!-- Clean out the sdk folder of any previous deployment -->
@@ -959,7 +972,7 @@
959972
</java>
960973
</target>
961974

962-
<!-- Example for pulling from the build machine : ant rebaseDebug -DrebaseFrom="\\sed-biogears\JenkinsBuild\History\MSVC-x86\374 - b5541f5b6212d8288f1ff35da996110f871292c9\Scenarios" -->
975+
<!-- Example for pulling from the build machine : ant rebaseDebug -DrebaseFrom="\\sed-biogears\JenkinsBuild\History\MSVC-x86\387 - aa894de288d5147620c4e0d275fe64d8bd0f1d5f\Scenarios" -->
963976
<target name="rebaseDebug">
964977
<java classname="mil.tatrc.physiology.utilities.testing.Rebase" dir="${biogears.bin}" fork="true" failonerror="false">
965978
<arg value="${rebaseFrom}" unless:blank="${rebaseFrom}"/><!-- From -->

src/cdm/cpp/compartment/tissue/SETissueCompartment.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ SETissueCompartment::SETissueCompartment(const std::string& name, Logger* logger
2727
{
2828
m_AcidicPhospohlipidConcentration = nullptr;
2929
m_MatrixVolume = nullptr;
30+
m_MembranePotential = nullptr;
3031
m_NeutralLipidsVolumeFraction = nullptr;
3132
m_NeutralPhospholipidsVolumeFraction = nullptr;
3233
m_TissueToPlasmaAlbuminRatio = nullptr;
@@ -45,6 +46,7 @@ void SETissueCompartment::Clear()
4546
SECompartment::Clear();
4647
SAFE_DELETE(m_AcidicPhospohlipidConcentration);
4748
SAFE_DELETE(m_MatrixVolume);
49+
SAFE_DELETE(m_MembranePotential);
4850
SAFE_DELETE(m_NeutralLipidsVolumeFraction);
4951
SAFE_DELETE(m_NeutralPhospholipidsVolumeFraction);
5052
SAFE_DELETE(m_TissueToPlasmaAlbuminRatio);
@@ -61,6 +63,8 @@ bool SETissueCompartment::Load(const CDM::TissueCompartmentData& in, SESubstance
6163
GetAcidicPhospohlipidConcentration().Load(in.AcidicPhospohlipidConcentration().get());
6264
if (in.MatrixVolume().present())
6365
GetMatrixVolume().Load(in.MatrixVolume().get());
66+
if (in.MembranePotential().present())
67+
GetMembranePotential().Load(in.MembranePotential().get());
6468
if (in.NeutralLipidsVolumeFraction().present())
6569
GetNeutralLipidsVolumeFraction().Load(in.NeutralLipidsVolumeFraction().get());
6670
if (in.NeutralPhospholipidsVolumeFraction().present())
@@ -89,6 +93,8 @@ void SETissueCompartment::Unload(CDM::TissueCompartmentData& data)
8993
data.AcidicPhospohlipidConcentration(std::unique_ptr<CDM::ScalarMassPerMassData>(m_AcidicPhospohlipidConcentration->Unload()));
9094
if (HasMatrixVolume())
9195
data.MatrixVolume(std::unique_ptr<CDM::ScalarVolumeData>(m_MatrixVolume->Unload()));
96+
if (HasMembranePotential())
97+
data.MembranePotential(std::unique_ptr<CDM::ScalarElectricPotentialData>(m_MembranePotential->Unload()));
9298
if (HasNeutralLipidsVolumeFraction())
9399
data.NeutralLipidsVolumeFraction(std::unique_ptr<CDM::ScalarFractionData>(m_NeutralLipidsVolumeFraction->Unload()));
94100
if (HasNeutralPhospholipidsVolumeFraction())
@@ -111,6 +117,8 @@ const SEScalar* SETissueCompartment::GetScalar(const std::string& name)
111117
return &GetAcidicPhospohlipidConcentration();
112118
if (name.compare("MatrixVolume") == 0)
113119
return &GetMatrixVolume();
120+
if (name.compare("MembranePotential") == 0)
121+
return &GetMembranePotential();
114122
if (name.compare("NeutralLipidsVolumeFraction") == 0)
115123
return &GetNeutralLipidsVolumeFraction();
116124
if (name.compare("NeutralPhospholipidsVolumeFraction") == 0)
@@ -165,6 +173,23 @@ double SETissueCompartment::GetMatrixVolume(const VolumeUnit& unit) const
165173
return m_MatrixVolume->GetValue(unit);
166174
}
167175

176+
bool SETissueCompartment::HasMembranePotential() const
177+
{
178+
return m_MembranePotential == nullptr ? false : m_MembranePotential->IsValid();
179+
}
180+
SEScalarElectricPotential& SETissueCompartment::GetMembranePotential()
181+
{
182+
if (m_MembranePotential == nullptr)
183+
m_MembranePotential = new SEScalarElectricPotential();
184+
return *m_MembranePotential;
185+
}
186+
double SETissueCompartment::GetMembranePotential(const ElectricPotentialUnit& unit) const
187+
{
188+
if (m_MembranePotential == nullptr)
189+
return SEScalar::dNaN();
190+
return m_MembranePotential->GetValue(unit);
191+
}
192+
168193
bool SETissueCompartment::HasNeutralLipidsVolumeFraction() const
169194
{
170195
return m_NeutralLipidsVolumeFraction == nullptr ? false : m_NeutralLipidsVolumeFraction->IsValid();

src/cdm/cpp/compartment/tissue/SETissueCompartment.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ class DLL_DECL SETissueCompartment : public SECompartment
4848
virtual SEScalarVolume& GetMatrixVolume();
4949
virtual double GetMatrixVolume(const VolumeUnit& unit) const;
5050

51+
virtual bool HasMembranePotential() const;
52+
virtual SEScalarElectricPotential& GetMembranePotential();
53+
virtual double GetMembranePotential(const ElectricPotentialUnit& unit) const;
54+
5155
virtual bool HasNeutralLipidsVolumeFraction() const;
5256
virtual SEScalarFraction& GetNeutralLipidsVolumeFraction();
5357
virtual double GetNeutralLipidsVolumeFraction() const;
@@ -76,6 +80,7 @@ class DLL_DECL SETissueCompartment : public SECompartment
7680

7781
SEScalarMassPerMass* m_AcidicPhospohlipidConcentration;
7882
SEScalarVolume* m_MatrixVolume;
83+
SEScalarElectricPotential* m_MembranePotential;
7984
SEScalarFraction* m_NeutralLipidsVolumeFraction;
8085
SEScalarFraction* m_NeutralPhospholipidsVolumeFraction;
8186
SEScalar* m_TissueToPlasmaAlbuminRatio;

src/cdm/cpp/engine/PhysiologyEngineTrack.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ specific language governing permissions and limitations under the License.
3737
#include "system/physiology/SERenalSystem.h"
3838
#include "system/physiology/SERespiratorySystem.h"
3939
#include "system/physiology/SETissueSystem.h"
40+
#include "system/physiology/SEHepaticSystem.h"
4041
#include "system/equipment/Anesthesia/SEAnesthesiaMachine.h"
4142
#include "system/equipment/ElectroCardioGram/SEElectroCardioGram.h"
4243
#include "system/equipment/Inhaler/SEInhaler.h"
@@ -102,6 +103,9 @@ PhysiologyEngineTrack::PhysiologyEngineTrack(PhysiologyEngine& engine) : Loggabl
102103
SENervousSystem* nervous = (SENervousSystem*)engine.GetNervousSystem();
103104
if (nervous != nullptr)
104105
m_PhysiologySystems.push_back(nervous);
106+
SEHepaticSystem* hepatic = (SEHepaticSystem*)engine.GetHepaticSystem();
107+
if (hepatic != nullptr)
108+
m_PhysiologySystems.push_back(hepatic);
105109

106110
m_Environment = (SEEnvironment*)engine.GetEnvironment();
107111

@@ -155,7 +159,7 @@ void PhysiologyEngineTrack::SetupRequests()
155159
{
156160
bool isOpen = m_ResultsStream.is_open();
157161
if (!isOpen || m_ForceConnection)
158-
{// Process/Hook up all requests with their associated scalers
162+
{// Process/Hook up all requests with their associated scalars
159163
for (SEDataRequest* dr : m_DataRequestMgr.GetDataRequests())
160164
{
161165
if (!TrackRequest(*dr))
@@ -190,7 +194,7 @@ void PhysiologyEngineTrack::PullData()
190194
if (ds == nullptr)
191195
{
192196
Error("You cannot modify CSV Results file data requests in the middle of a run.");
193-
Error("Ignorning data request " + dr->GetName());
197+
Error("Ignoring data request " + dr->GetName());
194198
continue;
195199
}
196200
if (!ds->HasScalar())

src/cdm/cpp/patient/SEPatient.cpp

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ SEPatient::SEPatient(Logger* logger) : Loggable(logger)
7070
m_InspiratoryCapacity = nullptr;
7171
m_InspiratoryReserveVolume = nullptr;
7272
m_LeanBodyMass = nullptr;
73+
m_MuscleMass = nullptr;
7374
m_MeanArterialPressureBaseline = nullptr;
7475
m_ResidualVolume = nullptr;
7576
m_RespirationRateBaseline = nullptr;
@@ -128,6 +129,7 @@ void SEPatient::Clear()
128129
SAFE_DELETE(m_InspiratoryCapacity);
129130
SAFE_DELETE(m_InspiratoryReserveVolume);
130131
SAFE_DELETE(m_LeanBodyMass);
132+
SAFE_DELETE(m_MuscleMass);
131133
SAFE_DELETE(m_MeanArterialPressureBaseline);
132134
SAFE_DELETE(m_ResidualVolume);
133135
SAFE_DELETE(m_RespirationRateBaseline);
@@ -176,6 +178,8 @@ const SEScalar* SEPatient::GetScalar(const std::string& name)
176178
return &GetInspiratoryReserveVolume();
177179
if (name.compare("LeanBodyMass") == 0)
178180
return &GetLeanBodyMass();
181+
if (name.compare("MuscleMass") == 0)
182+
return &GetMuscleMass();
179183
if (name.compare("MeanArterialPressureBaseline") == 0)
180184
return &GetMeanArterialPressureBaseline();
181185
if (name.compare("ResidualVolume") == 0)
@@ -240,6 +244,8 @@ bool SEPatient::Load(const CDM::PatientData& in)
240244
GetInspiratoryReserveVolume().Load(in.InspiratoryReserveVolume().get());
241245
if (in.LeanBodyMass().present())
242246
GetLeanBodyMass().Load(in.LeanBodyMass().get());
247+
if (in.MuscleMass().present())
248+
GetMuscleMass().Load(in.MuscleMass().get());
243249
if(in.MeanArterialPressureBaseline().present())
244250
GetMeanArterialPressureBaseline().Load(in.MeanArterialPressureBaseline().get());
245251
if (in.ResidualVolume().present())
@@ -318,6 +324,8 @@ void SEPatient::Unload(CDM::PatientData& data) const
318324
data.InspiratoryReserveVolume(std::unique_ptr<CDM::ScalarVolumeData>(m_InspiratoryReserveVolume->Unload()));
319325
if (m_LeanBodyMass != nullptr)
320326
data.LeanBodyMass(std::unique_ptr<CDM::ScalarMassData>(m_LeanBodyMass->Unload()));
327+
if (m_MuscleMass != nullptr)
328+
data.MuscleMass(std::unique_ptr<CDM::ScalarMassData>(m_MuscleMass->Unload()));
321329
if(m_MeanArterialPressureBaseline!=nullptr)
322330
data.MeanArterialPressureBaseline(std::unique_ptr<CDM::ScalarPressureData>(m_MeanArterialPressureBaseline->Unload()));
323331
if (m_ResidualVolume != nullptr)
@@ -468,6 +476,9 @@ void SEPatient::SetEvent(CDM::enumPatientEvent::value type, bool active, const S
468476
case CDM::enumPatientEvent::ModerateAcuteRespiratoryDistress:
469477
m_ss << " The patient has Moderate Acute Respiratory Distress";
470478
break;
479+
case CDM::enumPatientEvent::MuscleCatabolism:
480+
m_ss << " Patient has begun muscle catabolism";
481+
break;
471482
case CDM::enumPatientEvent::MuscleGlycogenDepleted:
472483
m_ss << " Patient's muscle glycogen is depleted";
473484
break;
@@ -496,7 +507,7 @@ void SEPatient::SetEvent(CDM::enumPatientEvent::value type, bool active, const S
496507
m_ss << " Patient has Tachypnea";
497508
break;
498509
case CDM::enumPatientEvent::Fatigue:
499-
m_ss << "Patient has fatigue";
510+
m_ss << " Patient has fatigue";
500511
break;
501512
case CDM::enumPatientEvent::StartOfCardiacCycle:
502513
case CDM::enumPatientEvent::StartOfExhale:
@@ -542,7 +553,7 @@ void SEPatient::SetEvent(CDM::enumPatientEvent::value type, bool active, const S
542553
m_ss << " Patient no longer has Diuresis";
543554
break;
544555
case CDM::enumPatientEvent::Fasciculation:
545-
m_ss << "Patient no longer has fasciculations";
556+
m_ss << "Patient no longer has Fasciculation";
546557
break;
547558
case CDM::enumPatientEvent::FunctionalIncontinence:
548559
m_ss << " Patient has an empty bladder";
@@ -635,7 +646,7 @@ void SEPatient::SetEvent(CDM::enumPatientEvent::value type, bool active, const S
635646
m_ss << " Patient no longer has Tachypnea";
636647
break;
637648
case CDM::enumPatientEvent::Fatigue:
638-
m_ss << "Patient is no longer fatigued";
649+
m_ss << " Patient is no longer fatigued";
639650
break;
640651
case CDM::enumPatientEvent::StartOfCardiacCycle:
641652
case CDM::enumPatientEvent::StartOfExhale:
@@ -1005,6 +1016,23 @@ double SEPatient::GetLeanBodyMass(const MassUnit& unit) const
10051016
return m_LeanBodyMass->GetValue(unit);
10061017
}
10071018

1019+
bool SEPatient::HasMuscleMass() const
1020+
{
1021+
return m_MuscleMass == nullptr ? false : m_MuscleMass->IsValid();
1022+
}
1023+
SEScalarMass& SEPatient::GetMuscleMass()
1024+
{
1025+
if (m_MuscleMass == nullptr)
1026+
m_MuscleMass = new SEScalarMass();
1027+
return *m_MuscleMass;
1028+
}
1029+
double SEPatient::GetMuscleMass(const MassUnit& unit) const
1030+
{
1031+
if (m_MuscleMass == nullptr)
1032+
return SEScalar::dNaN();
1033+
return m_MuscleMass->GetValue(unit);
1034+
}
1035+
10081036
bool SEPatient::HasMeanArterialPressureBaseline() const
10091037
{
10101038
return m_MeanArterialPressureBaseline==nullptr?false:m_MeanArterialPressureBaseline->IsValid();

src/cdm/cpp/patient/SEPatient.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ class DLL_DECL SEPatient : public Loggable
136136
virtual SEScalarMass& GetLeanBodyMass();
137137
virtual double GetLeanBodyMass(const MassUnit& unit) const;
138138

139+
virtual bool HasMuscleMass() const;
140+
virtual SEScalarMass& GetMuscleMass();
141+
virtual double GetMuscleMass(const MassUnit& unit) const;
142+
139143
virtual bool HasMeanArterialPressureBaseline() const;
140144
virtual SEScalarPressure& GetMeanArterialPressureBaseline();
141145
virtual double GetMeanArterialPressureBaseline(const PressureUnit& unit) const;
@@ -187,6 +191,7 @@ class DLL_DECL SEPatient : public Loggable
187191
SEScalarMassPerVolume* m_BodyDensity;
188192
SEScalarFraction* m_BodyFatFraction;
189193
SEScalarMass* m_LeanBodyMass;
194+
SEScalarMass* m_MuscleMass;
190195

191196
SEScalarArea* m_AlveoliSurfaceArea;
192197
SEScalarFraction* m_RightLungRatio;

0 commit comments

Comments
 (0)