SEAnesthesiaMachineActionCollection.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 
15 #include <biogears/cdm/substance/SESubstanceManager.h>
16 #include <biogears/cdm/system/equipment/Anesthesia/SEAnesthesiaMachine.h>
17 #include <biogears/cdm/system/equipment/Anesthesia/actions/SEAnesthesiaMachineConfiguration.h>
18 #include <biogears/cdm/system/equipment/Anesthesia/actions/SEExpiratoryValveLeak.h>
19 #include <biogears/cdm/system/equipment/Anesthesia/actions/SEExpiratoryValveObstruction.h>
20 #include <biogears/cdm/system/equipment/Anesthesia/actions/SEInspiratoryValveLeak.h>
21 #include <biogears/cdm/system/equipment/Anesthesia/actions/SEInspiratoryValveObstruction.h>
22 #include <biogears/cdm/system/equipment/Anesthesia/actions/SEMaskLeak.h>
23 #include <biogears/cdm/system/equipment/Anesthesia/actions/SEOxygenTankPressureLoss.h>
24 #include <biogears/cdm/system/equipment/Anesthesia/actions/SEOxygenWallPortPressureLoss.h>
25 #include <biogears/cdm/system/equipment/Anesthesia/actions/SESodaLimeFailure.h>
26 #include <biogears/cdm/system/equipment/Anesthesia/actions/SETubeCuffLeak.h>
27 #include <biogears/cdm/system/equipment/Anesthesia/actions/SEVaporizerFailure.h>
28 #include <biogears/cdm/system/equipment/Anesthesia/actions/SEVentilatorPressureLoss.h>
29 #include <biogears/cdm/system/equipment/Anesthesia/actions/SEYPieceDisconnect.h>
30 
31 namespace biogears {
32 class BIOGEARS_API SEAnesthesiaMachineActionCollection : public Loggable {
33 public:
36 
37  void Clear();
38 
39  void Unload(std::vector<CDM::ActionData*>& to);
40 
41  bool ProcessAction(const SEAnesthesiaMachineAction& action);
42  bool ProcessAction(const CDM::AnesthesiaMachineActionData& action);
43 
44  // STATE ACTION
45  bool HasConfiguration() const;
46  SEAnesthesiaMachineConfiguration* GetConfiguration() const;
47  void RemoveConfiguration();
48 
49  // INCIDENT ACTIONS
50 
51  bool HasOxygenTankPressureLoss() const;
52  SEOxygenTankPressureLoss* GetOxygenTankPressureLoss() const;
53  void RemoveOxygenTankPressureLoss();
54 
55  bool HasOxygenWallPortPressureLoss();
56  SEOxygenWallPortPressureLoss* GetOxygenWallPortPressureLoss();
57  void RemoveOxygenWallPortPressureLoss();
58 
59  // FAILURE ACTIONS
60 
61  bool HasExpiratoryValveLeak() const;
62  SEExpiratoryValveLeak* GetExpiratoryValveLeak() const;
63  void RemoveExpiratoryValveLeak();
64 
65  bool HasExpiratoryValveObstruction() const;
66  SEExpiratoryValveObstruction* GetExpiratoryValveObstruction() const;
67  void RemoveExpiratoryValveObstruction();
68 
69  bool HasInspiratoryValveLeak() const;
70  SEInspiratoryValveLeak* GetInspiratoryValveLeak() const;
71  void RemoveInspiratoryValveLeak();
72 
73  bool HasInspiratoryValveObstruction() const;
74  SEInspiratoryValveObstruction* GetInspiratoryValveObstruction() const;
75  void RemoveInspiratoryValveObstruction();
76 
77  bool HasMaskLeak() const;
78  SEMaskLeak* GetMaskLeak() const;
79  void RemoveMaskLeak();
80 
81  bool HasSodaLimeFailure() const;
82  SESodaLimeFailure* GetSodaLimeFailure() const;
83  void RemoveSodaLimeFailure();
84 
85  bool HasTubeCuffLeak() const;
86  SETubeCuffLeak* GetTubeCuffLeak() const;
87  void RemoveTubeCuffLeak();
88 
89  bool HasVaporizerFailure() const;
90  SEVaporizerFailure* GetVaporizerFailure() const;
91  void RemoveVaporizerFailure();
92 
93  bool HasVentilatorPressureLoss() const;
94  SEVentilatorPressureLoss* GetVentilatorPressureLoss() const;
95  void RemoveVentilatorPressureLoss();
96 
97  bool HasYPieceDisconnect() const;
98  SEYPieceDisconnect* GetYPieceDisconnect() const;
99  void RemoveYPieceDisconnect();
100 
101 protected:
102  bool IsValid(const SEAnesthesiaMachineAction& action);
103 
105  //Anesthesia Machine Incidents
108  //Anesthesia Machine Failures
119  // General
121  std::stringstream m_ss;
122 };
123 }
Definition: SEInspiratoryValveLeak.h:20
SEExpiratoryValveLeak * m_ExpiratoryValveLeak
Definition: SEAnesthesiaMachineActionCollection.h:109
SEOxygenWallPortPressureLoss * m_OxygenWallPortPressureLoss
Definition: SEAnesthesiaMachineActionCollection.h:107
SETubeCuffLeak * m_TubeCuffLeak
Definition: SEAnesthesiaMachineActionCollection.h:115
Definition: SEOxygenTankPressureLoss.h:19
SEYPieceDisconnect * m_YPieceDisconnect
Definition: SEAnesthesiaMachineActionCollection.h:118
Class corresponding to the AnesthesiaMachineActionData schema type.
Definition: AnesthesiaActions.hxx:697
Definition: SEInspiratoryValveObstruction.h:19
SEInspiratoryValveObstruction * m_InspiratoryValveObstruction
Definition: SEAnesthesiaMachineActionCollection.h:112
SEMaskLeak * m_MaskLeak
Definition: SEAnesthesiaMachineActionCollection.h:113
SEVentilatorPressureLoss * m_VentilatorPressureLoss
Definition: SEAnesthesiaMachineActionCollection.h:117
Definition: Logger.h:27
Definition: SEVentilatorPressureLoss.h:19
Definition: SEAnesthesiaMachineConfiguration.h:20
SEExpiratoryValveObstruction * m_ExpiratoryValveObstruction
Definition: SEAnesthesiaMachineActionCollection.h:110
SESubstanceManager & m_Substances
Definition: SEAnesthesiaMachineActionCollection.h:120
Definition: SETubeCuffLeak.h:19
SEAnesthesiaMachineConfiguration * m_Configuration
Definition: SEAnesthesiaMachineActionCollection.h:104
Definition: SEVaporizerFailure.h:19
std::stringstream m_ss
Definition: SEAnesthesiaMachineActionCollection.h:121
Definition: SEAnesthesiaMachineAction.h:17
Definition: SEExpiratoryValveLeak.h:19
SESodaLimeFailure * m_SodaLimeFailure
Definition: SEAnesthesiaMachineActionCollection.h:114
SEInspiratoryValveLeak * m_InspiratoryValveLeak
Definition: SEAnesthesiaMachineActionCollection.h:111
Definition: SEMaskLeak.h:19
Definition: SEExpiratoryValveObstruction.h:19
Definition: SESubstanceManager.h:23
Definition: SEElectricalCircuit.h:18
SEVaporizerFailure * m_VaporizerFailure
Definition: SEAnesthesiaMachineActionCollection.h:116
Definition: SEOxygenWallPortPressureLoss.h:19
Definition: SEYPieceDisconnect.h:19
Definition: SESodaLimeFailure.h:19
SEOxygenTankPressureLoss * m_OxygenTankPressureLoss
Definition: SEAnesthesiaMachineActionCollection.h:106
Definition: SEAnesthesiaMachineActionCollection.h:32