Commit edb2cea2 authored by Aaron Bray's avatar Aaron Bray
Browse files

Finalize new mechanical ventilator updates

- Update Python/C#
- Finish serialization
parent 35d5e2ec
......@@ -111,6 +111,14 @@ public:
//--------------------------------------------------------------------------------------------------
virtual bool InitializeEngine(const SEPatientConfiguration& patient_configuration) = 0;
//--------------------------------------------------------------------------------------------------
/// \brief
/// Get the Condition Manager.
/// Allows a user to check the state of active conditions
///
//--------------------------------------------------------------------------------------------------
virtual const SEConditionManager& GetConditionManager() const = 0;
//--------------------------------------------------------------------------------------------------
/// \brief
/// Engines can have a configuration for allowing a user to set certain internal parameters
......@@ -123,11 +131,9 @@ public:
//--------------------------------------------------------------------------------------------------
/// \brief
/// Get the Condition Manager.
/// Allows a user to check the state of active conditions
///
/// returns the engine configuration.
//--------------------------------------------------------------------------------------------------
virtual const SEConditionManager& GetConditionManager() const = 0;
virtual const SEEngineConfiguration* GetConfiguration() const = 0;
//--------------------------------------------------------------------------------------------------
/// \brief
......@@ -142,13 +148,7 @@ public:
/// and provide access to the data easily (ex. to easily write data to csv files)
//--------------------------------------------------------------------------------------------------
virtual SEEngineTracker* GetEngineTracker() const = 0;
//--------------------------------------------------------------------------------------------------
/// \brief
/// returns the engine configuration.
//--------------------------------------------------------------------------------------------------
virtual const SEEngineConfiguration* GetConfiguration() const = 0;
//--------------------------------------------------------------------------------------------------
/// \brief
/// returns the engine time step that is used when advancing time.
......
......@@ -6,8 +6,14 @@ PUSH_PROTO_WARNINGS()
#include "pulse/cdm/bind/Physiology.pb.h"
POP_PROTO_WARNINGS()
#include "system/physiology/SECardiovascularSystem.h"
#include "system/physiology/SERespiratorySystem.h"
const std::string& eHeartRhythm_Name(eHeartRhythm m)
{
return CDM_BIND::eHeartRhythm_Name((CDM_BIND::eHeartRhythm)m);
}
const std::string& eBreathState_Name(eBreathState m)
{
return CDM_BIND::eBreathState_Name((CDM_BIND::eBreathState)m);
}
\ No newline at end of file
......@@ -4,6 +4,9 @@
#pragma once
#include "system/SESystem.h"
// Keep enums in sync with appropriate schema/cdm/PhysiologyEnums.proto file !!
enum class eBreathState { Inhale = 0, Pause, Exhale };
extern const std::string& eBreathState_Name(eBreathState m);
class CDM_DECL SERespiratorySystem : public SESystem
{
......
......@@ -66,7 +66,7 @@ void MechanicalVentilator::Initialize()
{
PulseSystem::Initialize();
SetConnection(eMechanicalVentilator_Connection::NullConnection);
m_CurrentBreathMode = eBreathPeriod::exhale;
m_CurrentBreathState = eBreathState::Exhale;
m_CurrentPeriodTime_s = 0.0;
m_DriverPressure_cmH2O = SEScalar::dNaN();
m_DriverFlow_L_Per_s = SEScalar::dNaN();
......@@ -109,7 +109,7 @@ void MechanicalVentilator::StateChange()
return;
}
m_CurrentBreathMode = eBreathPeriod::exhale;
m_CurrentBreathState = eBreathState::Exhale;
m_CurrentPeriodTime_s = 0.0;
m_CurrentInspiratoryVolume_L = 0.0;
......@@ -305,7 +305,7 @@ void MechanicalVentilator::PreProcess()
//Do nothing if the ventilator is off and not initialized
if (GetConnection() == eMechanicalVentilator_Connection::Off)
{
m_CurrentBreathMode = eBreathPeriod::exhale;
m_CurrentBreathState = eBreathState::Exhale;
m_CurrentPeriodTime_s = 0.0;
m_CurrentInspiratoryVolume_L = 0.0;
return;
......@@ -397,7 +397,7 @@ void MechanicalVentilator::SetVentilatorDriver()
//--------------------------------------------------------------------------------------------------
void MechanicalVentilator::CalculateInspiration()
{
if (m_CurrentBreathMode != eBreathPeriod::inhale)
if (m_CurrentBreathState != eBreathState::Inhale)
{
m_CurrentInspiratoryVolume_L = 0.0;
return;
......@@ -478,7 +478,7 @@ void MechanicalVentilator::CalculateInspiration()
//--------------------------------------------------------------------------------------------------
void MechanicalVentilator::CalculatePause()
{
if (m_CurrentBreathMode != eBreathPeriod::pause)
if (m_CurrentBreathState != eBreathState::Pause)
{
return;
}
......@@ -508,7 +508,7 @@ void MechanicalVentilator::CalculatePause()
//--------------------------------------------------------------------------------------------------
void MechanicalVentilator::CalculateExpiration()
{
if (m_CurrentBreathMode != eBreathPeriod::exhale)
if (m_CurrentBreathState != eBreathState::Exhale)
{
return;
}
......@@ -592,17 +592,17 @@ void MechanicalVentilator::CycleMode()
{
m_CurrentPeriodTime_s = 0.0;
if (m_CurrentBreathMode == eBreathPeriod::inhale)
if (m_CurrentBreathState == eBreathState::Inhale)
{
m_CurrentBreathMode = eBreathPeriod::pause;
m_CurrentBreathState = eBreathState::Pause;
}
else if (m_CurrentBreathMode == eBreathPeriod::pause)
else if (m_CurrentBreathState == eBreathState::Pause)
{
m_CurrentBreathMode = eBreathPeriod::exhale;
m_CurrentBreathState = eBreathState::Exhale;
}
else if (m_CurrentBreathMode == eBreathPeriod::exhale)
else if (m_CurrentBreathState == eBreathState::Exhale)
{
m_CurrentBreathMode = eBreathPeriod::inhale;
m_CurrentBreathState = eBreathState::Inhale;
}
}
......
......@@ -3,6 +3,7 @@
#pragma once
#include "PulsePhysiologySystems.h"
#include "system/physiology/SERespiratorySystem.h"
#include "system/equipment/mechanical_ventilator/SEMechanicalVentilator.h"
class SEEquipmentActionCollection;
class SEGasCompartment;
......@@ -42,7 +43,6 @@ public:
void PostProcess(bool solve_and_transport=true);
protected:
enum eBreathPeriod {inhale, pause, exhale};
void ComputeExposedModelParameters() override;
......@@ -58,12 +58,11 @@ protected:
void SetResistances();
// Serializable member variables (Set in Initialize and in schema)
//Aaron - I assume JAVA and C# interfaces still need to be updated
double m_CurrentPeriodTime_s;
double m_DriverPressure_cmH2O;
double m_DriverFlow_L_Per_s;
double m_CurrentInspiratoryVolume_L;
eBreathPeriod m_CurrentBreathMode; //Aaron - serialize
eBreathState m_CurrentBreathState;
// Stateless member variable (Set in SetUp())
double m_dt_s;
......
......@@ -108,10 +108,11 @@ void PBPulseEquipment::Load(const PULSE_BIND::MechanicalVentilatorData& src, Mec
void PBPulseEquipment::Serialize(const PULSE_BIND::MechanicalVentilatorData& src, MechanicalVentilator& dst)
{
PBMechanicalVentilator::Serialize(src.common(), dst, (SESubstanceManager&)dst.m_data.GetSubstances());
dst.m_CurrentBreathState = (eBreathState)src.currentbreathstate();
dst.m_CurrentInspiratoryVolume_L = src.currentinspiratoryvolume_l();
dst.m_CurrentPeriodTime_s = src.currentperiodtime_s();
dst.m_DriverPressure_cmH2O = src.driverpressure_cmh2o();
dst.m_DriverFlow_L_Per_s = src.driverflow_l_per_s();
dst.m_CurrentInspiratoryVolume_L = src.currentinspiratoryvolume_l();
dst.m_DriverPressure_cmH2O = src.driverpressure_cmh2o();
}
PULSE_BIND::MechanicalVentilatorData* PBPulseEquipment::Unload(const MechanicalVentilator& src)
{
......@@ -122,8 +123,9 @@ PULSE_BIND::MechanicalVentilatorData* PBPulseEquipment::Unload(const MechanicalV
void PBPulseEquipment::Serialize(const MechanicalVentilator& src, PULSE_BIND::MechanicalVentilatorData& dst)
{
PBMechanicalVentilator::Serialize(src, *dst.mutable_common());
dst.set_currentbreathstate((CDM_BIND::eBreathState)src.m_CurrentBreathState);
dst.set_currentinspiratoryvolume_l(src.m_CurrentInspiratoryVolume_L);
dst.set_currentperiodtime_s(src.m_CurrentPeriodTime_s);
dst.set_driverpressure_cmh2o(src.m_DriverPressure_cmH2O);
dst.set_driverflow_l_per_s(src.m_DriverFlow_L_Per_s);
dst.set_currentinspiratoryvolume_l(src.m_CurrentInspiratoryVolume_L);
dst.set_driverpressure_cmh2o(src.m_DriverPressure_cmH2O);
}
......@@ -64,7 +64,7 @@ namespace HowTo_MechanicalVentilator
double totalPeriod_s = 60.0 / respirationRate_per_min;
double inspiratoryPeriod_s = IERatio * totalPeriod_s / (1 + IERatio);
double expiratoryPeriod_s = totalPeriod_s - inspiratoryPeriod_s;
mv.GetInspirationTriggerTime().SetValue(expiratoryPeriod_s, TimeUnit.s);
mv.GetInspirationMachineTriggerTime().SetValue(expiratoryPeriod_s, TimeUnit.s);
mv.GetExpirationCycleTime().SetValue(inspiratoryPeriod_s, TimeUnit.s);
pulse.ProcessAction(mv_config);
......
......@@ -25,45 +25,50 @@ namespace Pulse.CDM
dst.SetConnection((SEMechanicalVentilator.Connection)src.Connection);
if (src.EndotrachealTubeResistance != null)
PBProperty.Load(src.EndotrachealTubeResistance, dst.GetEndotrachealTubeResistance());
if (src.PositiveEndExpiredPressure != null)
PBProperty.Load(src.PositiveEndExpiredPressure, dst.GetPositiveEndExpiredPressure());
if (src.FunctionalResidualCapacity != null)
else if (src.FunctionalResidualCapacity != null)
PBProperty.Load(src.FunctionalResidualCapacity, dst.GetFunctionalResidualCapacity());
if (src.ExpirationCycleFlow != null)
PBProperty.Load(src.ExpirationCycleFlow, dst.GetExpirationCycleFlow());
if (src.ExpirationCyclePressure != null)
else if (src.ExpirationCyclePressure != null)
PBProperty.Load(src.ExpirationCyclePressure, dst.GetExpirationCyclePressure());
if (src.ExpirationCycleTime != null)
else if (src.ExpirationCycleTime != null)
PBProperty.Load(src.ExpirationCycleTime, dst.GetExpirationCycleTime());
else if (src.ExpirationCycleVolume != null)
PBProperty.Load(src.ExpirationCycleVolume, dst.GetExpirationCycleVolume());
if (src.ExpirationTubeResistance != null)
PBProperty.Load(src.ExpirationTubeResistance, dst.GetExpirationTubeResistance());
if (src.ExpirationValveResistance != null)
PBProperty.Load(src.ExpirationValveResistance, dst.GetExpirationValveResistance());
dst.SetExpirationWaveform((SEMechanicalVentilator.DriverWaveform)src.ExpirationWaveform);
if (src.InspirationLimitFlow != null)
PBProperty.Load(src.InspirationLimitFlow, dst.GetInspirationLimitFlow());
if (src.InspirationLimitPressure != null)
PBProperty.Load(src.InspirationLimitPressure, dst.GetInspirationLimitPressure());
if (src.InspirationLimitPressure != null)
else if (src.InspirationLimitPressure != null)
PBProperty.Load(src.InspirationLimitPressure, dst.GetInspirationLimitPressure());
if (src.InspirationLimitVolume != null)
PBProperty.Load(src.InspirationLimitVolume, dst.GetInspirationLimitVolume());
if (src.InspirationLimitVolume != null)
else if (src.InspirationLimitVolume != null)
PBProperty.Load(src.InspirationLimitVolume, dst.GetInspirationLimitVolume());
if (src.InspirationPauseTime != null)
PBProperty.Load(src.InspirationPauseTime, dst.GetInspirationPauseTime());
if (src.PeakInspiratoryPressure != null)
PBProperty.Load(src.PeakInspiratoryPressure, dst.GetPeakInspiratoryPressure());
if (src.PeakInspiratoryPressure != null)
PBProperty.Load(src.PeakInspiratoryPressure, dst.GetPeakInspiratoryPressure());
if (src.PeakInspiratoryPressure != null)
PBProperty.Load(src.PeakInspiratoryPressure, dst.GetPeakInspiratoryPressure());
if (src.InspirationTriggerPressure != null)
PBProperty.Load(src.InspirationTriggerPressure, dst.GetInspirationTriggerPressure());
if (src.InspirationTriggerTime != null)
PBProperty.Load(src.InspirationTriggerTime, dst.GetInspirationTriggerTime());
else if (src.InspirationTargetFlow != null)
PBProperty.Load(src.InspirationTargetFlow, dst.GetInspirationTargetFlow());
if (src.InspirationMachineTriggerTime != null)
PBProperty.Load(src.InspirationMachineTriggerTime, dst.GetInspirationMachineTriggerTime());
if (src.InspirationPatientTriggerFlow != null)
PBProperty.Load(src.InspirationPatientTriggerFlow, dst.GetInspirationPatientTriggerFlow());
else if (src.InspirationPatientTriggerPressure != null)
PBProperty.Load(src.InspirationPatientTriggerPressure, dst.GetInspirationPatientTriggerPressure());
if (src.InspirationTubeResistance != null)
PBProperty.Load(src.InspirationTubeResistance, dst.GetInspirationTubeResistance());
if (src.InspirationValveResistance != null)
......@@ -92,16 +97,21 @@ namespace Pulse.CDM
dst.Connection = (pulse.cdm.bind.MechanicalVentilatorData.Types.eConnection)(int)src.GetConnection();
if (src.HasEndotrachealTubeResistance())
dst.EndotrachealTubeResistance = PBProperty.Unload(src.GetEndotrachealTubeResistance());
if (src.HasPositiveEndExpiredPressure())
dst.PositiveEndExpiredPressure = PBProperty.Unload(src.GetPositiveEndExpiredPressure());
if (src.HasFunctionalResidualCapacity())
else if (src.HasFunctionalResidualCapacity())
dst.FunctionalResidualCapacity = PBProperty.Unload(src.GetFunctionalResidualCapacity());
if (src.HasExpirationCycleFlow())
dst.ExpirationCycleFlow = PBProperty.Unload(src.GetExpirationCycleFlow());
if (src.HasExpirationCyclePressure())
else if (src.HasExpirationCyclePressure())
dst.ExpirationCyclePressure = PBProperty.Unload(src.GetExpirationCyclePressure());
if (src.HasExpirationCycleTime())
else if (src.HasExpirationCycleTime())
dst.ExpirationCycleTime = PBProperty.Unload(src.GetExpirationCycleTime());
else if (src.HasExpirationCycleVolume())
dst.ExpirationCycleVolume = PBProperty.Unload(src.GetExpirationCycleVolume());
if (src.HasExpirationTubeResistance())
dst.ExpirationTubeResistance = PBProperty.Unload(src.GetExpirationTubeResistance());
if (src.HasExpirationValveResistance())
......@@ -110,22 +120,27 @@ namespace Pulse.CDM
if (src.HasInspirationLimitFlow())
dst.InspirationLimitFlow = PBProperty.Unload(src.GetInspirationLimitFlow());
if (src.HasInspirationLimitPressure())
else if (src.HasInspirationLimitPressure())
dst.InspirationLimitPressure = PBProperty.Unload(src.GetInspirationLimitPressure());
if (src.HasInspirationLimitVolume())
else if (src.HasInspirationLimitVolume())
dst.InspirationLimitVolume = PBProperty.Unload(src.GetInspirationLimitVolume());
if (src.HasInspirationPauseTime())
dst.InspirationPauseTime = PBProperty.Unload(src.GetInspirationPauseTime());
if (src.HasPeakInspiratoryPressure())
dst.PeakInspiratoryPressure = PBProperty.Unload(src.GetPeakInspiratoryPressure());
if (src.HasEndTidalCarbonDioxidePressure())
dst.EndTidalCarbonDioxidePressure = PBProperty.Unload(src.GetEndTidalCarbonDioxidePressure());
if (src.HasInspirationTriggerFlow())
dst.InspirationTriggerFlow = PBProperty.Unload(src.GetInspirationTriggerFlow());
if (src.HasInspirationTriggerPressure())
dst.InspirationTriggerPressure = PBProperty.Unload(src.GetInspirationTriggerPressure());
if (src.HasInspirationTriggerTime())
dst.InspirationTriggerTime = PBProperty.Unload(src.GetInspirationTriggerTime());
else if (src.HasInspirationTargetFlow())
dst.InspirationTargetFlow = PBProperty.Unload(src.GetInspirationTargetFlow());
if (src.HasInspirationMachineTriggerTime())
dst.InspirationMachineTriggerTime = PBProperty.Unload(src.GetInspirationMachineTriggerTime());
if (src.HasInspirationPatientTriggerFlow())
dst.InspirationPatientTriggerFlow = PBProperty.Unload(src.GetInspirationPatientTriggerFlow());
else if (src.HasInspirationPatientTriggerPressure())
dst.InspirationPatientTriggerPressure = PBProperty.Unload(src.GetInspirationPatientTriggerPressure());
if (src.HasInspirationTubeResistance())
dst.InspirationTubeResistance = PBProperty.Unload(src.GetInspirationTubeResistance());
if (src.HasInspirationValveResistance())
......
......@@ -25,23 +25,39 @@ namespace Pulse.CDM
protected Connection connection;
protected SEScalarPressureTimePerVolume endotracheal_tube_resistance;
// Expiratory Baseline (Only set one)
protected SEScalarPressure positive_end_expired_pressure;
protected SEScalarPressure functional_residual_capacity;
// Expiration Cyclye (Only set one)
protected SEScalarVolumePerTime expiration_cycle_flow;
protected SEScalarPressure expiration_cycle_pressure;
protected SEScalarVolume expiration_cycle_volume;
protected SEScalarTime expiration_cycle_time;
protected SEScalarPressureTimePerVolume expiration_tube_resistance;
protected SEScalarPressureTimePerVolume expiration_valve_resistance;
protected DriverWaveform expiration_waveform;
// Inspiration Limit (Only set one)
protected SEScalarVolumePerTime inspiration_limit_flow;
protected SEScalarPressure inspiration_limit_pressure;
protected SEScalarVolume inspiration_limit_volume;
protected SEScalarTime inspiration_pause_time;
// Inspiratory Target (Only set one)
protected SEScalarPressure peak_inpiratory_pressure;
protected SEScalarPressure end_tidal_carbon_dioxide_pressure;
protected SEScalarVolumePerTime inspiration_trigger_flow;
protected SEScalarPressure inspiration_trigger_pressure;
protected SEScalarTime inspiration_trigger_time;
protected SEScalarVolumePerTime inspiration_target_flow;
// Inspiration Machine Trigger (Only set one)
protected SEScalarTime inspiration_machine_trigger_time;
// Inspiration Patient Trigger (Only set one)
protected SEScalarVolumePerTime inspiration_patient_trigger_flow;
protected SEScalarPressure inspiration_patient_trigger_pressure;
protected SEScalarPressureTimePerVolume inspiration_tube_resistance;
protected SEScalarPressureTimePerVolume inspiration_valve_resistance;
protected DriverWaveform inspiration_waveform;
......@@ -58,6 +74,7 @@ namespace Pulse.CDM
expiration_cycle_flow = null;
expiration_cycle_pressure = null;
expiration_cycle_time = null;
expiration_cycle_volume = null;
expiration_tube_resistance = null;
expiration_valve_resistance = null;
expiration_waveform = DriverWaveform.NullDriverWaveform;
......@@ -68,10 +85,10 @@ namespace Pulse.CDM
inspiration_limit_volume = null;
inspiration_pause_time = null;
peak_inpiratory_pressure = null;
end_tidal_carbon_dioxide_pressure = null;
inspiration_trigger_flow = null;
inspiration_trigger_pressure = null;
inspiration_trigger_time = null;
inspiration_target_flow = null;
inspiration_machine_trigger_time = null;
inspiration_patient_trigger_flow = null;
inspiration_patient_trigger_pressure = null;
inspiration_tube_resistance = null;
inspiration_valve_resistance = null;
inspiration_waveform = DriverWaveform.NullDriverWaveform;
......@@ -96,6 +113,8 @@ namespace Pulse.CDM
expiration_cycle_pressure.Invalidate();
if (expiration_cycle_time != null)
expiration_cycle_time.Invalidate();
if (expiration_cycle_volume != null)
expiration_cycle_volume.Invalidate();
if (expiration_tube_resistance != null)
expiration_tube_resistance.Invalidate();
if (expiration_valve_resistance != null)
......@@ -113,14 +132,14 @@ namespace Pulse.CDM
inspiration_pause_time.Invalidate();
if (peak_inpiratory_pressure != null)
peak_inpiratory_pressure.Invalidate();
if (end_tidal_carbon_dioxide_pressure != null)
end_tidal_carbon_dioxide_pressure.Invalidate();
if (inspiration_trigger_flow != null)
inspiration_trigger_flow.Invalidate();
if (inspiration_trigger_pressure != null)
inspiration_trigger_pressure.Invalidate();
if (inspiration_trigger_time != null)
inspiration_trigger_time.Invalidate();
if (inspiration_target_flow != null)
inspiration_target_flow.Invalidate();
if (inspiration_machine_trigger_time != null)
inspiration_machine_trigger_time.Invalidate();
if (inspiration_patient_trigger_flow != null)
inspiration_patient_trigger_flow.Invalidate();
if (inspiration_patient_trigger_pressure != null)
inspiration_patient_trigger_pressure.Invalidate();
if (inspiration_tube_resistance != null)
inspiration_tube_resistance.Invalidate();
if (inspiration_valve_resistance != null)
......@@ -148,6 +167,8 @@ namespace Pulse.CDM
this.GetExpirationCyclePressure().Set(from.GetExpirationCyclePressure());
if (from.HasExpirationCycleTime())
this.GetExpirationCycleTime().Set(from.GetExpirationCycleTime());
if (from.HasExpirationCycleVolume())
this.GetExpirationCycleVolume().Set(from.GetExpirationCycleVolume());
if (from.HasExpirationTubeResistance())
this.GetExpirationTubeResistance().Set(from.GetExpirationTubeResistance());
if (from.HasExpirationValveResistance())
......@@ -165,14 +186,14 @@ namespace Pulse.CDM
this.GetInspirationPauseTime().Set(from.GetInspirationPauseTime());
if (from.HasPeakInspiratoryPressure())
this.GetPeakInspiratoryPressure().Set(from.GetPeakInspiratoryPressure());
if (from.HasEndTidalCarbonDioxidePressure())
this.GetEndTidalCarbonDioxidePressure().Set(from.GetEndTidalCarbonDioxidePressure());
if (from.HasInspirationTriggerFlow())
this.GetInspirationTriggerFlow().Set(from.GetInspirationTriggerFlow());
if (from.HasInspirationTriggerPressure())
this.GetInspirationTriggerPressure().Set(from.GetInspirationTriggerPressure());
if (from.HasInspirationTriggerTime())
this.GetInspirationTriggerTime().Set(from.GetInspirationTriggerTime());
if (from.HasInspirationTargetFlow())
this.GetInspirationTargetFlow().Set(from.GetInspirationTargetFlow());
if (from.HasInspirationMachineTriggerTime())
this.GetInspirationMachineTriggerTime().Set(from.GetInspirationMachineTriggerTime());
if (from.HasInspirationPatientTriggerFlow())
this.GetInspirationPatientTriggerFlow().Set(from.GetInspirationPatientTriggerFlow());
if (from.HasInspirationPatientTriggerPressure())
this.GetInspirationPatientTriggerPressure().Set(from.GetInspirationPatientTriggerPressure());
if (from.HasInspirationTubeResistance())
this.GetInspirationTubeResistance().Set(from.GetInspirationTubeResistance());
if (from.HasInspirationValveResistance())
......@@ -282,6 +303,17 @@ namespace Pulse.CDM
return expiration_cycle_time == null ? false : expiration_cycle_time.IsValid();
}
public SEScalarVolume GetExpirationCycleVolume()
{
if (expiration_cycle_volume == null)
expiration_cycle_volume = new SEScalarVolume();
return expiration_cycle_volume;
}
public bool HasExpirationCycleVolume()
{
return expiration_cycle_volume == null ? false : expiration_cycle_volume.IsValid();
}
public SEScalarPressureTimePerVolume GetExpirationTubeResistance()
{
if (expiration_tube_resistance == null)
......@@ -372,48 +404,48 @@ namespace Pulse.CDM
return peak_inpiratory_pressure == null ? false : peak_inpiratory_pressure.IsValid();
}
public SEScalarPressure GetEndTidalCarbonDioxidePressure()
public SEScalarVolumePerTime GetInspirationTargetFlow()
{
if (end_tidal_carbon_dioxide_pressure == null)
end_tidal_carbon_dioxide_pressure = new SEScalarPressure();
return end_tidal_carbon_dioxide_pressure;
if (inspiration_target_flow == null)
inspiration_target_flow = new SEScalarVolumePerTime();
return inspiration_target_flow;
}
public bool HasEndTidalCarbonDioxidePressure()
public bool HasInspirationTargetFlow()
{
return end_tidal_carbon_dioxide_pressure == null ? false : end_tidal_carbon_dioxide_pressure.IsValid();
return inspiration_target_flow == null ? false : inspiration_target_flow.IsValid();
}
public SEScalarVolumePerTime GetInspirationTriggerFlow()
public SEScalarTime GetInspirationMachineTriggerTime()
{
if (inspiration_trigger_flow == null)
inspiration_trigger_flow = new SEScalarVolumePerTime();
return inspiration_trigger_flow;
if (inspiration_machine_trigger_time == null)
inspiration_machine_trigger_time = new SEScalarTime();
return inspiration_machine_trigger_time;
}
public bool HasInspirationTriggerFlow()
public bool HasInspirationMachineTriggerTime()
{
return inspiration_trigger_flow == null ? false : inspiration_trigger_flow.IsValid();
return inspiration_machine_trigger_time == null ? false : inspiration_machine_trigger_time.IsValid();
}
public SEScalarPressure GetInspirationTriggerPressure()
public SEScalarVolumePerTime GetInspirationPatientTriggerFlow()
{
if (inspiration_trigger_pressure == null)
inspiration_trigger_pressure = new SEScalarPressure();
return inspiration_trigger_pressure;
if (inspiration_patient_trigger_flow == null)
inspiration_patient_trigger_flow = new SEScalarVolumePerTime();
return inspiration_patient_trigger_flow;
}
public bool HasInspirationTriggerPressure()
public bool HasInspirationPatientTriggerFlow()
{
return inspiration_trigger_pressure == null ? false : inspiration_trigger_pressure.IsValid();
return inspiration_patient_trigger_flow == null ? false : inspiration_patient_trigger_flow.IsValid();
}
public SEScalarTime GetInspirationTriggerTime()
public SEScalarPressure GetInspirationPatientTriggerPressure()
{
if (inspiration_trigger_time == null)
inspiration_trigger_time = new SEScalarTime();
return inspiration_trigger_time;
if (inspiration_patient_trigger_pressure == null)
inspiration_patient_trigger_pressure = new SEScalarPressure();
return inspiration_patient_trigger_pressure;
}
public bool HasInspirationTriggerTime()
public bool HasInspirationPatientTriggerPressure()
{
return inspiration_trigger_time == null ? false : inspiration_trigger_time.IsValid();
return inspiration_patient_trigger_pressure == null ? false : inspiration_patient_trigger_pressure.IsValid();
}
public SEScalarPressureTimePerVolume GetInspirationTubeResistance()
......@@ -567,6 +599,7 @@ namespace Pulse.CDM
+ "\n\tExpirationCycleFlow: " + (HasExpirationCycleFlow() ? GetExpirationCycleFlow().ToString() : "Not Provided")
+ "\n\tExpirationCyclePressure: " + (HasExpirationCyclePressure() ? GetExpirationCyclePressure().ToString() : "Not Provided")
+ "\n\tExpirationCycleTime: " + (HasExpirationCycleTime() ? GetExpirationCycleTime().ToString() : "Not Provided")
+ "\n\tExpirationCycleVolume: " + (HasExpirationCycleVolume() ? GetExpirationCycleVolume().ToString() : "Not Provided")
+ "\n\tExpirationTubeResistance: " + (HasExpirationTubeResistance() ? GetExpirationTubeResistance().ToString() : "Not Provided")
+ "\n\tExpirationValveResistance: " + (HasExpirationValveResistance() ? GetExpirationValveResistance().ToString() : "Not Provided")
+ "\n\tExpirationWaveform: " + (HasExpirationWaveform() ? PBMechanicalVentilator.DriverWaveform_Name(expiration_waveform) : "Not Provided")
......@@ -575,10 +608,10 @@ namespace Pulse.CDM
+ "\n\tInspirationLimitVolume: " + (HasInspirationLimitVolume() ? GetInspirationLimitVolume().ToString() : "Not Provided")
+ "\n\tInspirationPauseTime: " + (HasInspirationPauseTime() ? GetInspirationPauseTime().ToString() : "Not Provided")