SERespiratorySystem.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/SESystem.h"
6
7enum class eLungCompartment
8{
9 LeftLung = 0,
10 RightLung,
11
12 LeftSuperiorLobe,
13 LeftInferiorLobe,
14 RightSuperiorLobe,
15 RightMiddleLobe,
16 RightInferiorLobe
17};
18extern CDM_DECL const std::string& eLungCompartment_Name(eLungCompartment cmpt);
19using LungImpairmentMap = std::map<eLungCompartment, SEScalar0To1*>;
20using LungVolumeIncrementMap = std::map<eLungCompartment, SEScalarVolume*>;
21
23
24class CDM_DECL SERespiratorySystem : public SESystem
25{
26 friend class PBPhysiology;//friend the serialization class
27public:
28 static void FillLungImpairmentMap(LungImpairmentMap& map);
29
31 virtual ~SERespiratorySystem();
32
33 void Clear() override;
34
35 const SEScalar* GetScalar(const std::string& name) override;
36
37 virtual bool HasAirwayPressure() const;
38 virtual SEScalarPressure& GetAirwayPressure();
39 virtual double GetAirwayPressure(const PressureUnit& unit) const;
40
41 virtual bool HasAlveolarArterialGradient() const;
42 virtual SEScalarPressure& GetAlveolarArterialGradient();
43 virtual double GetAlveolarArterialGradient(const PressureUnit& unit) const;
44
45 virtual bool HasAlveolarDeadSpace() const;
46 virtual SEScalarVolume& GetAlveolarDeadSpace();
47 virtual double GetAlveolarDeadSpace(const VolumeUnit& unit) const;
48
49 virtual bool HasAnatomicDeadSpace() const;
50 virtual SEScalarVolume& GetAnatomicDeadSpace();
51 virtual double GetAnatomicDeadSpace(const VolumeUnit& unit) const;
52
53 virtual bool HasHorowitzIndex() const;
54 virtual SEScalarPressure& GetHorowitzIndex();
55 virtual double GetHorowitzIndex(const PressureUnit& unit) const;
56
57 virtual bool HasChestWallCompliance() const;
58 virtual SEScalarVolumePerPressure& GetChestWallCompliance();
59 virtual double GetChestWallCompliance(const VolumePerPressureUnit& unit) const;
60
61 virtual bool HasElasticWorkOfBreathing() const;
62 virtual SEScalarEnergy& GetElasticWorkOfBreathing();
63 virtual double GetElasticWorkOfBreathing(const EnergyUnit& unit) const;
64
65 virtual bool HasEndTidalCarbonDioxideFraction() const;
66 virtual SEScalar0To1& GetEndTidalCarbonDioxideFraction();
67 virtual double GetEndTidalCarbonDioxideFraction() const;
68
69 virtual bool HasEndTidalCarbonDioxidePressure() const;
70 virtual SEScalarPressure& GetEndTidalCarbonDioxidePressure();
71 virtual double GetEndTidalCarbonDioxidePressure(const PressureUnit& unit) const;
72
73 virtual bool HasEndTidalOxygenFraction() const;
74 virtual SEScalar0To1& GetEndTidalOxygenFraction();
75 virtual double GetEndTidalOxygenFraction() const;
76
77 virtual bool HasEndTidalOxygenPressure() const;
78 virtual SEScalarPressure& GetEndTidalOxygenPressure();
79 virtual double GetEndTidalOxygenPressure(const PressureUnit& unit) const;
80
81 virtual bool HasExpiratoryFlow() const;
82 virtual SEScalarVolumePerTime& GetExpiratoryFlow();
83 virtual double GetExpiratoryFlow(const VolumePerTimeUnit& unit) const;
84
85 virtual bool HasExpiratoryRespiratoryResistance() const;
86 virtual SEScalarPressureTimePerVolume& GetExpiratoryRespiratoryResistance();
87 virtual double GetExpiratoryRespiratoryResistance(const PressureTimePerVolumeUnit& unit) const;
88
89 virtual bool HasExpiratoryTidalVolume() const;
90 virtual SEScalarVolume& GetExpiratoryTidalVolume();
91 virtual double GetExpiratoryTidalVolume(const VolumeUnit& unit) const;
92
93 virtual bool HasExtrinsicPositiveEndExpiratoryPressure() const;
94 virtual SEScalarPressure& GetExtrinsicPositiveEndExpiratoryPressure();
95 virtual double GetExtrinsicPositiveEndExpiratoryPressure(const PressureUnit& unit) const;
96
97 virtual bool HasFractionOfInspiredOxygen() const;
98 virtual SEScalar0To1& GetFractionOfInspiredOxygen();
99 virtual double GetFractionOfInspiredOxygen() const;
100
101 virtual bool HasImposedPowerOfBreathing() const;
102 virtual SEScalarPower& GetImposedPowerOfBreathing();
103 virtual double GetImposedPowerOfBreathing(const PowerUnit& unit) const;
104
105 virtual bool HasImposedWorkOfBreathing() const;
106 virtual SEScalarEnergy& GetImposedWorkOfBreathing();
107 virtual double GetImposedWorkOfBreathing(const EnergyUnit& unit) const;
108
109 virtual bool HasInspiratoryExpiratoryRatio() const;
110 virtual SEScalar& GetInspiratoryExpiratoryRatio();
111 virtual double GetInspiratoryExpiratoryRatio() const;
112
113 virtual bool HasInspiratoryFlow() const;
114 virtual SEScalarVolumePerTime& GetInspiratoryFlow();
115 virtual double GetInspiratoryFlow(const VolumePerTimeUnit& unit) const;
116
117 virtual bool HasInspiratoryRespiratoryResistance() const;
118 virtual SEScalarPressureTimePerVolume& GetInspiratoryRespiratoryResistance();
119 virtual double GetInspiratoryRespiratoryResistance(const PressureTimePerVolumeUnit& unit) const;
120
121 virtual bool HasInspiratoryTidalVolume() const;
122 virtual SEScalarVolume& GetInspiratoryTidalVolume();
123 virtual double GetInspiratoryTidalVolume(const VolumeUnit& unit) const;
124
125 virtual bool HasIntrapleuralPressure() const;
126 virtual SEScalarPressure& GetIntrapleuralPressure();
127 virtual double GetIntrapleuralPressure(const PressureUnit& unit) const;
128
129 virtual bool HasIntrapulmonaryPressure() const;
130 virtual SEScalarPressure& GetIntrapulmonaryPressure();
131 virtual double GetIntrapulmonaryPressure(const PressureUnit& unit) const;
132
133 virtual bool HasIntrinsicPositiveEndExpiratoryPressure() const;
134 virtual SEScalarPressure& GetIntrinsicPositiveEndExpiratoryPressure();
135 virtual double GetIntrinsicPositiveEndExpiratoryPressure(const PressureUnit& unit) const;
136
137 virtual bool HasLungCompliance() const;
138 virtual SEScalarVolumePerPressure& GetLungCompliance();
139 virtual double GetLungCompliance(const VolumePerPressureUnit& unit) const;
140
141 virtual bool HasMaximalInspiratoryPressure() const;
142 virtual SEScalarPressure& GetMaximalInspiratoryPressure();
143 virtual double GetMaximalInspiratoryPressure(const PressureUnit& unit) const;
144
145 virtual bool HasMeanAirwayPressure() const;
146 virtual SEScalarPressure& GetMeanAirwayPressure();
147 virtual double GetMeanAirwayPressure(const PressureUnit& unit) const;
148
149 virtual bool HasOxygenationIndex() const;
150 virtual SEScalar& GetOxygenationIndex();
151 virtual double GetOxygenationIndex() const;
152
153 virtual bool HasOxygenSaturationIndex() const;
154 virtual SEScalarPressure& GetOxygenSaturationIndex();
155 virtual double GetOxygenSaturationIndex(const PressureUnit& unit) const;
156
157 virtual bool HasPatientPowerOfBreathing() const;
158 virtual SEScalarPower& GetPatientPowerOfBreathing();
159 virtual double GetPatientPowerOfBreathing(const PowerUnit& unit) const;
160
161 virtual bool HasPatientWorkOfBreathing() const;
162 virtual SEScalarEnergy& GetPatientWorkOfBreathing();
163 virtual double GetPatientWorkOfBreathing(const EnergyUnit& unit) const;
164
165 virtual bool HasPeakInspiratoryPressure() const;
166 virtual SEScalarPressure& GetPeakInspiratoryPressure();
167 virtual double GetPeakInspiratoryPressure(const PressureUnit& unit) const;
168
169 virtual bool HasPhysiologicDeadSpace() const;
170 virtual SEScalarVolume& GetPhysiologicDeadSpace();
171 virtual double GetPhysiologicDeadSpace(const VolumeUnit& unit) const;
172
173 virtual bool HasPhysiologicDeadSpaceTidalVolumeRatio() const;
174 virtual SEScalar& GetPhysiologicDeadSpaceTidalVolumeRatio();
175 virtual double GetPhysiologicDeadSpaceTidalVolumeRatio() const;
176
177 virtual bool HasRespiratoryCompliance() const;
178 virtual SEScalarVolumePerPressure& GetRespiratoryCompliance();
179 virtual double GetRespiratoryCompliance(const VolumePerPressureUnit& unit) const;
180
181 virtual bool HasRespiratoryElastance() const;
182 virtual SEScalarPressurePerVolume& GetRespiratoryElastance();
183 virtual double GetRespiratoryElastance(const PressurePerVolumeUnit& unit) const;
184
185 virtual bool HasRelativeTotalLungVolume() const;
186 virtual SEScalarVolume& GetRelativeTotalLungVolume();
187 virtual double GetRelativeTotalLungVolume(const VolumeUnit& unit) const;
188
189 virtual bool HasResistiveExpiratoryWorkOfBreathing() const;
190 virtual SEScalarEnergy& GetResistiveExpiratoryWorkOfBreathing();
191 virtual double GetResistiveExpiratoryWorkOfBreathing(const EnergyUnit& unit) const;
192
193 virtual bool HasResistiveInspiratoryWorkOfBreathing() const;
194 virtual SEScalarEnergy& GetResistiveInspiratoryWorkOfBreathing();
195 virtual double GetResistiveInspiratoryWorkOfBreathing(const EnergyUnit& unit) const;
196
197 virtual bool HasRespirationRate() const;
198 virtual SEScalarFrequency& GetRespirationRate();
199 virtual double GetRespirationRate(const FrequencyUnit& unit) const;
200
201 virtual bool HasRespiratoryMuscleFatigue() const;
202 virtual SEScalar0To1& GetRespiratoryMuscleFatigue();
203 virtual double GetRespiratoryMuscleFatigue() const;
204
205 virtual bool HasRespiratoryMusclePressure() const;
206 virtual SEScalarPressure& GetRespiratoryMusclePressure();
207 virtual double GetRespiratoryMusclePressure(const PressureUnit& unit) const;
208
209 virtual bool HasSaturationAndFractionOfInspiredOxygenRatio() const;
210 virtual SEScalar& GetSaturationAndFractionOfInspiredOxygenRatio();
211 virtual double GetSaturationAndFractionOfInspiredOxygenRatio() const;
212
213 virtual bool HasSpecificVentilation() const;
214 virtual SEScalar& GetSpecificVentilation();
215 virtual double GetSpecificVentilation() const;
216
217 virtual bool HasTidalVolume() const;
218 virtual SEScalarVolume& GetTidalVolume();
219 virtual double GetTidalVolume(const VolumeUnit& unit) const;
220
221 virtual bool HasTotalAlveolarVentilation() const;
222 virtual SEScalarVolumePerTime& GetTotalAlveolarVentilation();
223 virtual double GetTotalAlveolarVentilation(const VolumePerTimeUnit& unit) const;
224
225 virtual bool HasTotalDeadSpaceVentilation() const;
226 virtual SEScalarVolumePerTime& GetTotalDeadSpaceVentilation();
227 virtual double GetTotalDeadSpaceVentilation(const VolumePerTimeUnit& unit) const;
228
229 virtual bool HasTotalLungVolume() const;
230 virtual SEScalarVolume& GetTotalLungVolume();
231 virtual double GetTotalLungVolume(const VolumeUnit& unit) const;
232
233 virtual bool HasTotalPositiveEndExpiratoryPressure() const;
234 virtual SEScalarPressure& GetTotalPositiveEndExpiratoryPressure();
235 virtual double GetTotalPositiveEndExpiratoryPressure(const PressureUnit& unit) const;
236
237 virtual bool HasTotalPowerOfBreathing() const;
238 virtual SEScalarPower& GetTotalPowerOfBreathing();
239 virtual double GetTotalPowerOfBreathing(const PowerUnit& unit) const;
240
241 virtual bool HasTotalPulmonaryVentilation() const;
242 virtual SEScalarVolumePerTime& GetTotalPulmonaryVentilation();
243 virtual double GetTotalPulmonaryVentilation(const VolumePerTimeUnit& unit) const;
244
245 virtual bool HasTotalWorkOfBreathing() const;
246 virtual SEScalarEnergy& GetTotalWorkOfBreathing();
247 virtual double GetTotalWorkOfBreathing(const EnergyUnit& unit) const;
248
249 virtual bool HasTransairwayPressure() const;
250 virtual SEScalarPressure& GetTransairwayPressure();
251 virtual double GetTransairwayPressure(const PressureUnit& unit) const;
252
253 virtual bool HasTransalveolarPressure() const;
254 virtual SEScalarPressure& GetTransalveolarPressure();
255 virtual double GetTransalveolarPressure(const PressureUnit& unit) const;
256
257 virtual bool HasTransChestWallPressure() const;
258 virtual SEScalarPressure& GetTransChestWallPressure();
259 virtual double GetTransChestWallPressure(const PressureUnit& unit) const;
260
261 virtual bool HasTransMusclePressure() const;
262 virtual SEScalarPressure& GetTransMusclePressure();
263 virtual double GetTransMusclePressure(const PressureUnit& unit) const;
264
265 virtual bool HasTranspulmonaryPressure() const;
266 virtual SEScalarPressure& GetTranspulmonaryPressure();
267 virtual double GetTranspulmonaryPressure(const PressureUnit& unit) const;
268
269 virtual bool HasTransrespiratoryPressure() const;
270 virtual SEScalarPressure& GetTransrespiratoryPressure();
271 virtual double GetTransrespiratoryPressure(const PressureUnit& unit) const;
272
273 virtual bool HasTransthoracicPressure() const;
274 virtual SEScalarPressure& GetTransthoracicPressure();
275 virtual double GetTransthoracicPressure(const PressureUnit& unit) const;
276
277 virtual bool HasVentilationPerfusionRatio() const;
278 virtual SEScalar& GetVentilationPerfusionRatio();
279 virtual double GetVentilationPerfusionRatio() const;
280
281 virtual bool HasActiveMechanics() const;
282 virtual bool HasMechanics() const;
283 virtual SERespiratoryMechanics& GetMechanics();
284 virtual const SERespiratoryMechanics* GetMechanics() const;
285
286protected:
287
349
351};
Definition: SEScalarEnergy.h:8
Definition: SEScalarFrequency.h:8
Definition: Logger.h:71
Definition: PBPhysiology.h:24
Definition: SEScalarPower.h:8
Definition: SEScalarPressurePerVolume.h:8
Definition: SEScalarPressureTimePerVolume.h:8
Definition: SEScalarPressure.h:8
Definition: SERespiratoryMechanics.h:8
Definition: SERespiratorySystem.h:25
SEScalarPressureTimePerVolume * m_ExpiratoryRespiratoryResistance
Definition: SERespiratorySystem.h:300
SERespiratoryMechanics * m_Mechanics
Definition: SERespiratorySystem.h:350
SEScalar * m_PhysiologicDeadSpaceTidalVolumeRatio
Definition: SERespiratorySystem.h:322
SEScalarPower * m_TotalPowerOfBreathing
Definition: SERespiratorySystem.h:338
SEScalarVolume * m_ExpiratoryTidalVolume
Definition: SERespiratorySystem.h:301
SEScalarPressure * m_TranspulmonaryPressure
Definition: SERespiratorySystem.h:345
SEScalar * m_SaturationAndFractionOfInspiredOxygenRatio
Definition: SERespiratorySystem.h:331
SEScalarVolumePerTime * m_ExpiratoryFlow
Definition: SERespiratorySystem.h:299
SEScalarPressure * m_TotalPositiveEndExpiratoryPressure
Definition: SERespiratorySystem.h:337
SEScalarEnergy * m_ImposedWorkOfBreathing
Definition: SERespiratorySystem.h:305
SEScalarPressure * m_AlveolarArterialGradient
Definition: SERespiratorySystem.h:289
SEScalarPressure * m_HorowitzIndex
Definition: SERespiratorySystem.h:292
SEScalarVolume * m_AnatomicDeadSpace
Definition: SERespiratorySystem.h:291
SEScalarVolume * m_RelativeTotalLungVolume
Definition: SERespiratorySystem.h:325
SEScalarPressure * m_ExtrinsicPositiveEndExpiratoryPressure
Definition: SERespiratorySystem.h:302
SEScalarEnergy * m_PatientWorkOfBreathing
Definition: SERespiratorySystem.h:319
SEScalarVolumePerTime * m_TotalPulmonaryVentilation
Definition: SERespiratorySystem.h:339
SEScalarPressure * m_RespiratoryMusclePressure
Definition: SERespiratorySystem.h:330
SEScalarPressure * m_TransairwayPressure
Definition: SERespiratorySystem.h:341
SEScalarEnergy * m_ElasticWorkOfBreathing
Definition: SERespiratorySystem.h:294
SEScalarVolume * m_AlveolarDeadSpace
Definition: SERespiratorySystem.h:290
SEScalarVolumePerPressure * m_RespiratoryCompliance
Definition: SERespiratorySystem.h:323
SEScalarPressure * m_MeanAirwayPressure
Definition: SERespiratorySystem.h:315
SEScalarPressure * m_MaximalInspiratoryPressure
Definition: SERespiratorySystem.h:314
SEScalarEnergy * m_ResistiveExpiratoryWorkOfBreathing
Definition: SERespiratorySystem.h:326
SEScalarPressure * m_AirwayPressure
Definition: SERespiratorySystem.h:288
SEScalarEnergy * m_TotalWorkOfBreathing
Definition: SERespiratorySystem.h:340
SEScalarPressure * m_TransMusclePressure
Definition: SERespiratorySystem.h:344
SEScalarPressure * m_EndTidalOxygenPressure
Definition: SERespiratorySystem.h:298
SEScalar * m_OxygenationIndex
Definition: SERespiratorySystem.h:316
SEScalarPressurePerVolume * m_RespiratoryElastance
Definition: SERespiratorySystem.h:324
SEScalar0To1 * m_FractionOfInspiredOxygen
Definition: SERespiratorySystem.h:303
SEScalarVolumePerPressure * m_ChestWallCompliance
Definition: SERespiratorySystem.h:293
SEScalarPressureTimePerVolume * m_InspiratoryRespiratoryResistance
Definition: SERespiratorySystem.h:308
SEScalarVolume * m_InspiratoryTidalVolume
Definition: SERespiratorySystem.h:309
SEScalarVolumePerTime * m_TotalAlveolarVentilation
Definition: SERespiratorySystem.h:334
SEScalar0To1 * m_EndTidalOxygenFraction
Definition: SERespiratorySystem.h:297
SEScalarVolume * m_PhysiologicDeadSpace
Definition: SERespiratorySystem.h:321
SEScalarPressure * m_TransChestWallPressure
Definition: SERespiratorySystem.h:343
SEScalarPressure * m_TransrespiratoryPressure
Definition: SERespiratorySystem.h:346
SEScalar0To1 * m_EndTidalCarbonDioxideFraction
Definition: SERespiratorySystem.h:295
SEScalarPressure * m_IntrinsicPositiveEndExpiratoryPressure
Definition: SERespiratorySystem.h:312
SEScalarPressure * m_IntrapleuralPressure
Definition: SERespiratorySystem.h:310
SEScalarPressure * m_IntrapulmonaryPressure
Definition: SERespiratorySystem.h:311
SEScalar * m_InspiratoryExpiratoryRatio
Definition: SERespiratorySystem.h:306
SEScalar0To1 * m_RespiratoryMuscleFatigue
Definition: SERespiratorySystem.h:329
SEScalarVolumePerTime * m_TotalDeadSpaceVentilation
Definition: SERespiratorySystem.h:335
SEScalarPower * m_ImposedPowerOfBreathing
Definition: SERespiratorySystem.h:304
SEScalarFrequency * m_RespirationRate
Definition: SERespiratorySystem.h:328
SEScalarVolumePerPressure * m_LungCompliance
Definition: SERespiratorySystem.h:313
SEScalarPressure * m_TransalveolarPressure
Definition: SERespiratorySystem.h:342
SEScalarVolumePerTime * m_InspiratoryFlow
Definition: SERespiratorySystem.h:307
SEScalarVolume * m_TidalVolume
Definition: SERespiratorySystem.h:333
SEScalarPressure * m_PeakInspiratoryPressure
Definition: SERespiratorySystem.h:320
SEScalarPressure * m_EndTidalCarbonDioxidePressure
Definition: SERespiratorySystem.h:296
SEScalarPower * m_PatientPowerOfBreathing
Definition: SERespiratorySystem.h:318
SEScalar * m_SpecificVentilation
Definition: SERespiratorySystem.h:332
SEScalarEnergy * m_ResistiveInspiratoryWorkOfBreathing
Definition: SERespiratorySystem.h:327
SEScalarVolume * m_TotalLungVolume
Definition: SERespiratorySystem.h:336
SEScalarPressure * m_OxygenSaturationIndex
Definition: SERespiratorySystem.h:317
SEScalarPressure * m_TransthoracicPressure
Definition: SERespiratorySystem.h:347
SEScalar * m_VentilationPerfusionRatio
Definition: SERespiratorySystem.h:348
Definition: SEScalar0To1.h:8
Definition: SEScalarEnergy.h:27
Definition: SEScalarFrequency.h:26
Definition: SEScalar.h:19
Definition: SEScalarPower.h:29
Definition: SEScalarPressure.h:29
Definition: SEScalarPressurePerVolume.h:26
Definition: SEScalarPressureTimePerVolume.h:29
Definition: SEScalarVolume.h:28
Definition: SEScalarVolumePerPressure.h:28
Definition: SEScalarVolumePerTime.h:32
Definition: SESystem.h:8
virtual const SEScalar * GetScalar(const std::string &name)=0
virtual void Clear()
Definition: SESystem.cpp:17
Definition: SEScalarVolumePerPressure.h:8
Definition: SEScalarVolumePerTime.h:8
Definition: SEScalarVolume.h:8

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.