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

Commit

Permalink
source additions for new 6.3 release/support
Browse files Browse the repository at this point in the history
  • Loading branch information
ajbaird committed Mar 7, 2018
1 parent e9e8e0f commit e5e3c11
Show file tree
Hide file tree
Showing 156 changed files with 15,054 additions and 1,271 deletions.
2 changes: 1 addition & 1 deletion src/build.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
biogears.version=BioGears_6.1.1-beta
biogears.version=BioGears_6.3.0-beta
biogears.home=${basedir}/..
biogears.bin=${biogears.home}/bin
biogears.config=release
Expand Down
15 changes: 14 additions & 1 deletion src/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,13 @@
<ant antfile="build.xml" dir="${biogears.cdm}" target="jar" />
<ant antfile="build.xml" dir="${biogears.engine}" target="compile" />
<ant antfile="build.xml" dir="${biogears.engine}" target="jar" />
<ant antfile="build.xml" dir="${biogears.gui}" target="compile" />
<ant antfile="build.xml" dir="${biogears.gui}" target="jar" />
<!-- Create a jar with all dependencies -->
<delete file="../bin/BioGears.jar"/>
<!-- Create the Jar-->
<jar destfile="../bin/BioGears.jar" excludes="**/Sun_micr.rsa **/Sun_micr.sf">
<zipfileset src="${biogears.bin}/BioGearsGUI.jar" includes="**/*.java **/*.class"/>
<zipfileset src="${biogears.bin}/BioGearsEngine.jar" includes="**/*.java **/*.class"/>
<zipfileset src="${biogears.bin}/CommonDataModel.jar" includes="**/*.java **/*.class"/>
<zipfileset src="${biogears.bin}/DataModelBindings.jar" includes="**/*.java **/*.class"/>
Expand Down Expand Up @@ -626,6 +629,16 @@
<target name="buildSDK-windows" depends="copyToSDK-windows" if="deployWindows">
<!-- Make sure howto files compile -->
<ant antfile="build.xml" dir="${biogears.SDK}" target="all" />
<!-- Zip it! -->
<delete file="${biogears.deploy}/${biogears.version}-sdk-windows.zip"/>
<zip destfile="${biogears.deploy}/${biogears.version}-sdk-windows.zip">
<zipfileset dir="${biogears.home}" prefix="${biogears.version}">
<include name="LICENSE"/>
<include name="NOTICE"/>
</zipfileset>
<zipfileset dir="${biogears.SDK}" excludes="howto/build/**, /cmake/msvs*/**" prefix="${biogears.version}"/>
<zipfileset dir="${biogears.doxy}" includes="html/**, Mainpage.html, ReadMe.txt" prefix="${biogears.version}/docs/"/>
</zip>
</target>
<target name="copyToSDK-windows" if="deployWindows">
<!-- Clean out the sdk folder of any previous deployment -->
Expand Down Expand Up @@ -959,7 +972,7 @@
</java>
</target>

