# Running combat multitrauma showcase outside of explorer

**URL:** https://discourse.kitware.com/t/running-combat-multitrauma-showcase-outside-of-explorer/431
**Category:** Pulse Physiology Engine
**Created:** [March 23, 2020, 1:39pm UTC](https://discourse.kitware.com/t/running-combat-multitrauma-showcase-outside-of-explorer/431 "2020-03-23T13:39:47Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![bob.marinier](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/b/7ab992/32.png) [@bob.marinier](https://discourse.kitware.com/u/bob.marinier)
#### Post date: [March 23, 2020, 1:39pm UTC](https://discourse.kitware.com/t/running-combat-multitrauma-showcase-outside-of-explorer/431/1 "2020-03-23T13:39:47Z")

</div>

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?

---

<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: [March 23, 2020, 1:45pm UTC](https://discourse.kitware.com/t/running-combat-multitrauma-showcase-outside-of-explorer/431/2 "2020-03-23T13:45:02Z")

</div>

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](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.

---

<div class="post-metadata">

### Author: ![bob.marinier](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/b/7ab992/32.png) [@bob.marinier](https://discourse.kitware.com/u/bob.marinier)
#### Post date: [March 23, 2020, 1:48pm UTC](https://discourse.kitware.com/t/running-combat-multitrauma-showcase-outside-of-explorer/431/3 "2020-03-23T13:48:13Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![bob.marinier](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/b/7ab992/32.png) [@bob.marinier](https://discourse.kitware.com/u/bob.marinier)
#### Post date: [March 23, 2020, 1:51pm UTC](https://discourse.kitware.com/t/running-combat-multitrauma-showcase-outside-of-explorer/431/4 "2020-03-23T13:51:36Z")

</div>

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.

---

<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: [March 23, 2020, 1:54pm UTC](https://discourse.kitware.com/t/running-combat-multitrauma-showcase-outside-of-explorer/431/5 "2020-03-23T13:54:51Z")

</div>

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](https://gitlab.kitware.com/physiology/explorer/-/blob/master/showcases/MultiTraumaShowcaseWidget.cxx)

---

<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: [March 23, 2020, 2:18pm UTC](https://discourse.kitware.com/t/running-combat-multitrauma-showcase-outside-of-explorer/431/6 "2020-03-23T14:18:31Z")

</div>

Another good resource for how to apply the actions yourself is the SDK: [https://gitlab.kitware.com/physiology/engine/-/tree/master/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](https://gitlab.kitware.com/physiology/engine/-/blob/master/sdk/howto/cpp/HowTo-TensionPneumothorax.cpp)

---

<div class="post-metadata">

### Author: ![bob.marinier](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/b/7ab992/32.png) [@bob.marinier](https://discourse.kitware.com/u/bob.marinier)
#### Post date: [March 23, 2020, 2:27pm UTC](https://discourse.kitware.com/t/running-combat-multitrauma-showcase-outside-of-explorer/431/7 "2020-03-23T14:27:24Z")

</div>

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.

---

<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: [March 23, 2020, 2:33pm UTC](https://discourse.kitware.com/t/running-combat-multitrauma-showcase-outside-of-explorer/431/8 "2020-03-23T14:33:18Z")

</div>

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

---

<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: [March 23, 2020, 8:12pm UTC](https://discourse.kitware.com/t/running-combat-multitrauma-showcase-outside-of-explorer/431/9 "2020-03-23T20:12:20Z")

</div>

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](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.

---

<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: [March 24, 2020, 3:45pm UTC](https://discourse.kitware.com/t/running-combat-multitrauma-showcase-outside-of-explorer/431/10 "2020-03-24T15:45:02Z")

</div>

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](https://gitlab.kitware.com/physiology/engine/-/blob/2.x/sdk/howto/csharp/HowTo_PatientStates.cs)
