SEMechanicalVentilatorVolumeControl.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3#pragma once
4#include "cdm/system/equipment/mechanical_ventilator/actions/SEMechanicalVentilatorMode.h"
5
6// Keep enums in sync with appropriate schema/cdm/MechanicalVentilatorActions.proto file !!
7enum class eMechanicalVentilator_VolumeControlMode { AssistedControl = 0, ContinuousMandatoryVentilation };
8extern CDM_DECL const std::string& eMechanicalVentilator_VolumeControlMode_Name(eMechanicalVentilator_VolumeControlMode m);
9
11{
12 friend class PBEquipmentAction;//friend the serialization class
13public:
14
17
18 static constexpr char const* Name = "Volume Control";
19 virtual std::string GetName() const override { return Name; }
20
21 void Clear() override;
22 virtual void Copy(const SEMechanicalVentilatorVolumeControl& src, bool /*preserveState*/ = false);
23 virtual bool ToSettings(SEMechanicalVentilatorSettings& s, const SESubstanceManager& subMgr) override;
24
25 bool IsValid() const override;
26 bool IsActive() const override;
27 void Deactivate() override;
28
29 virtual eMechanicalVentilator_VolumeControlMode GetMode() const;
30 virtual void SetMode(eMechanicalVentilator_VolumeControlMode c);
31
32 virtual bool HasFlow() const;
33 virtual SEScalarVolumePerTime& GetFlow();
34 virtual double GetFlow(const VolumePerTimeUnit& unit) const;
35
36 virtual bool HasFractionInspiredOxygen() const;
37 virtual SEScalar0To1& GetFractionInspiredOxygen();
38 virtual double GetFractionInspiredOxygen() const;
39
40 virtual bool HasInspirationPatientTriggerFlow() const;
41 virtual SEScalarVolumePerTime& GetInspirationPatientTriggerFlow();
42 virtual double GetInspirationPatientTriggerFlow(const VolumePerTimeUnit& unit) const;
43
44 virtual bool HasInspirationPatientTriggerPressure() const;
45 virtual SEScalarPressure& GetInspirationPatientTriggerPressure();
46 virtual double GetInspirationPatientTriggerPressure(const PressureUnit& unit) const;
47
48 virtual bool HasInspirationWaveform() const;
49 virtual eDriverWaveform GetInspirationWaveform() const;
50 virtual void SetInspirationWaveform(eDriverWaveform w);
51
52 virtual bool HasInspiratoryPeriod() const;
53 virtual SEScalarTime& GetInspiratoryPeriod();
54 virtual double GetInspiratoryPeriod(const TimeUnit& unit) const;
55
56 virtual bool HasPositiveEndExpiratoryPressure() const;
57 virtual SEScalarPressure& GetPositiveEndExpiratoryPressure();
58 virtual double GetPositiveEndExpiratoryPressure(const PressureUnit& unit) const;
59
60 virtual bool HasRespirationRate() const;
61 virtual SEScalarFrequency& GetRespirationRate();
62 virtual double GetRespirationRate(const FrequencyUnit& unit) const;
63
64 virtual bool HasTidalVolume() const;
65 virtual SEScalarVolume& GetTidalVolume();
66 virtual double GetTidalVolume(const VolumeUnit& unit) const;
67
68 virtual bool HasSlope() const;
69 virtual SEScalarTime& GetSlope();
70 virtual double GetSlope(const TimeUnit& unit) const;
71
72 const SEScalar* GetScalar(const std::string& name) override;
73
74protected:
75
76 eMechanicalVentilator_VolumeControlMode m_Mode;
81 eDriverWaveform m_InspirationWaveform;
87};
Definition: SEScalarFrequency.h:8
Definition: Logger.h:71
Definition: PBEquipmentActions.h:41
Definition: SEScalarPressure.h:8
virtual const SEScalar * GetScalar(const std::string &name)=0
static SEAction * Copy(const SEAction &, const SESubstanceManager &)
Definition: SEAction.cpp:53
void Deactivate() override
Definition: SEEquipmentAction.h:19
Definition: SEMechanicalVentilatorMode.h:8
bool IsValid() const override
Definition: SEMechanicalVentilatorMode.cpp:22
virtual bool ToSettings(SEMechanicalVentilatorSettings &s, const SESubstanceManager &subMgr)
Definition: SEMechanicalVentilatorMode.cpp:34
bool IsActive() const override
Definition: SEMechanicalVentilatorMode.cpp:29
void Clear() override
Definition: SEMechanicalVentilatorMode.cpp:16
Definition: SEMechanicalVentilatorSettings.h:13
Definition: SEMechanicalVentilatorVolumeControl.h:11
virtual std::string GetName() const override
Definition: SEMechanicalVentilatorVolumeControl.h:19
eMechanicalVentilator_VolumeControlMode m_Mode
Definition: SEMechanicalVentilatorVolumeControl.h:76
SEScalarTime * m_InspiratoryPeriod
Definition: SEMechanicalVentilatorVolumeControl.h:82
eDriverWaveform m_InspirationWaveform
Definition: SEMechanicalVentilatorVolumeControl.h:81
SEScalarVolumePerTime * m_InspirationPatientTriggerFlow
Definition: SEMechanicalVentilatorVolumeControl.h:79
SEScalarPressure * m_InspirationPatientTriggerPressure
Definition: SEMechanicalVentilatorVolumeControl.h:80
SEScalar0To1 * m_FractionInspiredOxygen
Definition: SEMechanicalVentilatorVolumeControl.h:78
SEScalarTime * m_Slope
Definition: SEMechanicalVentilatorVolumeControl.h:86
SEScalarVolume * m_TidalVolume
Definition: SEMechanicalVentilatorVolumeControl.h:85
SEScalarPressure * m_PositiveEndExpiratoryPressure
Definition: SEMechanicalVentilatorVolumeControl.h:83
SEScalarVolumePerTime * m_Flow
Definition: SEMechanicalVentilatorVolumeControl.h:77
SEScalarFrequency * m_RespirationRate
Definition: SEMechanicalVentilatorVolumeControl.h:84
Definition: SEScalar0To1.h:8
Definition: SEScalarFrequency.h:26
Definition: SEScalar.h:19
Definition: SEScalarPressure.h:29
Definition: SEScalarTime.h:28
Definition: SEScalarVolume.h:28
Definition: SEScalarVolumePerTime.h:32
Definition: SESubstanceManager.h:9
Definition: SEScalarTime.h:8
Definition: SEScalarVolumePerTime.h:8
Definition: SEScalarVolume.h:8

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.