SEHemorrhage.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/cdm/CommonDataModel.h>
15 #include <biogears/exports.h>
16 
17 #include <biogears/cdm/patient/actions/SEPatientAction.h>
18 #include <biogears/cdm/properties/SEScalarFlowResistance.h>
19 #include <biogears/schema/cdm/PatientActions.hxx>
20 
21 namespace biogears {
22 class SEScalarVolumePerTime;
23 
24 class BIOGEARS_API SEHemorrhage : public SEPatientAction {
31 public:
32  SEHemorrhage();
33  virtual ~SEHemorrhage() override;
34 
35  static constexpr const char* TypeTag() { return "SEHemorrhage"; };
36  const char* classname() const override { return TypeTag(); }
37 
38  virtual void Clear() override; //clear memory
39 
40  virtual bool IsValid() const override;
41  virtual bool IsActive() const override;
42 
43  virtual bool Load(const CDM::HemorrhageData& in);
44  virtual CDM::HemorrhageData* Unload() const override;
45 
46 protected:
47  virtual void Unload(CDM::HemorrhageData& data) const;
48 
49 public:
50  virtual const char* GetCompartment_cStr() const;
51  virtual std::string GetCompartment() const;
52  virtual bool HasCompartment() const;
53  virtual void SetCompartment(const char* name);
54  virtual void SetCompartment(const std::string& name);
55  virtual void InvalidateCompartment();
56 
57  virtual bool HasMCIS() const;
58  virtual std::vector<unsigned int>& GetMCIS() { return m_MCIS; }
59  virtual void SetMCIS();
60 
61  virtual bool HasInitialRate() const;
62  virtual SEScalarVolumePerTime& GetInitialRate();
63 
64  virtual bool HasBleedResistance() const;
65  virtual SEScalarFlowResistance& GetBleedResistance();
66 
67  virtual void ToString(std::ostream& str) const override;
68 
69 protected:
70  std::string m_Compartment;
71  std::vector<unsigned int> m_MCIS;
74  std::map<std::string, std::vector<unsigned int>> organMap;
75 };
76 }
std::vector< unsigned int > m_MCIS
Definition: SEHemorrhage.h:71
const char * classname() const override
Definition: SEHemorrhage.h:36
Definition: SEPatientAction.h:18
Class corresponding to the HemorrhageData schema type.
Definition: PatientActions.hxx:6393
std::map< std::string, std::vector< unsigned int > > organMap
Definition: SEHemorrhage.h:74
Definition: SEScalarVolumePerTime.h:40
Definition: SEScalarFlowResistance.h:37
static constexpr const char * TypeTag()
Definition: SEHemorrhage.h:35
std::string m_Compartment
Definition: SEHemorrhage.h:70
virtual std::vector< unsigned int > & GetMCIS()
Definition: SEHemorrhage.h:58
Definition: SEElectricalCircuit.h:18
Definition: SEHemorrhage.h:24
SEScalarFlowResistance * m_BleedResistance
Definition: SEHemorrhage.h:73
SEScalarVolumePerTime * m_InitialRate
Definition: SEHemorrhage.h:72