Adding a new ventilator

Hello!
I’d like to add a new ventilator that should be controlled externally.
I am currently using the Java build, I’d like to do something as follow:
When the “new” ventilator is connected, the engine at every iteration should send a “getPressure” message and the external ventilator will respond with a value.
The engine will then set the retrieved value to the patient as the current ventilators do instead of calculating it from initial values as it does with the already existing ventilators model.

is it possible to do so? should I be using an action or what would be the best way to add the sending request and applying the retrieved data?
my main concern is what part of the engine I should be modifying to adapt it to my needs.
thank you in advance for you help.

It sounds like you’ll probably want to use the MechanicalVentilation action, which allows you to set a specific pressure or flow in the airway. The VentilatorFeedbackLoop example shows how an external pressure can be set in this manner.

1 Like

Hi,
Is there a way to perform these actions directly in Java, or do I need to write some C++ code and then recompile?

1 Like

We have a Java API for Pulse
Here is how to use it with the ventilator

https://gitlab.kitware.com/physiology/engine/-/blob/stable/src/java/com/kitware/pulse/howto/HowTo_MechanicalVentilator.java?ref_type=heads

1 Like