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

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.