SEIntubation.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"
6
7// Keep enums in sync with appropriate schema/cdm/PatientActionEnums.proto file !!
8enum class eIntubation_Type { Off = 0, Esophageal, LeftMainstem, RightMainstem, Tracheal,
9 Oropharyngeal, Nasopharyngeal };
10extern CDM_DECL const std::string& eIntubation_Type_Name(eIntubation_Type m);
11
12class CDM_DECL SEIntubation : public SEPatientAction
13{
14 friend class PBPatientAction;//friend the serialization class
15public:
16
17 SEIntubation(Logger* logger=nullptr);
18 virtual ~SEIntubation();
19
20 static constexpr char const* Name = "Intubation";
21 std::string GetName() const override { return Name; }
22
23 void Clear() override;
24 void Copy(const SEIntubation& 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 eIntubation_Type GetType() const;
33 virtual void SetType(eIntubation_Type t);
34
35 virtual bool HasAirwayResistance() const;
36 virtual SEScalarPressureTimePerVolume& GetAirwayResistance();
37 virtual double GetAirwayResistance(const PressureTimePerVolumeUnit& unit) const;
38
39 virtual bool HasSeverity() const;
40 virtual SEScalar0To1& GetSeverity();
41 virtual double GetSeverity() const;
42
43protected:
44 eIntubation_Type m_Type;
47};
Definition: Logger.h:71
Definition: PBPatientActions.h:52
Definition: SEScalarPressureTimePerVolume.h:8
virtual const SEScalar * GetScalar(const std::string &name)=0
static SEAction * Copy(const SEAction &, const SESubstanceManager &)
Definition: SEAction.cpp:53
Definition: SEIntubation.h:13
SEScalarPressureTimePerVolume * m_AirwayResistance
Definition: SEIntubation.h:45
eIntubation_Type m_Type
Definition: SEIntubation.h:44
std::string GetName() const override
Definition: SEIntubation.h:21
SEScalar0To1 * m_Severity
Definition: SEIntubation.h:46
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: SEScalar0To1.h:8
Definition: SEScalar.h:19
Definition: SEScalarPressureTimePerVolume.h:29

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.