Pulse adds COVID-19 Simulation Support
×
PulsePhysiologySystems.h
1 /* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3 
4 #pragma once
5 
6 #include "controller/System.h"
7 #include "system/physiology/SEBloodChemistrySystem.h"
8 #include "system/physiology/SECardiovascularSystem.h"
9 #include "system/physiology/SEDrugSystem.h"
10 #include "system/physiology/SEEndocrineSystem.h"
11 #include "system/physiology/SEEnergySystem.h"
12 #include "system/physiology/SEGastrointestinalSystem.h"
13 #include "system/physiology/SEHepaticSystem.h"
14 #include "system/physiology/SENervousSystem.h"
15 #include "system/physiology/SERenalSystem.h"
16 #include "system/physiology/SERespiratorySystem.h"
17 #include "system/physiology/SETissueSystem.h"
18 #include "system/environment/SEEnvironment.h"
19 #include "system/equipment/anesthesia_machine/SEAnesthesiaMachine.h"
20 #include "system/equipment/electrocardiogram/SEElectroCardioGram.h"
21 #include "system/equipment/inhaler/SEInhaler.h"
22 #include "system/equipment/mechanical_ventilator/SEMechanicalVentilator.h"
23 
24 #include "properties/SEScalarVolumePerPressure.h"
25 #include "properties/SEScalarPressureTimePerVolume.h"
26 
27 // These classes are used to expose any methodology specific data to end users
28 // This data would not belong in the cdm, and it's not a clinical assessment, nor on a compartment
29 // It is data specific to the system implementation
30 // Users only get this data if they are using the pulse engine
31 // They should only contain const pure vitrual methods
32 
34 {
35 public:
37  virtual ~PulseBloodChemistrySystem() = default;
38 
39  virtual const SEScalar* GetScalar(const std::string& name) override
40  {
42  if (s != nullptr)
43  return s;
44  // Check to see if this a model specific request
45  //if (name.compare("ModelParameter") == 0)
46  // return m_ModelParameter;
47  return nullptr;
48  }
49  virtual void ComputeExposedModelParameters()=0;
50 protected:
51  //SEScalar m_ModelParameter;
52 };
53 
55 {
56 public:
58  virtual ~PulseCardiovascularSystem() = default;
59 
60  virtual const SEScalar* GetScalar(const std::string & name) override
61  {
63  if (s != nullptr)
64  return s;
65  // Check to see if this a model specific request
66  //if (name.compare("ModelParameter") == 0)
67  // return m_ModelParameter;
68  return nullptr;
69  }
70  virtual void ComputeExposedModelParameters() = 0;
71 protected:
72  //SEScalar m_ModelParameter;
73 };
74 
75 class PULSE_DECL PulseDrugSystem : public SEDrugSystem, public PulseSystem
76 {
77 public:
78  PulseDrugSystem(Logger* logger) : SEDrugSystem(logger) {}
79  virtual ~PulseDrugSystem() = default;
80 
81  virtual const SEScalar* GetScalar(const std::string & name) override
82  {
83  const SEScalar* s = SEDrugSystem::GetScalar(name);
84  if (s != nullptr)
85  return s;
86  // Check to see if this a model specific request
87  //if (name.compare("ModelParameter") == 0)
88  // return m_ModelParameter;
89  return nullptr;
90  }
91  virtual void ComputeExposedModelParameters() = 0;
92 protected:
93  //SEScalar m_ModelParameter;
94 };
95 
96 class PULSE_DECL PulseEndocrineSystem : public SEEndocrineSystem, public PulseSystem
97 {
98 public:
100  virtual ~PulseEndocrineSystem() = default;
101 
102  virtual const SEScalar* GetScalar(const std::string & name) override
103  {
104  const SEScalar* s = SEEndocrineSystem::GetScalar(name);
105  if (s != nullptr)
106  return s;
107  // Check to see if this a model specific request
108  //if (name.compare("ModelParameter") == 0)
109  // return m_ModelParameter;
110  return nullptr;
111  }
112  virtual void ComputeExposedModelParameters() = 0;
113 protected:
114  //SEScalar m_ModelParameter;
115 };
116 
117 class PULSE_DECL PulseEnergySystem : public SEEnergySystem, public PulseSystem
118 {
119 public:
121  virtual ~PulseEnergySystem() = default;
122 
123  virtual const SEScalar* GetScalar(const std::string & name) override
124  {
125  const SEScalar* s = SEEnergySystem::GetScalar(name);
126  if (s != nullptr)
127  return s;
128  // Check to see if this a model specific request
129  //if (name.compare("ModelParameter") == 0)
130  // return m_ModelParameter;
131  return nullptr;
132  }
133  virtual void ComputeExposedModelParameters() = 0;
134 protected:
135  //SEScalar m_ModelParameter;
136 };
137 
139 {
140 public:
142  virtual ~PulseGastrointestinalSystem() = default;
143 
144  virtual const SEScalar* GetScalar(const std::string & name) override
145  {
147  if (s != nullptr)
148  return s;
149  // Check to see if this a model specific request
150  //if (name.compare("ModelParameter") == 0)
151  // return m_ModelParameter;
152  return nullptr;
153  }
154  virtual void ComputeExposedModelParameters() = 0;
155 protected:
156  //SEScalar m_ModelParameter;
157 };
158 
159 class PULSE_DECL PulseHepaticSystem : public SEHepaticSystem, public PulseSystem
160 {
161 public:
163  virtual ~PulseHepaticSystem() = default;
164 
165  virtual const SEScalar* GetScalar(const std::string & name) override
166  {
167  const SEScalar* s = SEHepaticSystem::GetScalar(name);
168  if (s != nullptr)
169  return s;
170  // Check to see if this a model specific request
171  //if (name.compare("ModelParameter") == 0)
172  // return m_ModelParameter;
173  return nullptr;
174  }
175  virtual void ComputeExposedModelParameters() = 0;
176 protected:
177  //SEScalar m_ModelParameter;
178 };
179 
180 class PULSE_DECL PulseNervousSystem : public SENervousSystem, public PulseSystem
181 {
182 public:
184  virtual ~PulseNervousSystem() = default;
185 
186  virtual const SEScalar* GetScalar(const std::string & name) override
187  {
188  const SEScalar* s = SENervousSystem::GetScalar(name);
189  if (s != nullptr)
190  return s;
191  // Check to see if this a model specific request
192  //if (name.compare("ModelParameter") == 0)
193  // return m_ModelParameter;
194  return nullptr;
195  }
196  virtual void ComputeExposedModelParameters() = 0;
197 protected:
198  //SEScalar m_ModelParameter;
199 };
200 
201 class PULSE_DECL PulseRenalSystem : public SERenalSystem, public PulseSystem
202 {
203 public:
204  PulseRenalSystem(Logger* logger) : SERenalSystem(logger) {}
205  virtual ~PulseRenalSystem() = default;
206 
207  virtual const SEScalar* GetScalar(const std::string & name) override
208  {
209  const SEScalar* s = SERenalSystem::GetScalar(name);
210  if (s != nullptr)
211  return s;
212  // Check to see if this a model specific request
213  //if (name.compare("ModelParameter") == 0)
214  // return m_ModelParameter;
215  return nullptr;
216  }
217  virtual void ComputeExposedModelParameters() = 0;
218 protected:
219  //SEScalar m_ModelParameter;
220 };
221 
222 class PULSE_DECL PulseRespiratorySystem : public SERespiratorySystem, public PulseSystem
223 {
224 public:
226  virtual ~PulseRespiratorySystem() = default;
227 
228  virtual const SEScalar* GetScalar(const std::string & name) override
229  {
230  const SEScalar* s = SERespiratorySystem::GetScalar(name);
231  if (s != nullptr)
232  return s;
233  // Check to see if this a model specific request
234  if (name.compare("TotalRespiratoryModelCompliance") == 0)
235  return &m_TotalRespiratoryModelCompliance;
236  if (name.compare("TotalRespiratoryModelResistance") == 0)
237  return &m_TotalRespiratoryModelResistance;
238  return nullptr;
239  }
240  virtual void ComputeExposedModelParameters() = 0;
241 
242  DEFINE_UNIT_SCALAR(TotalRespiratoryModelCompliance, VolumePerPressure);
243  DEFINE_UNIT_SCALAR(TotalRespiratoryModelResistance, PressureTimePerVolume);
244 };
245 
246 class PULSE_DECL PulseTissueSystem : public SETissueSystem, public PulseSystem
247 {
248 public:
250  virtual ~PulseTissueSystem() = default;
251 
252  virtual const SEScalar* GetScalar(const std::string & name) override
253  {
254  const SEScalar* s = SETissueSystem::GetScalar(name);
255  if (s != nullptr)
256  return s;
257  // Check to see if this a model specific request
258  //if (name.compare("ModelParameter") == 0)
259  // return m_ModelParameter;
260  return nullptr;
261  }
262  virtual void ComputeExposedModelParameters() = 0;
263 protected:
264  //SEScalar m_ModelParameter;
265 };
266 
267 class PULSE_DECL PulseEnvironmentSystem : public SEEnvironment, public PulseSystem
268 {
269 public:
271  virtual ~PulseEnvironmentSystem() = default;
272 
273  virtual const SEScalar* GetScalar(const std::string & name) override
274  {
275  const SEScalar* s = SEEnvironment::GetScalar(name);
276  if (s != nullptr)
277  return s;
278  // Check to see if this a model specific request
279  //if (name.compare("ModelParameter") == 0)
280  // return m_ModelParameter;
281  return nullptr;
282  }
283  virtual void ComputeExposedModelParameters() = 0;
284 protected:
285  //SEScalar m_ModelParameter;
286 };
287 
288 class PULSE_DECL PulseAnesthesiaMachine : public SEAnesthesiaMachine, public PulseSystem
289 {
290 public:
292  virtual ~PulseAnesthesiaMachine() = default;
293 
294  virtual const SEScalar* GetScalar(const std::string & name) override
295  {
296  const SEScalar* s = SEAnesthesiaMachine::GetScalar(name);
297  if (s != nullptr)
298  return s;
299  // Check to see if this a model specific request
300  //if (name.compare("ModelParameter") == 0)
301  // return m_ModelParameter;
302  return nullptr;
303  }
304  virtual void ComputeExposedModelParameters() = 0;
305 protected:
306  //SEScalar m_ModelParameter;
307 };
308 
309 class PULSE_DECL PulseElectroCardioGram : public SEElectroCardioGram, public PulseSystem
310 {
311 public:
313  virtual ~PulseElectroCardioGram() = default;
314 
315  virtual const SEScalar* GetScalar(const std::string & name) override
316  {
317  const SEScalar* s = SEElectroCardioGram::GetScalar(name);
318  if (s != nullptr)
319  return s;
320  // Check to see if this a model specific request
321  //if (name.compare("ModelParameter") == 0)
322  // return m_ModelParameter;
323  return nullptr;
324  }
325  virtual void ComputeExposedModelParameters() = 0;
326 protected:
327  //SEScalar m_ModelParameter;
328 };
329 
330 class PULSE_DECL PulseInhaler : public SEInhaler, public PulseSystem
331 {
332 public:
333  PulseInhaler(Logger* logger) : SEInhaler(logger) {}
334  virtual ~PulseInhaler() = default;
335 
336  virtual const SEScalar* GetScalar(const std::string & name) override
337  {
338  const SEScalar* s = SEInhaler::GetScalar(name);
339  if (s != nullptr)
340  return s;
341  // Check to see if this a model specific request
342  //if (name.compare("ModelParameter") == 0)
343  // return m_ModelParameter;
344  return nullptr;
345  }
346  virtual void ComputeExposedModelParameters() = 0;
347 protected:
348  //SEScalar m_ModelParameter;
349 };
350 
352 {
353 public:
355  virtual ~PulseMechanicalVentilator() = default;
356 
357  virtual const SEScalar* GetScalar(const std::string & name) override
358  {
360  if (s != nullptr)
361  return s;
362  // Check to see if this a model specific request
363  //if (name.compare("ModelParameter") == 0)
364  // return m_ModelParameter;
365  return nullptr;
366  }
367  virtual void ComputeExposedModelParameters() = 0;
368 protected:
369  //SEScalar m_ModelParameter;
370 };
virtual const SEScalar * GetScalar(const std::string &name)
Definition: SEDrugSystem.cpp:50
virtual const SEScalar * GetScalar(const std::string &name)
Definition: SEMechanicalVentilator.cpp:229
Definition: SEElectroCardioGram.h:7
PulseTissueSystem(Logger *logger)
Definition: PulsePhysiologySystems.h:249
Definition: SEScalar.h:34
PulseHepaticSystem(Logger *logger)
Definition: PulsePhysiologySystems.h:162
virtual const SEScalar * GetScalar(const std::string &name)
Definition: SERespiratorySystem.cpp:140
Definition: PulsePhysiologySystems.h:96
PulseGastrointestinalSystem(Logger *logger)
Definition: PulsePhysiologySystems.h:141
virtual const SEScalar * GetScalar(const std::string &name) override
Definition: PulsePhysiologySystems.h:228
Definition: SEInhaler.h:11
Definition: PulsePhysiologySystems.h:117
virtual const SEScalar * GetScalar(const std::string &name)
A reflextion type call that will return the Scalar associated with the string. ex. GetScalar("Hematocrit") will return the SEScalarPercent object associated with Hematocrit
Definition: SEBloodChemistrySystem.cpp:86
Definition: Logger.h:75
Definition: PulsePhysiologySystems.h:138
virtual const SEScalar * GetScalar(const std::string &name) override
Definition: PulsePhysiologySystems.h:357
virtual const SEScalar * GetScalar(const std::string &name) override
Definition: PulsePhysiologySystems.h:81
Definition: SEAnesthesiaMachine.h:27
PulseRespiratorySystem(Logger *logger)
Definition: PulsePhysiologySystems.h:225
Definition: PulsePhysiologySystems.h:351
Definition: SEMechanicalVentilator.h:20
Definition: PulsePhysiologySystems.h:54
Definition: PulsePhysiologySystems.h:246
Definition: SENervousSystem.h:8
PulseEndocrineSystem(Logger *logger)
Definition: PulsePhysiologySystems.h:99
virtual const SEScalar * GetScalar(const std::string &name)
Definition: SEElectroCardioGram.cpp:46
Definition: PulsePhysiologySystems.h:180
PulseElectroCardioGram(Logger *logger)
Definition: PulsePhysiologySystems.h:312
Definition: SEGastrointestinalSystem.h:8
virtual const SEScalar * GetScalar(const std::string &name) override
Definition: PulsePhysiologySystems.h:165
virtual const SEScalar * GetScalar(const std::string &name) override
Definition: PulsePhysiologySystems.h:144
Definition: PulsePhysiologySystems.h:201
Definition: SERespiratorySystem.h:11
PulseRenalSystem(Logger *logger)
Definition: PulsePhysiologySystems.h:204
Definition: SECardiovascularSystem.h:11
Definition: PulsePhysiologySystems.h:222
virtual const SEScalar * GetScalar(const std::string &name) override
Definition: PulsePhysiologySystems.h:336
Definition: SERenalSystem.h:7
PulseDrugSystem(Logger *logger)
Definition: PulsePhysiologySystems.h:78
Definition: PulsePhysiologySystems.h:330
virtual const SEScalar * GetScalar(const std::string &name) override
Definition: PulsePhysiologySystems.h:186
virtual const SEScalar * GetScalar(const std::string &name) override
Definition: PulsePhysiologySystems.h:102
Definition: SETissueSystem.h:7
virtual const SEScalar * GetScalar(const std::string &name)
Definition: SEGastrointestinalSystem.cpp:31
virtual const SEScalar * GetScalar(const std::string &name) override
Definition: PulsePhysiologySystems.h:294
Generic class for handling the Pulse stabilization methodology.
Definition: System.h:9
Definition: SEHepaticSystem.h:7
PulseAnesthesiaMachine(Logger *logger)
Definition: PulsePhysiologySystems.h:291
PulseMechanicalVentilator(Logger *logger)
Definition: PulsePhysiologySystems.h:354
PulseEnergySystem(Logger *logger)
Definition: PulsePhysiologySystems.h:120
virtual const SEScalar * GetScalar(const std::string &name) override
Definition: PulsePhysiologySystems.h:60
PulseCardiovascularSystem(Logger *logger)
Definition: PulsePhysiologySystems.h:57
Definition: SEBloodChemistrySystem.h:9
virtual const SEScalar * GetScalar(const std::string &name) override
Definition: PulsePhysiologySystems.h:273
PulseInhaler(Logger *logger)
Definition: PulsePhysiologySystems.h:333
virtual const SEScalar * GetScalar(const std::string &name)
Definition: SERenalSystem.cpp:153
virtual const SEScalar * GetScalar(const std::string &name)
Definition: SEEnergySystem.cpp:53
Definition: PulsePhysiologySystems.h:309
virtual const SEScalar * GetScalar(const std::string &name)
Definition: SEEndocrineSystem.cpp:24
PulseBloodChemistrySystem(Logger *logger)
Definition: PulsePhysiologySystems.h:36
Definition: SEEnergySystem.h:7
virtual const SEScalar * GetScalar(const std::string &name)
Definition: SEAnesthesiaMachine.cpp:119
PulseEnvironmentSystem(Logger *logger)
Definition: PulsePhysiologySystems.h:270
Definition: PulsePhysiologySystems.h:75
virtual const SEScalar * GetScalar(const std::string &name)
Definition: SENervousSystem.cpp:45
Definition: SEEndocrineSystem.h:7
virtual const SEScalar * GetScalar(const std::string &name) override
Definition: PulsePhysiologySystems.h:207
Definition: SEEnvironment.h:12
Definition: PulsePhysiologySystems.h:267
virtual const SEScalar * GetScalar(const std::string &name)
Definition: SECardiovascularSystem.cpp:92
virtual const SEScalar * GetScalar(const std::string &name) override
Definition: PulsePhysiologySystems.h:315
virtual const SEScalar * GetScalar(const std::string &name)
Definition: SEHepaticSystem.cpp:23
virtual const SEScalar * GetScalar(const std::string &name) override
Definition: PulsePhysiologySystems.h:123
virtual const SEScalar * GetScalar(const std::string &name)
Definition: SEInhaler.cpp:59
Definition: SEDrugSystem.h:8
virtual const SEScalar * GetScalar(const std::string &name)
Definition: SEEnvironment.cpp:59
virtual const SEScalar * GetScalar(const std::string &name) override
A reflextion type call that will return the Scalar associated with the string. ex. GetScalar("Hematocrit") will return the SEScalarPercent object associated with Hematocrit
Definition: PulsePhysiologySystems.h:39
Definition: PulsePhysiologySystems.h:159
PulseNervousSystem(Logger *logger)
Definition: PulsePhysiologySystems.h:183
Definition: PulsePhysiologySystems.h:33
virtual const SEScalar * GetScalar(const std::string &name) override
Definition: PulsePhysiologySystems.h:252
virtual const SEScalar * GetScalar(const std::string &name)
Definition: SETissueSystem.cpp:36
Definition: PulsePhysiologySystems.h:288

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.