SESupplementalOxygen.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/SEPatientAction.h"
6class SESubstance;
7
8// Keep enums in sync with appropriate schema/cdm/PatientActionEnums.proto file !!
9enum class eSupplementalOxygen_Device { None = 0, NasalCannula, SimpleMask, NonRebreatherMask };
10extern CDM_DECL const std::string& eSupplementalOxygen_Device_Name(eSupplementalOxygen_Device e);
11
13{
14 friend class PBPatientAction;//friend the serialization class
15public:
16
17 SESupplementalOxygen(Logger* logger=nullptr);
18 virtual ~SESupplementalOxygen();
19
20 static constexpr char const* Name = "Supplemental Oxygen";
21 std::string GetName() const override { return Name; }
22
23 void Clear() override;
24 void Copy(const SESupplementalOxygen& src, bool /*preserveState*/=false);
25
26 const SEScalar* GetScalar(const std::string& name) override;
27
28 bool IsValid() const override;
29 bool IsActive() const override;
30 void Deactivate() override;
31
32 virtual eSupplementalOxygen_Device GetDevice() const;
33 virtual void SetDevice(eSupplementalOxygen_Device name);
34
35 virtual bool HasFlow() const;
36 virtual SEScalarVolumePerTime& GetFlow();
37 virtual double GetFlow(const VolumePerTimeUnit& unit) const;
38
39 virtual bool HasVolume() const;
40 virtual SEScalarVolume& GetVolume();
41 virtual double GetVolume(const VolumeUnit& unit) const;
42
43protected:
44 eSupplementalOxygen_Device m_Device;
47};
Definition: Logger.h:71
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: SEScalarVolume.h:28
Definition: SEScalarVolumePerTime.h:32
Definition: SESubstance.h:15
Definition: SESupplementalOxygen.h:13
SEScalarVolumePerTime * m_Flow
Definition: SESupplementalOxygen.h:45
SEScalarVolume * m_Volume
Definition: SESupplementalOxygen.h:46
eSupplementalOxygen_Device m_Device
Definition: SESupplementalOxygen.h:44
std::string GetName() const override
Definition: SESupplementalOxygen.h:21
Definition: SEScalarVolumePerTime.h:8
Definition: SEScalarVolume.h:8

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.