Generic anesthesia machine for positive pressure ventilation. More...
#include <AnesthesiaMachine.h>

Static Public Member Functions | |
static size_t | TypeHash () |
static constexpr char const *const | TypeTag () |
![]() | |
static size_t | TypeHash () |
static constexpr char const *const | TypeTag () |
![]() | |
static const SEScalar * | GetScalar (const char *name, std::vector< SESystem * > *systems) |
static const SEScalar * | GetScalar (const std::string &name, std::vector< SESystem * > *systems) |
Protected Member Functions | |
AnesthesiaMachine (BioGears &bg) | |
virtual void | Unload (CDM::BioGearsAnesthesiaMachineData &data) const |
void | SetUp () override |
Initializes parameters for the anesthesia machine class. More... | |
![]() | |
void | Unload (CDM::AnesthesiaMachineData &data) const |
void | Merge (const SEAnesthesiaMachine &from) |
void | ProcessConfiguration (const SEAnesthesiaMachineConfiguration &config) |
![]() | |
void | Unload (CDM::SystemData &data) const |
![]() | |
virtual void | Debug (const char *msg, const char *origin="") const |
virtual void | Debug (const std::string &msg, const std::string &origin=empty) const |
virtual void | Debug (std::ostream &msg, const std::string &origin=empty) const |
virtual void | Info (const char *msg, const char *origin="") const |
virtual void | Info (const std::string &msg, const std::string &origin=empty) const |
virtual void | Info (std::ostream &msg, const std::string &origin=empty) const |
virtual void | Warning (const char *msg, const char *origin="") const |
virtual void | Warning (const std::string &msg, const std::string &origin=empty) const |
virtual void | Warning (std::ostream &msg, const std::string &origin=empty) const |
virtual void | Error (const char *msg, const char *origin="") const |
virtual void | Error (const std::string msg, const std::string origin=empty) const |
virtual void | Error (std::ostream &msg, const std::string &origin=empty) const |
virtual void | Fatal (const char *msg, const char *origin="") const |
virtual void | Fatal (const std::string &msg, const std::string &origin=empty) const |
virtual void | Fatal (std::ostream &msg, const std::string &origin=empty) const |
![]() | |
virtual void | LoadState () |
Static Protected Member Functions | |
static auto | make_unique (BioGears &bg) -> std::unique_ptr< AnesthesiaMachine > |
Private Member Functions | |
void | CalculateSourceStatus () |
Checks the status of the oxygen source. More... | |
void | CalculateEquipmentLeak () |
Scales the resistance of anesthesia machine equipment in the presence of a leak. More... | |
void | SetConnection () |
Initializes gas volumes and volume fractions supplied by the anesthesia machine depending on the airway mode. More... | |
void | CalculateValveResistances () |
Valve resistance calculation. More... | |
void | CalculateVentilator () |
Calculates ventilator pressure. More... | |
void | CalculateGasSource () |
Updates the volume fractions for the gas inlet node. More... | |
void | CalculateCyclePhase () |
Calculates respiration cycle. More... | |
void | CheckReliefValve () |
Checks Relief Valve Pressure. More... | |
Friends | |
class | BioGearsEngineTest |
Additional Inherited Members | |
![]() | |
static const std::string | empty |
static const char * | empty_cStr |
Detailed Description
Generic anesthesia machine for positive pressure ventilation.
Constructor & Destructor Documentation
|
protected |
|
virtual |
Member Function Documentation
|
private |
Calculates respiration cycle.
The inspiratory and expiratory phase times are calculated based on a pre-set respiration rate and inspiration-expiration ratio parameters. These parameters are selected as input parameters for the anesthesia machine configurations.
|
private |
Scales the resistance of anesthesia machine equipment in the presence of a leak.
The resistance of the mask, tube, and y piece are scaled based on the presence and severity of a leak. This will influence the circuit analyis and will effect the flow and gas mixture provided by the anesthesia machine. This occurs during preprocess.
- Error:
- Error: Invalid Airway Mode Encountered in Compute Equipment Leak function
|
private |
Updates the volume fractions for the gas inlet node.
The final step of the anesthesia machine preprocess is to update the volume fractions for the gas inlet node. The gas mixture is determined based on the right and left chamber activity and specified substances and the oxygen percent setting on the anesthesia machine. The oxygen source (bottle and wall) are checked to ensure no equipment failures exist. The volume fractions are adjusted according to gas composition, the sources, and any failures present. All of the gases enter the anesthesia machine from a single source. The volume fractions of vapor (two vaporizor chambers) and oxygen can be specified. If the sum of the specified fractions is greater than one an error is logged and all substance volume fractions are scaled according the specified proportions. If the sum of the fractions specified is less than one then the remaining will be either nitrogen or the ambient gas substance, depending on whether nitrogen or air is specified as the primary gas.
- Todo:
- put these messages into a verbose for debugging
- Todo:
- loop over all ambient substances and set each volume fraction
void biogears::AnesthesiaMachine::CalculateScrubber | ( | ) |
Calculates the carbon dioxide removed by the scrubber.
Calculates the amount of carbon dioxide removed from the anesthesia machine by the scrubber. If a soda lime failure is present, the full amount of carbon dioxide is not removed. The amount removed is dependent on the severity of the failure. The substance volume in the scrubber node is decremented based on the amount of carbon dioxide removed. This function occurs during anesthesia machine preprocess.
|
private |
Checks the status of the oxygen source.
Checks the status of the oxygen source. If an oxygen bottle is in use, ensures that the bottle still has oxygen. If the oxygen bottle no longer has oxygen, then an event is sent to the log notifying the user.
- Event:
- AnesthesiaMachine: Oxygen bottle 1 is exhausted. There is no longer any oxygen to provide via the anesthesia machine.
- Event:
- AnesthesiaMachine: Oxygen bottle 2 is exhausted. There is no longer any oxygen to provide via the anesthesia machine.
|
private |
Valve resistance calculation.
The method checks for the breathing cycle and sets the inspiratory or expiratory valves as open or closed by adjusting the corresponding valve resistances. The method also changes valve resistances to simulate equipment failures that correspond to valve leak and obstructions
|
private |
Calculates ventilator pressure.
The Anesthesia machine employs pressure-control ventilation mode. This method calculates the control ventilator pressure that drives the gas flow in the breathing circle. During inspiration, the ventilator pressure is set to pre-defined constant value to serve as an input pressure source. This causes gas to flow into the inspiratory limb path. The pressure is dropped to much low pressure during the expiration phase to allow gas return to the ventilator.
|
private |
Checks Relief Valve Pressure.
Assigns relief valve pressure as a pressure source based on the pressure setting and checks if the status of the relief valve is open or closed.
- Event:
- AnesthesiaMachine: Relief Valve is active. The pressure setting has been exceeded.
|
inlineoverridevirtual |
Reimplemented from biogears::SEAnesthesiaMachine.
|
overridevirtual |
Reimplemented from biogears::SEAnesthesiaMachine.
|
inlineoverridevirtual |
Reimplemented from biogears::SEAnesthesiaMachine.
|
overridevirtual |
Initializes system properties to valid homeostatic values.
Reimplemented from biogears::BioGearsSystem.
|
overridevirtual |
Removes the connection to the patient.
If the mask is on or the tube is connected, it is removed and the airway mode is set to free. The action is then removed from the action manager.
Reimplemented from biogears::SEAnesthesiaMachine.
|
virtual |
|
staticprotected |
|
overridevirtual |
Anesthesia machine postprocess function.
The substance volumes and the volume fractions are updated for all of the nodes in the anesthesia machine circuit during post process. The ventilator volumes are updated based on the previously calculated nodal analysis.
Implements biogears::BioGearsSystem.
|
overridevirtual |
Anesthesia machine preprocess function.
Checks the anesthesia machine settings to ensure all are within the acceptable ranges. Processes all equipment failures. Verifies the oxygen source. Processes any failures with the oxygen source. Calculates the gas inlet volume fractions based on equipment failures and gas sources.
Implements biogears::BioGearsSystem.
|
overridevirtual |
Anesthesia machine process function.
The current BioGears implementation has no specific process functionality for the anesthesia machine. Anesthesia machine processing is currently done in the Respiratory System with the combined circuit methodology.
Implements biogears::BioGearsSystem.
|
overridevirtual |
Connect to the patient via the ventilator mask, an endotracheal tube, or no connection.
- Parameters
-
enumAnesthesiaMachineConnection Connectoin type : Mask, tube, or off
If the enum is set to mask, then the mask is applied to the face If the enum is set to tube, then the machine is connected to the tube If the enum is set to off, the airway mode is set to free.
Reimplemented from biogears::SEAnesthesiaMachine.
|
private |
Initializes gas volumes and volume fractions supplied by the anesthesia machine depending on the airway mode.
The gas volumes and volume fractions are initialized and updated based on the airway mode (mask, free, or tube) and the volume associated with each airway mode.
|
overrideprotectedvirtual |
Initializes parameters for the anesthesia machine class.
Initializes member variables and system level values on the common data model.
Implements biogears::BioGearsSystem.
|
overridevirtual |
Reimplemented from biogears::SEAnesthesiaMachine.
|
inlinestatic |
|
inlinestatic |
|
overridevirtual |
Reimplemented from biogears::SEAnesthesiaMachine.
|
protectedvirtual |
Friends And Related Function Documentation
|
friend |
Member Data Documentation
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |