Skip to content
This repository was archived by the owner on Jan 25, 2024. It is now read-only.

Commit 3570769

Browse files
committed
Updated how to with new MCIS codes for hemorrhage
1 parent 599f3ee commit 3570769

7 files changed

+333
-40
lines changed

library/src/BioGearsEngineHowTo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ int main()
2626
//HowToAirwayObstruction();
2727
//HowToAnesthesiaMachine();
2828
//HowToAsthmaAttack();
29-
HowToBrainInjury();
29+
//HowToBrainInjury();
3030
//HowToBolusDrug();
3131
//HowToConsumeNutrients();
3232
//HowToCOPD();
@@ -35,7 +35,7 @@ int main()
3535
//HowToExercise();
3636
//HowToHemorrhage();
3737
//HowToLobarPneumonia();
38-
// HowToMechanicalVentilation();
38+
HowToMechanicalVentilation();
3939
//HowToPulmonaryFunctionTest();
4040
//HowToSmoke();
4141
//HowToTensionPneumothorax();

library/src/HowTo-AnesthesiaMachine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void HowToAnesthesiaMachine()
126126
SESubstanceBolus bolus(*succs);
127127
bolus.GetConcentration().SetValue(4820, MassPerVolumeUnit::ug_Per_mL);
128128
bolus.GetDose().SetValue(20, VolumeUnit::mL);
129-
bolus.SetAdminRoute(CDM::enumSubstanceAdministration::Intravenous);
129+
bolus.SetAdminRoute(CDM::enumBolusAdministration::Intravenous);
130130
bg->ProcessAction(bolus);
131131

132132
bg->GetLogger()->Info("Giving the patient Succinylcholine to test machine-driven ventilation.");

library/src/HowTo-BolusDrug.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ void HowToBolusDrug()
8585
SESubstanceBolus bolus(*succs);
8686
bolus.GetConcentration().SetValue(4820,MassPerVolumeUnit::ug_Per_mL);
8787
bolus.GetDose().SetValue(20,VolumeUnit::mL);
88-
bolus.SetAdminRoute(CDM::enumSubstanceAdministration::Intravenous);
88+
bolus.SetAdminRoute(CDM::enumBolusAdministration::Intravenous);
89+
// BioGears also supports Intramuscular as an admin route as well
8990
bg->ProcessAction(bolus);
9091
bg->GetLogger()->Info("Giving the patient Succinylcholine.");
9192

library/src/HowTo-Hemorrhage.cpp

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,25 @@ void HowToHemorrhage()
7979
bg->GetLogger()->Info(std::stringstream() <<"Heart Rate : " << bg->GetCardiovascularSystem()->GetHeartRate(FrequencyUnit::Per_min) << "bpm");;
8080

8181
// Hemorrhage Starts - instantiate a hemorrhage action and have the engine process it
82-
SEHemorrhage hemorrhageLeg;
83-
hemorrhageLeg.SetCompartment(BGE::VascularCompartment::RightLeg);//the location of the hemorrhage
84-
hemorrhageLeg.GetRate().SetValue(250,VolumePerTimeUnit::mL_Per_min);//the rate of hemorrhage
85-
bg->ProcessAction(hemorrhageLeg);
82+
/*MCIS Code Brief :
83+
Digit 1 = Severity
84+
Digit 2 = Body Region(1 = Head, 2 = Torso, 3 = Arms, 4 = Legs, 5 = Multiple(not currently supported)
85+
Digit 3 = Subregion(not requied for arms or legs)
86+
In Head : 6 = Vessels
87+
In Torso : 6 = Vessels, 7 = Chest, 8 = Abdomen, 9 = Pelvis(not currently supported)
88+
Digit 4
89+
In Vessels : 1 = Intracranial, 3 - 5 = Carotid / Thoracic / Abdominal arteries(all currently removed from aorta compartment), 6 = VenaCava
90+
In Chest : 1 = Lungs, 2 = Heart In Abdomen : 1 = Liver, 2 = Spleen, 3 = Pancreas(Splanchnic), 4 = Kidney, 5 = SmallIntestine, 6 = LargeIntestine
91+
Digit 5 : Wound information too specific for BioGears(any number fine, 0 used here)
92+
93+
Stopping a hemorrhage requires Severity = 0 and remainder of code consistent with original wound*/
94+
95+
SEHemorrhage hemorrhageAbdominal;
96+
std::vector<unsigned int> hemorrhageStart = {4,2,6,5,0 };
97+
hemorrhageAbdominal.SetMCIS(hemorrhageStart);
98+
hemorrhageAbdominal.ProcessMCIS(); //Extracts the injury severity and injury location from the mcis code
99+
100+
bg->ProcessAction(hemorrhageAbdominal);
86101

87102
// Advance some time to let the body bleed out a bit
88103
tracker.AdvanceModelTime(300);
@@ -97,9 +112,10 @@ void HowToHemorrhage()
97112
bg->GetLogger()->Info(std::stringstream() <<"Heart Rate : " << bg->GetCardiovascularSystem()->GetHeartRate(FrequencyUnit::Per_min) << "bpm");;
98113

99114
// Hemorrhage is sealed
100-
hemorrhageLeg.SetCompartment(BGE::VascularCompartment::RightLeg);//location of hemorrhage
101-
hemorrhageLeg.GetRate().SetValue(0,VolumePerTimeUnit::mL_Per_min);//rate is set to 0 to close the bleed
102-
bg->ProcessAction(hemorrhageLeg);
115+
std::vector<unsigned int> hemorrhageEnd = { 0,2,6,5,0 };
116+
hemorrhageAbdominal.SetMCIS(hemorrhageEnd);
117+
hemorrhageAbdominal.ProcessMCIS();
118+
bg->ProcessAction(hemorrhageAbdominal);
103119

104120

105121
// Advance some time while the medic gets the drugs ready

0 commit comments

Comments
 (0)