SEAnesthesiaMachine.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5#include "cdm/system/equipment/SEEquipment.h"
12
13
14// Keep enums in sync with appropriate schema/cdm/AnesthesiaMachineEnums.proto file !!
15enum class eAnesthesiaMachine_OxygenSource { NullSource = 0, NoSource, Wall, BottleOne, BottleTwo };
16extern CDM_DECL const std::string& eAnesthesiaMachine_OxygenSource_Name(eAnesthesiaMachine_OxygenSource m);
17
18// Keep enums in sync with appropriate schema/cdm/AnesthesiaMachineEnums.proto file !!
19enum class eAnesthesiaMachine_PrimaryGas { NullGas = 0, NoGas, Air, Nitrogen };
20extern CDM_DECL const std::string& eAnesthesiaMachine_PrimaryGas_Name(eAnesthesiaMachine_PrimaryGas m);
21
22
23class CDM_DECL SEAnesthesiaMachine : public SEEquipment
24{
25 friend class PBAnesthesiaMachine;//friend the serialization class
26protected:
28public:
29
31 virtual ~SEAnesthesiaMachine();
32
33 void Clear() override;
34
35 bool SerializeToString(std::string& output, eSerializationFormat m) const;
36 bool SerializeToFile(const std::string& filename) const;
37 bool SerializeFromString(const std::string& src, eSerializationFormat m, const SESubstanceManager& subMgr);
38 bool SerializeFromFile(const std::string& filename, const SESubstanceManager& subMgr);
39
40protected:
41
47 virtual void StateChange(){};
48 virtual void Merge(const SEAnesthesiaMachine& from, SESubstanceManager& subMgr);
49 virtual void ProcessConfiguration(SEAnesthesiaMachineConfiguration& config, SESubstanceManager& subMgr);
50
51public:
52
53 const SEScalar* GetScalar(const std::string& name) override;
54
55 virtual eSwitch GetConnection() const;
56 virtual void SetConnection(eSwitch c);
57
58 virtual bool HasInletFlow() const;
59 virtual SEScalarVolumePerTime& GetInletFlow();
60 virtual double GetInletFlow(const VolumePerTimeUnit& unit) const;
61
62 virtual bool HasInspiratoryExpiratoryRatio() const;
63 virtual SEScalar& GetInspiratoryExpiratoryRatio();
64 virtual double GetInspiratoryExpiratoryRatio() const;
65
66 virtual bool HasOxygenFraction() const;
67 virtual SEScalar0To1& GetOxygenFraction();
68 virtual double GetOxygenFraction() const;
69
70 virtual eAnesthesiaMachine_OxygenSource GetOxygenSource() const;
71 virtual void SetOxygenSource(eAnesthesiaMachine_OxygenSource name);
72
73 virtual bool HasPositiveEndExpiratoryPressure() const;
74 virtual SEScalarPressure& GetPositiveEndExpiratoryPressure();
75 virtual double GetPositiveEndExpiratoryPressure(const PressureUnit& unit) const;
76
77 virtual eAnesthesiaMachine_PrimaryGas GetPrimaryGas() const;
78 virtual void SetPrimaryGas(eAnesthesiaMachine_PrimaryGas name);
79
80 virtual bool HasRespiratoryRate() const;
81 virtual SEScalarFrequency& GetRespiratoryRate();
82 virtual double GetRespiratoryRate(const FrequencyUnit& unit) const;
83
84 virtual bool HasReliefValvePressure() const;
85 virtual SEScalarPressure& GetReliefValvePressure();
86 virtual double GetReliefValvePressure(const PressureUnit& unit) const;
87
88 virtual bool HasPeakInspiratoryPressure() const;
89 virtual SEScalarPressure& GetPeakInspiratoryPressure();
90 virtual double GetPeakInspiratoryPressure(const PressureUnit& unit) const;
91
92 virtual bool HasLeftChamber() const;
93 virtual SEAnesthesiaMachineChamber& GetLeftChamber();
94 virtual const SEAnesthesiaMachineChamber* GetLeftChamber() const;
95 virtual void RemoveLeftChamber();
96
97 virtual bool HasRightChamber() const;
98 virtual SEAnesthesiaMachineChamber& GetRightChamber();
99 virtual const SEAnesthesiaMachineChamber* GetRightChamber() const;
100 virtual void RemoveRightChamber();
101
102 virtual bool HasOxygenBottleOne() const;
103 virtual SEAnesthesiaMachineOxygenBottle& GetOxygenBottleOne();
104 virtual const SEAnesthesiaMachineOxygenBottle* GetOxygenBottleOne() const;
105 virtual void RemoveOxygenBottleOne();
106
107 virtual bool HasOxygenBottleTwo() const;
108 virtual SEAnesthesiaMachineOxygenBottle& GetOxygenBottleTwo();
109 virtual const SEAnesthesiaMachineOxygenBottle* GetOxygenBottleTwo() const;
110 virtual void RemoveOxygenBottleTwo();
111
112protected:
113
118 eAnesthesiaMachine_OxygenSource m_OxygenSource;
120 eAnesthesiaMachine_PrimaryGas m_PrimaryGas;
123
125
128
131};
Definition: SEScalarFrequency.h:8
Definition: Logger.h:71
Definition: PBAnesthesiaMachine.h:11
static bool SerializeFromFile(const std::string &filename, SEAnesthesiaMachine &dst, const SESubstanceManager &subMgr)
Definition: PBAnesthesiaMachine.cpp:176
static bool SerializeToString(const SEAnesthesiaMachine &src, std::string &output, eSerializationFormat m)
Definition: PBAnesthesiaMachine.cpp:155
static bool SerializeToFile(const SEAnesthesiaMachine &src, const std::string &filename)
Definition: PBAnesthesiaMachine.cpp:161
static bool SerializeFromString(const std::string &src, SEAnesthesiaMachine &dst, eSerializationFormat m, const SESubstanceManager &subMgr)
Definition: PBAnesthesiaMachine.cpp:168
Definition: SEScalarPressure.h:8
Definition: SEAnesthesiaMachineChamber.h:10
Definition: SEAnesthesiaMachineConfiguration.h:9
Definition: SEAnesthesiaMachine.h:24
SEAnesthesiaMachineChamber * m_RightChamber
Definition: SEAnesthesiaMachine.h:127
SEAnesthesiaMachineOxygenBottle * m_OxygenBottleOne
Definition: SEAnesthesiaMachine.h:129
SEScalar * m_InspiratoryExpiratoryRatio
Definition: SEAnesthesiaMachine.h:116
eAnesthesiaMachine_OxygenSource m_OxygenSource
Definition: SEAnesthesiaMachine.h:118
SEScalarVolumePerTime * m_InletFlow
Definition: SEAnesthesiaMachine.h:115
virtual void StateChange()
Definition: SEAnesthesiaMachine.h:47
SEScalarPressure * m_PositiveEndExpiratoryPressure
Definition: SEAnesthesiaMachine.h:119
SEAnesthesiaMachineOxygenBottle * m_OxygenBottleTwo
Definition: SEAnesthesiaMachine.h:130
SEScalarPressure * m_ReliefValvePressure
Definition: SEAnesthesiaMachine.h:122
SEAnesthesiaMachineChamber * m_LeftChamber
Definition: SEAnesthesiaMachine.h:126
SEScalarFrequency * m_RespiratoryRate
Definition: SEAnesthesiaMachine.h:121
eSwitch m_Connection
Definition: SEAnesthesiaMachine.h:114
eAnesthesiaMachine_PrimaryGas m_PrimaryGas
Definition: SEAnesthesiaMachine.h:120
friend SEAnesthesiaMachineConfiguration
Definition: SEAnesthesiaMachine.h:27
SEScalarPressure * m_PeakInspiratoryPressure
Definition: SEAnesthesiaMachine.h:124
SEScalar0To1 * m_OxygenFraction
Definition: SEAnesthesiaMachine.h:117
Definition: SEAnesthesiaMachineOxygenBottle.h:8
Definition: SEEquipment.h:9
void Clear() override
Definition: SEEquipment.cpp:17
Definition: SEEventManager.h:73
Definition: SEGasSubstanceQuantity.h:10
Definition: SEScalar0To1.h:8
Definition: SEScalarFrequency.h:26
Definition: SEScalar.h:19
Definition: SEScalarPressure.h:29
Definition: SEScalarVolumePerTime.h:32
Definition: SESubstanceManager.h:9
virtual const SEScalar * GetScalar(const std::string &name)=0
Definition: SEScalarVolumePerTime.h:8

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.