SEDrugSystem.h
1 /**************************************************************************************
2 Copyright 2015 Applied Research Associates, Inc.
3 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4 this file except in compliance with the License. You may obtain a copy of the License
5 at:
6 http://www.apache.org/licenses/LICENSE-2.0
7 Unless required by applicable law or agreed to in writing, software distributed under
8 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9 CONDITIONS OF ANY KIND, either express or implied. See the License for the
10 specific language governing permissions and limitations under the License.
11 **************************************************************************************/
12 
13 #pragma once
14 #include <biogears/exports.h>
15 
16 #include <biogears/cdm/patient/actions/SEPupillaryResponse.h>
17 #include <biogears/cdm/system/SESystem.h>
18 #include <biogears/schema/biogears/BioGearsPhysiology.hxx>
19 
20 namespace biogears {
21 class SEScalar;
22 class SEScalarFraction;
23 class SEScalarMass;
24 class MassUnit;
25 class SEScalarTemperature;
26 class TemperatureUnit;
27 class SEScalarPressure;
28 class PressureUnit;
29 class SEScalarFrequency;
30 class FrequencyUnit;
31 class SEScalarVolume;
32 class VolumeUnit;
33 class SEScalarVolumePerTime;
34 
35 class BIOGEARS_API SEDrugSystem : public SESystem {
36 public:
37  SEDrugSystem(Logger* logger);
38  ~SEDrugSystem() override;
39 
40  static size_t TypeHash() { return reinterpret_cast<size_t>(&TypeHash); }
41  static constexpr char const * const TypeTag() { return "SEDrugSystem"; }
42  const char* classname() const override { return TypeTag(); }
43  size_t hash_code() const override { return TypeHash(); }
44 
45  void Clear() override; // Deletes all members
46 
47  const SEScalar* GetScalar(const char* name) override;
48  const SEScalar* GetScalar(const std::string& name) override;
49 
50  bool Load(const CDM::DrugSystemData& in);
51  CDM::DrugSystemData* Unload() const override;
52 
53  Tree<const char*> GetPhysiologyRequestGraph() const override;
54 protected:
55  void Unload(CDM::DrugSystemData& data) const;
56 
57 public:
58  bool HasAntibioticActivity() const;
59  SEScalar& GetAntibioticActivity();
60  double GetAntibioticActivity() const;
61 
62  bool HasBronchodilationLevel() const;
63  SEScalarFraction& GetBronchodilationLevel();
64  double GetBronchodilationLevel() const;
65 
66  bool HasFeverChange() const;
67  SEScalarTemperature& GetFeverChange();
68  double GetFeverChange(const TemperatureUnit& unit) const;
69 
70  bool HasHeartRateChange() const;
71  SEScalarFrequency& GetHeartRateChange();
72  double GetHeartRateChange(const FrequencyUnit& unit) const;
73 
74  bool HasHemorrhageChange() const;
75  SEScalarFraction& GetHemorrhageChange();
76  double GetHemorrhageChange() const;
77 
78  bool HasMeanBloodPressureChange() const;
79  SEScalarPressure& GetMeanBloodPressureChange();
80  double GetMeanBloodPressureChange(const PressureUnit& unit) const;
81 
82  bool HasNeuromuscularBlockLevel() const;
83  SEScalarFraction& GetNeuromuscularBlockLevel();
84  double GetNeuromuscularBlockLevel() const;
85 
86  bool HasPainToleranceChange() const;
87  SEScalarFraction& GetPainToleranceChange();
88  double GetPainToleranceChange() const;
89 
90  bool HasPulsePressureChange() const;
91  SEScalarPressure& GetPulsePressureChange();
92  double GetPulsePressureChange(const PressureUnit& unit) const;
93 
94  bool HasRespirationRateChange() const;
95  SEScalarFrequency& GetRespirationRateChange();
96  double GetRespirationRateChange(const FrequencyUnit& unit) const;
97 
98  bool HasSedationLevel() const;
99  SEScalarFraction& GetSedationLevel();
100  double GetSedationLevel() const;
101 
102  bool HasTidalVolumeChange() const;
103  SEScalarVolume& GetTidalVolumeChange();
104  double GetTidalVolumeChange(const VolumeUnit& unit) const;
105 
106  bool HasTubularPermeabilityChange() const;
107  SEScalarFraction& GetTubularPermeabilityChange();
108  double GetTubularPermeabilityChange() const;
109 
110  bool HasCentralNervousResponse() const;
111  SEScalarFraction& GetCentralNervousResponse();
112  double GetCentralNervousResponse() const;
113 
114 protected:
129 };
130 }
static size_t TypeHash()
Definition: SEDrugSystem.h:40
SEScalarFraction * m_TubularPermeabilityChange
Definition: SEDrugSystem.h:127
Definition: SEScalarFrequency.h:18
SEScalarFraction * m_CentralNervousResponse
Definition: SEDrugSystem.h:128
Definition: SEScalarFrequency.h:36
size_t hash_code() const override
Definition: SEDrugSystem.h:43
Definition: SEScalar.h:33
Definition: SEScalarTemperature.h:36
SEScalarFrequency * m_HeartRateChange
Definition: SEDrugSystem.h:118
SEScalarFraction * m_BronchodilationLevel
Definition: SEDrugSystem.h:116
SEScalarFraction * m_HemorrhageChange
Definition: SEDrugSystem.h:119
static constexpr char const *const TypeTag()
Definition: SEDrugSystem.h:41
SEScalarFrequency * m_RespirationRateChange
Definition: SEDrugSystem.h:124
const char * classname() const override
Definition: SEDrugSystem.h:42
Definition: SESystem.h:27
SEScalarPressure * m_PulsePressureChange
Definition: SEDrugSystem.h:123
SEScalar * m_AntibioticActivity
Definition: SEDrugSystem.h:115
Definition: SEScalarTemperature.h:18
SEScalarFraction * m_NeuromuscularBlockLevel
Definition: SEDrugSystem.h:121
Definition: Logger.h:75
Definition: SEScalarFraction.h:18
SEScalarTemperature * m_FeverChange
Definition: SEDrugSystem.h:117
Definition: SEScalarVolume.h:18
Definition: SEScalarPressure.h:37
SEScalarFraction * m_SedationLevel
Definition: SEDrugSystem.h:125
Definition: SEScalarVolume.h:37
Definition: SEScalarPressure.h:18
Definition: SEDrugSystem.h:35
SEScalarFraction * m_PainToleranceChange
Definition: SEDrugSystem.h:122
Definition: SEElectricalCircuit.h:18
Class corresponding to the DrugSystemData schema type.
Definition: Physiology.hxx:8193
SEScalarVolume * m_TidalVolumeChange
Definition: SEDrugSystem.h:126
SEScalarPressure * m_MeanBloodPressureChange
Definition: SEDrugSystem.h:120