Commit d9ba07dd authored by Rachel Clipp's avatar Rachel Clipp
Browse files

Added an event for cardiovascular collapse and it's trigger in the cardiovascular class.

parent 6ba4ab2e
......@@ -59,6 +59,9 @@ void SEEventManager::SetEvent(eEvent type, bool active, const SEScalarTime& time
case eEvent::CardiogenicShock:
m_ss << " Patient has Cardiogenic Shock";
break;
case eEvent::CardiovascularCollapse:
m_ss << " Patient has low blood pressure and the vasculature has collapsed";
break;
case eEvent::CriticalBrainOxygenDeficit:
m_ss << " Oxygen tension in the brain is critically low";
break;
......
......@@ -14,42 +14,43 @@ enum class eEvent
BrainOxygenDeficit = 4,
CardiacArrest = 5,
CardiogenicShock = 6,
CriticalBrainOxygenDeficit = 7,
Dehydration = 8,
Diuresis = 9,
Fasciculation = 10,
Fatigue = 11,
FunctionalIncontinence = 12,
Hypercapnia = 13,
Hyperglycemia = 14,
Hyperthermia = 15,
Hypoglycemia = 16,
Hypothermia = 17,
Hypoxia = 18,
HypovolemicShock = 19,
IntracranialHypertension = 20,
IntracranialHypotension = 21,
IrreversibleState = 22,
Ketoacidosis = 23,
LacticAcidosis = 24,
MaximumPulmonaryVentilationRate = 25,
MetabolicAcidosis = 26,
MetabolicAlkalosis = 27,
ModerateHyperoxemia = 28,
ModerateHypocapnia = 29,
MyocardiumOxygenDeficit = 30,
Natriuresis = 31,
NutritionDepleted = 32,
RenalHypoperfusion = 33,
RespiratoryAcidosis = 34,
RespiratoryAlkalosis = 35,
SevereHyperoxemia = 36,
SevereHypocapnia = 37,
StartOfCardiacCycle = 38,
StartOfExhale = 39,
StartOfInhale = 40,
Tachycardia = 41,
Tachypnea = 42,
CardiovascularCollapse = 7,
CriticalBrainOxygenDeficit = 8,
Dehydration = 9,
Diuresis = 10,
Fasciculation = 11,
Fatigue = 12,
FunctionalIncontinence = 13,
Hypercapnia = 14,
Hyperglycemia = 15,
Hyperthermia = 16,
Hypoglycemia = 17,
Hypothermia = 18,
Hypoxia = 19,
HypovolemicShock = 20,
IntracranialHypertension = 21,
IntracranialHypotension = 22,
IrreversibleState = 23,
Ketoacidosis = 24,
LacticAcidosis = 25,
MaximumPulmonaryVentilationRate = 26,
MetabolicAcidosis = 27,
MetabolicAlkalosis = 28,
ModerateHyperoxemia = 29,
ModerateHypocapnia = 30,
MyocardiumOxygenDeficit = 31,
Natriuresis = 32,
NutritionDepleted = 33,
RenalHypoperfusion = 34,
RespiratoryAcidosis = 35,
RespiratoryAlkalosis = 36,
SevereHyperoxemia = 37,
SevereHypocapnia = 38,
StartOfCardiacCycle = 39,
StartOfExhale = 40,
StartOfInhale = 41,
Tachycardia = 42,
Tachypnea = 43,
// Equipment
AnesthesiaMachineOxygenBottleOneExhausted = 1000,
......
......@@ -771,8 +771,11 @@ void Cardiovascular::CalculateVitalSigns()
if (GetMeanArterialPressure().GetValue(PressureUnit::mmHg) <= 20)
{
m_data.GetEvents().SetEvent(eEvent::IrreversibleState, true, m_data.GetSimulationTime());
Fatal("Blood Pressure has fallen too low to continue circulation, the engine is now in an irreversible state.");
m_data.GetEvents().SetEvent(eEvent::CardiovascularCollapse, true, m_data.GetSimulationTime());
}
else
{
m_data.GetEvents().SetEvent(eEvent::CardiovascularCollapse, false, m_data.GetSimulationTime());
}
//Check for cardiogenic shock
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment