SESubstanceInfusion.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5#include "cdm/patient/actions/SESubstanceAdministration.h"
6class SESubstance;
7
8class CDM_DECL SESubstanceInfusion : public SEPatientAction
9{
10 friend class PBPatientAction;//friend the serialization class
11public:
12
13 SESubstanceInfusion(const SESubstance& substance, Logger* logger=nullptr);
14 virtual ~SESubstanceInfusion();
15
16 static constexpr char const* Name = "Substance Infusion";
17 std::string GetName() const override { return Name; }
18
19 void Clear() override;
20 void Copy(const SESubstanceInfusion& src, bool /*preserveState*/=false);
21
22 const SEScalar* GetScalar(const std::string& name) override;
23
24 bool IsValid() const override;
25 bool IsActive() const override;
26 void Deactivate() override;
27
28 virtual bool HasConcentration() const;
29 virtual SEScalarMassPerVolume& GetConcentration();
30 virtual double GetConcentration(const MassPerVolumeUnit& unit) const;
31
32 virtual bool HasRate() const;
33 virtual SEScalarVolumePerTime& GetRate();
34 virtual double GetRate(const VolumePerTimeUnit& unit) const;
35
36 virtual bool HasVolume() const;
37 virtual SEScalarVolume& GetVolume();
38 virtual double GetVolume(const VolumeUnit& unit) const;
39
40 virtual SESubstance& GetSubstance();
41 virtual const SESubstance& GetSubstance() const;
42
43protected:
48};
Definition: Logger.h:71
Definition: SEScalarMassPerVolume.h:8
Definition: PBPatientActions.h:52
virtual const SEScalar * GetScalar(const std::string &name)=0
static SEAction * Copy(const SEAction &, const SESubstanceManager &)
Definition: SEAction.cpp:53
Definition: SEPatientAction.h:8
void Deactivate() override
Definition: SEPatientAction.h:23
void Clear() override
Definition: SEPatientAction.h:18
bool IsValid() const override
Definition: SEPatientAction.h:19
bool IsActive() const override
Definition: SEPatientAction.h:22
Definition: SEScalar.h:19
Definition: SEScalarMassPerVolume.h:37
Definition: SEScalarVolume.h:28
Definition: SEScalarVolumePerTime.h:32
Definition: SESubstance.h:15
Definition: SESubstanceInfusion.h:9
SEScalarVolume * m_Volume
Definition: SESubstanceInfusion.h:46
SEScalarVolumePerTime * m_Rate
Definition: SESubstanceInfusion.h:45
const SESubstance & m_Substance
Definition: SESubstanceInfusion.h:47
std::string GetName() const override
Definition: SESubstanceInfusion.h:17
SEScalarMassPerVolume * m_Concentration
Definition: SESubstanceInfusion.h:44
Definition: SEScalarVolumePerTime.h:8
Definition: SEScalarVolume.h:8

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.