Substance Of AnesthesiaMachine

I want to simulate an anesthesia procedure, so I’m using the Pulse engine’s anesthesia machine, but it doesn’t provide an interface for administering anesthetic drugs. I noticed that the previous LeftChamber might have been used for drug settings, but it’s also no longer available. Can I inject drugs into the patient through the anesthesia machine, or do I need to implement a separate drug pathway to do so?

Different drugs require different pathways for administration, depending on the intended delivery route.

To administer anesthetic gases like Desflurane via the anesthesia machine, you can configure it in the left or right chamber. I’ve added an example in the HowTo-AnesthesiaMachine.cpp file here (currently on a feature branch, but it will eventually be available in the stable branch). The code snippet is as follows:

const SESubstance* Desflurane = pe->GetSubstanceManager().GetSubstance("Desflurane");
config.GetLeftChamber().SetSubstance(*Desflurane);
config.GetLeftChamber().GetSubstanceFraction().SetValue(0.06);

For intravenous drug administration, you can use a SESubstanceBolus action. There’s an example of this for Succinylcholine in the same file here. The relevant code looks like this:

const SESubstance* succs = pe->GetSubstanceManager().GetSubstance("Succinylcholine");
SESubstanceBolus bolus(*succs); bolus.GetConcentration().SetValue(4820, MassPerVolumeUnit::ug_Per_mL);
bolus.GetDose().SetValue(20, VolumeUnit::mL);
bolus.SetAdminRoute(eSubstanceAdministration_Route::Intravenous);
pe->ProcessAction(bolus);

Thank you for your reply. I downloaded the source code version 4.2.0, and I found that the GetLeftChamber interface has been commented out. Additionally, there is no method to call it in the SEAnesthesiaMachine file. Do I need to upgrade to a newer version to use this feature?


Sure, I will update it when a stable version is available. Thanks again for your response.

Looks like we need to update the C# API for the anesthesia machine…

I will see if I can get that in asap

I tried to open the commented-out code related to Chamber and found that the SESubstance class is missing. It seems that more code modifications are required. :sob:

The integration branch has this fixed now

I’ll sync the code when I have time. Thank you very much!