# Substance Of AnesthesiaMachine

**URL:** https://discourse.kitware.com/t/substance-of-anesthesiamachine/1392
**Category:** Pulse Physiology Engine
**Created:** [November 25, 2024, 3:36am UTC](https://discourse.kitware.com/t/substance-of-anesthesiamachine/1392 "2024-11-25T03:36:57Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![andy](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://discourse.kitware.com/u/andy)
#### Post date: [November 25, 2024, 3:36am UTC](https://discourse.kitware.com/t/substance-of-anesthesiamachine/1392/1 "2024-11-25T03:36:57Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![coolwebb](https://discourse.kitware.com/user_avatar/discourse.kitware.com/coolwebb/32/25_2.png) [@coolwebb](https://discourse.kitware.com/u/coolwebb)
#### Post date: [November 27, 2024, 1:35am UTC](https://discourse.kitware.com/t/substance-of-anesthesiamachine/1392/2 "2024-11-27T01:35:27Z")

</div>

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](https://gitlab.kitware.com/physiology/engine/-/blob/feature/ventilator_updates/src/cpp/howto/HowTo-AnesthesiaMachine.cpp?ref_type=heads#L101) (currently on a feature branch, but it will eventually be available in the stable branch). The code snippet is as follows:

```auto
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](https://gitlab.kitware.com/physiology/engine/-/blame/feature/ventilator_updates/src/cpp/howto/HowTo-AnesthesiaMachine.cpp?ref_type=heads#L122). The relevant code looks like this:

```auto
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);

```

---

<div class="post-metadata">

### Author: ![andy](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://discourse.kitware.com/u/andy)
#### Post date: [November 27, 2024, 10:02am UTC](https://discourse.kitware.com/t/substance-of-anesthesiamachine/1392/3 "2024-11-27T10:02:39Z")

</div>

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?

 ![B0FCB5E5-5111-4759-A3D7-9D0D85943C59](https://discourse.kitware.com/uploads/default/original/2X/3/371f787b6bebb130e9b9ec423f531056a1e77a1f.png)  
 ![739F88FB-9F17-43e9-A720-51AEF60F239C](https://discourse.kitware.com/uploads/default/original/2X/3/3adcff4802e07ce11351dbfcce276966ba5ccab8.png)

---

<div class="post-metadata">

### Author: ![andy](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://discourse.kitware.com/u/andy)
#### Post date: [November 29, 2024, 9:23am UTC](https://discourse.kitware.com/t/substance-of-anesthesiamachine/1392/4 "2024-11-29T09:23:10Z")

</div>

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

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [November 29, 2024, 4:02pm UTC](https://discourse.kitware.com/t/substance-of-anesthesiamachine/1392/5 "2024-11-29T16:02:50Z")

</div>

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

I will see if I can get that in asap

---

<div class="post-metadata">

### Author: ![andy](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://discourse.kitware.com/u/andy)
#### Post date: [December 1, 2024, 2:35am UTC](https://discourse.kitware.com/t/substance-of-anesthesiamachine/1392/6 "2024-12-01T02:35:27Z")

</div>

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. 😭

 ![D9924F23-DC77-455a-BFF9-F69D3CB0A8C7](https://discourse.kitware.com/uploads/default/original/2X/4/4761f3bb3a334ea8cad77ffa3c2eea2aa3c39cbf.png)

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [December 3, 2024, 2:32pm UTC](https://discourse.kitware.com/t/substance-of-anesthesiamachine/1392/7 "2024-12-03T14:32:48Z")

</div>

The integration branch has this fixed now

---

<div class="post-metadata">

### Author: ![andy](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://discourse.kitware.com/u/andy)
#### Post date: [December 4, 2024, 3:41am UTC](https://discourse.kitware.com/t/substance-of-anesthesiamachine/1392/8 "2024-12-04T03:41:06Z")

</div>

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