Running combat multitrauma showcase outside of explorer

Hi, I’d like to run the combat multitrauma showcase from the Pulse Explorer in my own program. Is all that is required is to load the Soldier@0s.json state (i.e., are the injuries already part of the state)? Or do I have to induce the injuries separately somehow?

Soldier@0s is the state saved off at time 0
Basically we save the Pulse state once the engine is stabilized after configuring to be the patient/Soldier.json specification

The list of actions for our the multitrauma showcase is located here
https://gitlab.kitware.com/physiology/engine/-/blob/master/test/scenarios/showcase/CombatMultitrauma.json#L123

You will need to provide these actions to pulse as your application runs.

Ok, that makes sense. Does Pulse Explorer have its own handler for this json file, or is it part of the engine? I’m wondering if there is some existing code I can leverage or reference.

Oh I see, this is a scenario file. Yeah, I don’t want to run that, because I want to control the interventions. I can manually apply the insults.

Pulse is dynamic, so I have the actions attached to buttons
Use the scenario to give you a basis on how to construct your actions

The explorer uses Qt so this is where I set up everything in the Explorer
https://gitlab.kitware.com/physiology/explorer/-/blob/master/showcases/MultiTraumaShowcaseWidget.cxx

1 Like

Another good resource for how to apply the actions yourself is the SDK: https://gitlab.kitware.com/physiology/engine/-/tree/master/sdk

Like the Tension Pneumothorax example that shows how to apply the pneumothorax and treat it with a needle decompression: https://gitlab.kitware.com/physiology/engine/-/blob/master/sdk/howto/cpp/HowTo-TensionPneumothorax.cpp

1 Like

Is it possible to create a scenario file that includes the desired insults (but nothing else) and then continue advancing time and applying additional effects dynamically? I’d just like a way to control the initial setup from a config file, as opposed to hard-coding it programmatically.

Sounds like you want to create your own state file

You can call the SaveState method at anytime.

So you can use the SDK HowTo files to setup your patient, add actions, then save a state.

Then load that state up in your application

1 Like

I just created a branch and pushed up an SDK example that shows how to create a state file that includes desired insults (CreateStates function). Then load that state file and provide interventions (LoadStates funtion).
https://gitlab.kitware.com/physiology/engine/-/blob/feature/multitrauma_how_to/sdk/howto/cpp/HowTo-CombatMultitrauma.cpp

This follows the Combat Multitrauma showcase scenario, but you can do it with whatever patient definition, actions, and conditions you would like.

1 Like

You might also look at this C# HowTo
It has a loop used to generate patient states to generate a state set that can be selectively loaded by an application. (i.e. you want to be able to load a state that has been bleeding for 2min or 7min depending on what is happening in the overall system using Pulse)

https://gitlab.kitware.com/physiology/engine/-/blob/2.x/sdk/howto/csharp/HowTo_PatientStates.cs

Privacy Notice