SEPatient.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
5 class SEEventHandler;
6 class SENutrition;
7 
8 // Keep enums in sync with appropriate schema/cdm/PatientEnums.proto file !!
9 enum class ePatient_Sex { Male = 0, Female };
10 extern const std::string& ePatient_Sex_Name(ePatient_Sex m);
11 
12 class CDM_DECL SEPatient : public Loggable
13 {
14  friend class PBPatient;//friend the serialization class
15 public:
16 
17  SEPatient(Logger* logger);
18  virtual ~SEPatient();
19 
20  virtual void Clear();
21  virtual void Copy(const SEPatient& src);
22 
23  bool SerializeToString(std::string& output, eSerializationFormat m) const;
24  bool SerializeToFile(const std::string& filename) const;
25  bool SerializeFromString(const std::string& src, eSerializationFormat m);
26  bool SerializeFromFile(const std::string& filename);
27 
36  virtual const SEScalar* GetScalar(const std::string& name);
37 
38  virtual std::string GetName() const;
39  virtual void SetName(const std::string& name);
40  virtual bool HasName() const;
41  virtual void InvalidateName();
42 
43  virtual ePatient_Sex GetSex() const;
44  virtual void SetSex(ePatient_Sex sex);
45 
46  virtual bool HasAge() const;
47  virtual SEScalarTime& GetAge();
48  virtual double GetAge(const TimeUnit& unit) const;
49 
50  virtual bool HasWeight() const;
51  virtual SEScalarMass& GetWeight();
52  virtual double GetWeight(const MassUnit& unit) const;
53 
54  virtual bool HasHeight() const;
55  virtual SEScalarLength& GetHeight();
56  virtual double GetHeight(const LengthUnit& unit) const;
57 
58  virtual bool HasAlveoliSurfaceArea() const;
59  virtual SEScalarArea& GetAlveoliSurfaceArea();
60  virtual double GetAlveoliSurfaceArea(const AreaUnit& unit) const;
61 
62  virtual bool HasBasalMetabolicRate() const;
63  virtual SEScalarPower& GetBasalMetabolicRate();
64  virtual double GetBasalMetabolicRate(const PowerUnit& unit) const;
65 
66  virtual bool HasBloodVolumeBaseline() const;
67  virtual SEScalarVolume& GetBloodVolumeBaseline();
68  virtual double GetBloodVolumeBaseline(const VolumeUnit& unit) const;
69 
70  virtual bool HasBodyDensity() const;
71  virtual SEScalarMassPerVolume& GetBodyDensity();
72  virtual double GetBodyDensity(const MassPerVolumeUnit& unit) const;
73 
74  virtual bool HasBodyFatFraction() const;
75  virtual SEScalar0To1& GetBodyFatFraction();
76  virtual double GetBodyFatFraction() const;
77 
78  virtual bool HasDiastolicArterialPressureBaseline() const;
79  virtual SEScalarPressure& GetDiastolicArterialPressureBaseline();
80  virtual double GetDiastolicArterialPressureBaseline(const PressureUnit& unit) const;
81 
82  virtual bool HasExpiratoryReserveVolume() const;
83  virtual SEScalarVolume& GetExpiratoryReserveVolume();
84  virtual double GetExpiratoryReserveVolume(const VolumeUnit& unit) const;
85 
86  virtual bool HasFunctionalResidualCapacity() const;
87  virtual SEScalarVolume& GetFunctionalResidualCapacity();
88  virtual double GetFunctionalResidualCapacity(const VolumeUnit& unit) const;
89 
90  virtual bool HasHeartRateBaseline() const;
91  virtual SEScalarFrequency& GetHeartRateBaseline();
92  virtual double GetHeartRateBaseline(const FrequencyUnit& unit) const;
93 
94  virtual bool HasHeartRateMaximum() const;
95  virtual SEScalarFrequency& GetHeartRateMaximum();
96  virtual double GetHeartRateMaximum(const FrequencyUnit& unit) const;
97 
98  virtual bool HasHeartRateMinimum() const;
99  virtual SEScalarFrequency& GetHeartRateMinimum();
100  virtual double GetHeartRateMinimum(const FrequencyUnit& unit) const;
101 
102  virtual bool HasIdealBodyWeight() const;
103  virtual SEScalarMass& GetIdealBodyWeight();
104  virtual double GetIdealBodyWeight(const MassUnit& unit) const;
105 
106  virtual bool HasInspiratoryCapacity() const;
107  virtual SEScalarVolume& GetInspiratoryCapacity();
108  virtual double GetInspiratoryCapacity(const VolumeUnit& unit) const;
109 
110  virtual bool HasInspiratoryReserveVolume() const;
111  virtual SEScalarVolume& GetInspiratoryReserveVolume();
112  virtual double GetInspiratoryReserveVolume(const VolumeUnit& unit) const;
113 
114  virtual bool HasLeanBodyMass() const;
115  virtual SEScalarMass& GetLeanBodyMass();
116  virtual double GetLeanBodyMass(const MassUnit& unit) const;
117 
118  virtual bool HasMeanArterialPressureBaseline() const;
119  virtual SEScalarPressure& GetMeanArterialPressureBaseline();
120  virtual double GetMeanArterialPressureBaseline(const PressureUnit& unit) const;
121 
122  virtual bool HasResidualVolume() const;
123  virtual SEScalarVolume& GetResidualVolume();
124  virtual double GetResidualVolume(const VolumeUnit& unit) const;
125 
126  virtual bool HasRespirationRateBaseline() const;
127  virtual SEScalarFrequency& GetRespirationRateBaseline();
128  virtual double GetRespirationRateBaseline(const FrequencyUnit& unit) const;
129 
130  virtual bool HasRightLungRatio() const;
131  virtual SEScalar0To1& GetRightLungRatio();
132  virtual double GetRightLungRatio() const;
133 
134  virtual bool HasSkinSurfaceArea() const;
135  virtual SEScalarArea& GetSkinSurfaceArea();
136  virtual double GetSkinSurfaceArea(const AreaUnit& unit) const;
137 
138  virtual bool HasSystolicArterialPressureBaseline() const;
139  virtual SEScalarPressure& GetSystolicArterialPressureBaseline();
140  virtual double GetSystolicArterialPressureBaseline(const PressureUnit& unit) const;
141 
142  virtual bool HasTidalVolumeBaseline() const;
143  virtual SEScalarVolume& GetTidalVolumeBaseline();
144  virtual double GetTidalVolumeBaseline(const VolumeUnit& unit) const;
145 
146  virtual bool HasTotalLungCapacity() const;
147  virtual SEScalarVolume& GetTotalLungCapacity();
148  virtual double GetTotalLungCapacity(const VolumeUnit& unit) const;
149 
150  virtual bool HasVitalCapacity() const;
151  virtual SEScalarVolume& GetVitalCapacity();
152  virtual double GetVitalCapacity(const VolumeUnit& unit) const;
153 
154 protected:
155 
156  std::string m_Name;
157  ePatient_Sex m_Sex;
165 
169 
178 
188 };
Definition: SEScalarArea.h:24
SEScalarVolume * m_InspiratoryReserveVolume
Definition: SEPatient.h:184
Definition: SEScalarMass.h:27
SEScalarVolume * m_TotalLungCapacity
Definition: SEPatient.h:186
Definition: SEScalar.h:34
Definition: SEScalarVolume.h:7
Definition: SEPatient.h:12
SEScalarVolume * m_ExpiratoryReserveVolume
Definition: SEPatient.h:181
SEScalarVolume * m_FunctionalResidualCapacity
Definition: SEPatient.h:182
Definition: SEScalarVolume.h:27
Definition: Logger.h:66
Definition: SEScalarMassPerVolume.h:36
Definition: SEScalarPressure.h:28
Definition: SEScalarMassPerVolume.h:7
SEScalarFrequency * m_HeartRateMinimum
Definition: SEPatient.h:180
SEScalarPressure * m_MeanArterialPressureBaseline
Definition: SEPatient.h:174
SEScalarFrequency * m_RespirationRateBaseline
Definition: SEPatient.h:175
SEScalar0To1 * m_BodyFatFraction
Definition: SEPatient.h:162
SEScalarPower * m_BasalMetabolicRate
Definition: SEPatient.h:170
ePatient_Sex m_Sex
Definition: SEPatient.h:157
SEScalarVolume * m_ResidualVolume
Definition: SEPatient.h:185
SEScalarPressure * m_SystolicArterialPressureBaseline
Definition: SEPatient.h:176
SEScalarMassPerVolume * m_BodyDensity
Definition: SEPatient.h:161
Definition: SEEventManager.h:64
SEScalarFrequency * m_HeartRateBaseline
Definition: SEPatient.h:173
Definition: SENutrition.h:6
SEScalarPressure * m_DiastolicArterialPressureBaseline
Definition: SEPatient.h:172
Definition: SEScalarTime.h:7
SEScalarVolume * m_InspiratoryCapacity
Definition: SEPatient.h:183
SEScalarVolume * m_VitalCapacity
Definition: SEPatient.h:187
Definition: Logger.h:18
Definition: PBPatient.h:7
std::string m_Name
Definition: SEPatient.h:156
static bool SerializeToString(const SEPatient &src, std::string &output, eSerializationFormat m)
Definition: PBPatient.cpp:162
SEScalarVolume * m_TidalVolumeBaseline
Definition: SEPatient.h:177
Definition: SEScalarPressure.h:7
SEScalar0To1 * m_RightLungRatio
Definition: SEPatient.h:167
static bool SerializeFromString(const std::string &src, SEPatient &dst, eSerializationFormat m)
Definition: PBPatient.cpp:175
SEScalarArea * m_AlveoliSurfaceArea
Definition: SEPatient.h:166
SEScalarFrequency * m_HeartRateMaximum
Definition: SEPatient.h:179
SEScalarMass * m_Weight
Definition: SEPatient.h:159
Definition: SEScalarArea.h:7
SEScalarMass * m_IdealBodyWeight
Definition: SEPatient.h:164
Definition: SEScalarLength.h:28
Definition: SEScalarLength.h:7
Definition: SEScalarFrequency.h:7
Definition: SEScalarTime.h:27
Definition: SEScalarPower.h:28
static void Copy(const SEPatient &src, SEPatient &dst)
Definition: PBPatient.cpp:154
SEScalarArea * m_SkinSurfaceArea
Definition: SEPatient.h:168
SEScalarLength * m_Height
Definition: SEPatient.h:160
Definition: SEScalarPower.h:7
Definition: SEScalarFrequency.h:25
Definition: SEScalarMass.h:7
SEScalarVolume * m_BloodVolumeBaseline
Definition: SEPatient.h:171
SEScalarMass * m_LeanBodyMass
Definition: SEPatient.h:163
SEScalarTime * m_Age
Definition: SEPatient.h:158
static bool SerializeToFile(const SEPatient &src, const std::string &filename)
Definition: PBPatient.cpp:168
Definition: SEScalar0To1.h:7
static bool SerializeFromFile(const std::string &filename, SEPatient &dst)
Definition: PBPatient.cpp:183

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.