<!-- Example for pulling from the build machine : ant rebaseDebug -DrebaseFrom="\\sed-biogears\JenkinsBuild\History\MSVC-x86\374 - b5541f5b6212d8288f1ff35da996110f871292c9\Scenarios" -->
<!-- Example for pulling from the build machine : ant rebaseDebug -DrebaseFrom="\\sed-biogears\JenkinsBuild\History\MSVC-x86\387 - aa894de288d5147620c4e0d275fe64d8bd0f1d5f\Scenarios" -->
<target name="rebaseDebug">
<java classname="mil.tatrc.physiology.utilities.testing.Rebase" dir="${biogears.bin}" fork="true" failonerror="false">
<arg value="${rebaseFrom}" unless:blank="${rebaseFrom}"/><!-- From -->
Expand Down
25 changes: 25 additions & 0 deletions src/cdm/cpp/compartment/tissue/SETissueCompartment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ SETissueCompartment::SETissueCompartment(const std::string& name, Logger* logger
{
m_AcidicPhospohlipidConcentration = nullptr;
m_MatrixVolume = nullptr;
m_MembranePotential = nullptr;
m_NeutralLipidsVolumeFraction = nullptr;
m_NeutralPhospholipidsVolumeFraction = nullptr;
m_TissueToPlasmaAlbuminRatio = nullptr;
Expand All @@ -45,6 +46,7 @@ void SETissueCompartment::Clear()
SECompartment::Clear();
SAFE_DELETE(m_AcidicPhospohlipidConcentration);
SAFE_DELETE(m_MatrixVolume);
SAFE_DELETE(m_MembranePotential);
SAFE_DELETE(m_NeutralLipidsVolumeFraction);
SAFE_DELETE(m_NeutralPhospholipidsVolumeFraction);
SAFE_DELETE(m_TissueToPlasmaAlbuminRatio);
Expand All @@ -61,6 +63,8 @@ bool SETissueCompartment::Load(const CDM::TissueCompartmentData& in, SESubstance
GetAcidicPhospohlipidConcentration().Load(in.AcidicPhospohlipidConcentration().get());
if (in.MatrixVolume().present())
GetMatrixVolume().Load(in.MatrixVolume().get());
if (in.MembranePotential().present())
GetMembranePotential().Load(in.MembranePotential().get());
if (in.NeutralLipidsVolumeFraction().present())
GetNeutralLipidsVolumeFraction().Load(in.NeutralLipidsVolumeFraction().get());
if (in.NeutralPhospholipidsVolumeFraction().present())
Expand Down Expand Up @@ -89,6 +93,8 @@ void SETissueCompartment::Unload(CDM::TissueCompartmentData& data)
data.AcidicPhospohlipidConcentration(std::unique_ptr<CDM::ScalarMassPerMassData>(m_AcidicPhospohlipidConcentration->Unload()));
if (HasMatrixVolume())
data.MatrixVolume(std::unique_ptr<CDM::ScalarVolumeData>(m_MatrixVolume->Unload()));
if (HasMembranePotential())
data.MembranePotential(std::unique_ptr<CDM::ScalarElectricPotentialData>(m_MembranePotential->Unload()));
if (HasNeutralLipidsVolumeFraction())
data.NeutralLipidsVolumeFraction(std::unique_ptr<CDM::ScalarFractionData>(m_NeutralLipidsVolumeFraction->Unload()));
if (HasNeutralPhospholipidsVolumeFraction())
Expand All @@ -111,6 +117,8 @@ const SEScalar* SETissueCompartment::GetScalar(const std::string& name)
return &GetAcidicPhospohlipidConcentration();
if (name.compare("MatrixVolume") == 0)
return &GetMatrixVolume();
if (name.compare("MembranePotential") == 0)
return &GetMembranePotential();
if (name.compare("NeutralLipidsVolumeFraction") == 0)
return &GetNeutralLipidsVolumeFraction();
if (name.compare("NeutralPhospholipidsVolumeFraction") == 0)
Expand Down Expand Up @@ -165,6 +173,23 @@ double SETissueCompartment::GetMatrixVolume(const VolumeUnit& unit) const
return m_MatrixVolume->GetValue(unit);
}

bool SETissueCompartment::HasMembranePotential() const
{
return m_MembranePotential == nullptr ? false : m_MembranePotential->IsValid();
}
SEScalarElectricPotential& SETissueCompartment::GetMembranePotential()
{
if (m_MembranePotential == nullptr)
m_MembranePotential = new SEScalarElectricPotential();
return *m_MembranePotential;
}
double SETissueCompartment::GetMembranePotential(const ElectricPotentialUnit& unit) const
{
if (m_MembranePotential == nullptr)
return SEScalar::dNaN();
return m_MembranePotential->GetValue(unit);
}

bool SETissueCompartment::HasNeutralLipidsVolumeFraction() const
{
return m_NeutralLipidsVolumeFraction == nullptr ? false : m_NeutralLipidsVolumeFraction->IsValid();
Expand Down
5 changes: 5 additions & 0 deletions src/cdm/cpp/compartment/tissue/SETissueCompartment.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ class DLL_DECL SETissueCompartment : public SECompartment
virtual SEScalarVolume& GetMatrixVolume();
virtual double GetMatrixVolume(const VolumeUnit& unit) const;

virtual bool HasMembranePotential() const;
virtual SEScalarElectricPotential& GetMembranePotential();
virtual double GetMembranePotential(const ElectricPotentialUnit& unit) const;

virtual bool HasNeutralLipidsVolumeFraction() const;
virtual SEScalarFraction& GetNeutralLipidsVolumeFraction();
virtual double GetNeutralLipidsVolumeFraction() const;
Expand Down Expand Up @@ -76,6 +80,7 @@ class DLL_DECL SETissueCompartment : public SECompartment

SEScalarMassPerMass* m_AcidicPhospohlipidConcentration;
SEScalarVolume* m_MatrixVolume;
SEScalarElectricPotential* m_MembranePotential;
SEScalarFraction* m_NeutralLipidsVolumeFraction;
SEScalarFraction* m_NeutralPhospholipidsVolumeFraction;
SEScalar* m_TissueToPlasmaAlbuminRatio;
Expand Down
8 changes: 6 additions & 2 deletions src/cdm/cpp/engine/PhysiologyEngineTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ specific language governing permissions and limitations under the License.
#include "system/physiology/SERenalSystem.h"
#include "system/physiology/SERespiratorySystem.h"
#include "system/physiology/SETissueSystem.h"
#include "system/physiology/SEHepaticSystem.h"
#include "system/equipment/Anesthesia/SEAnesthesiaMachine.h"
#include "system/equipment/ElectroCardioGram/SEElectroCardioGram.h"
#include "system/equipment/Inhaler/SEInhaler.h"
Expand Down Expand Up @@ -102,6 +103,9 @@ PhysiologyEngineTrack::PhysiologyEngineTrack(PhysiologyEngine& engine) : Loggabl
SENervousSystem* nervous = (SENervousSystem*)engine.GetNervousSystem();
if (nervous != nullptr)
m_PhysiologySystems.push_back(nervous);
SEHepaticSystem* hepatic = (SEHepaticSystem*)engine.GetHepaticSystem();
if (hepatic != nullptr)
m_PhysiologySystems.push_back(hepatic);

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

Expand Down Expand Up @@ -155,7 +159,7 @@ void PhysiologyEngineTrack::SetupRequests()
{
bool isOpen = m_ResultsStream.is_open();
if (!isOpen || m_ForceConnection)
{// Process/Hook up all requests with their associated scalers
{// Process/Hook up all requests with their associated scalars
for (SEDataRequest* dr : m_DataRequestMgr.GetDataRequests())
{
if (!TrackRequest(*dr))
Expand Down Expand Up @@ -190,7 +194,7 @@ void PhysiologyEngineTrack::PullData()
if (ds == nullptr)
{
Error("You cannot modify CSV Results file data requests in the middle of a run.");
Error("Ignorning data request " + dr->GetName());
Error("Ignoring data request " + dr->GetName());
continue;
}
if (!ds->HasScalar())
Expand Down
34 changes: 31 additions & 3 deletions src/cdm/cpp/patient/SEPatient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ SEPatient::SEPatient(Logger* logger) : Loggable(logger)
m_InspiratoryCapacity = nullptr;
m_InspiratoryReserveVolume = nullptr;
m_LeanBodyMass = nullptr;
m_MuscleMass = nullptr;
m_MeanArterialPressureBaseline = nullptr;
m_ResidualVolume = nullptr;
m_RespirationRateBaseline = nullptr;
Expand Down Expand Up @@ -128,6 +129,7 @@ void SEPatient::Clear()
SAFE_DELETE(m_InspiratoryCapacity);
SAFE_DELETE(m_InspiratoryReserveVolume);
SAFE_DELETE(m_LeanBodyMass);
SAFE_DELETE(m_MuscleMass);
SAFE_DELETE(m_MeanArterialPressureBaseline);
SAFE_DELETE(m_ResidualVolume);
SAFE_DELETE(m_RespirationRateBaseline);
Expand Down Expand Up @@ -176,6 +178,8 @@ const SEScalar* SEPatient::GetScalar(const std::string& name)
return &GetInspiratoryReserveVolume();
if (name.compare("LeanBodyMass") == 0)
return &GetLeanBodyMass();
if (name.compare("MuscleMass") == 0)
return &GetMuscleMass();
if (name.compare("MeanArterialPressureBaseline") == 0)
return &GetMeanArterialPressureBaseline();
if (name.compare("ResidualVolume") == 0)
Expand Down Expand Up @@ -240,6 +244,8 @@ bool SEPatient::Load(const CDM::PatientData& in)
GetInspiratoryReserveVolume().Load(in.InspiratoryReserveVolume().get());
if (in.LeanBodyMass().present())
GetLeanBodyMass().Load(in.LeanBodyMass().get());
if (in.MuscleMass().present())
GetMuscleMass().Load(in.MuscleMass().get());
if(in.MeanArterialPressureBaseline().present())
GetMeanArterialPressureBaseline().Load(in.MeanArterialPressureBaseline().get());
if (in.ResidualVolume().present())
Expand Down Expand Up @@ -318,6 +324,8 @@ void SEPatient::Unload(CDM::PatientData& data) const
data.InspiratoryReserveVolume(std::unique_ptr<CDM::ScalarVolumeData>(m_InspiratoryReserveVolume->Unload()));
if (m_LeanBodyMass != nullptr)
data.LeanBodyMass(std::unique_ptr<CDM::ScalarMassData>(m_LeanBodyMass->Unload()));
if (m_MuscleMass != nullptr)
data.MuscleMass(std::unique_ptr<CDM::ScalarMassData>(m_MuscleMass->Unload()));
if(m_MeanArterialPressureBaseline!=nullptr)
data.MeanArterialPressureBaseline(std::unique_ptr<CDM::ScalarPressureData>(m_MeanArterialPressureBaseline->Unload()));
if (m_ResidualVolume != nullptr)
Expand Down Expand Up @@ -468,6 +476,9 @@ void SEPatient::SetEvent(CDM::enumPatientEvent::value type, bool active, const S
case CDM::enumPatientEvent::ModerateAcuteRespiratoryDistress:
m_ss << " The patient has Moderate Acute Respiratory Distress";
break;
case CDM::enumPatientEvent::MuscleCatabolism:
m_ss << " Patient has begun muscle catabolism";
break;
case CDM::enumPatientEvent::MuscleGlycogenDepleted:
m_ss << " Patient's muscle glycogen is depleted";
break;
Expand Down Expand Up @@ -496,7 +507,7 @@ void SEPatient::SetEvent(CDM::enumPatientEvent::value type, bool active, const S
m_ss << " Patient has Tachypnea";
break;
case CDM::enumPatientEvent::Fatigue:
m_ss << "Patient has fatigue";
m_ss << " Patient has fatigue";
break;
case CDM::enumPatientEvent::StartOfCardiacCycle:
case CDM::enumPatientEvent::StartOfExhale:
Expand Down Expand Up @@ -542,7 +553,7 @@ void SEPatient::SetEvent(CDM::enumPatientEvent::value type, bool active, const S
m_ss << " Patient no longer has Diuresis";
break;
case CDM::enumPatientEvent::Fasciculation:
m_ss << "Patient no longer has fasciculations";
m_ss << "Patient no longer has Fasciculation";
break;
case CDM::enumPatientEvent::FunctionalIncontinence:
m_ss << " Patient has an empty bladder";
Expand Down Expand Up @@ -635,7 +646,7 @@ void SEPatient::SetEvent(CDM::enumPatientEvent::value type, bool active, const S
m_ss << " Patient no longer has Tachypnea";
break;
case CDM::enumPatientEvent::Fatigue:
m_ss << "Patient is no longer fatigued";
m_ss << " Patient is no longer fatigued";
break;
case CDM::enumPatientEvent::StartOfCardiacCycle:
case CDM::enumPatientEvent::StartOfExhale:
Expand Down Expand Up @@ -1005,6 +1016,23 @@ double SEPatient::GetLeanBodyMass(const MassUnit& unit) const
return m_LeanBodyMass->GetValue(unit);
}

bool SEPatient::HasMuscleMass() const
{
return m_MuscleMass == nullptr ? false : m_MuscleMass->IsValid();
}
SEScalarMass& SEPatient::GetMuscleMass()
{
if (m_MuscleMass == nullptr)
m_MuscleMass = new SEScalarMass();
return *m_MuscleMass;
}
double SEPatient::GetMuscleMass(const MassUnit& unit) const
{
if (m_MuscleMass == nullptr)
return SEScalar::dNaN();
return m_MuscleMass->GetValue(unit);
}

bool SEPatient::HasMeanArterialPressureBaseline() const
{
return m_MeanArterialPressureBaseline==nullptr?false:m_MeanArterialPressureBaseline->IsValid();
Expand Down
5 changes: 5 additions & 0 deletions src/cdm/cpp/patient/SEPatient.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ class DLL_DECL SEPatient : public Loggable
virtual SEScalarMass& GetLeanBodyMass();
virtual double GetLeanBodyMass(const MassUnit& unit) const;

virtual bool HasMuscleMass() const;
virtual SEScalarMass& GetMuscleMass();
virtual double GetMuscleMass(const MassUnit& unit) const;

virtual bool HasMeanArterialPressureBaseline() const;
virtual SEScalarPressure& GetMeanArterialPressureBaseline();
virtual double GetMeanArterialPressureBaseline(const PressureUnit& unit) const;
Expand Down Expand Up @@ -187,6 +191,7 @@ class DLL_DECL SEPatient : public Loggable
SEScalarMassPerVolume* m_BodyDensity;
SEScalarFraction* m_BodyFatFraction;
SEScalarMass* m_LeanBodyMass;
SEScalarMass* m_MuscleMass;

SEScalarArea* m_AlveoliSurfaceArea;
SEScalarFraction* m_RightLungRatio;
Expand Down
Loading

0 comments on commit e5e3c11

Please sign in to comment.