Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpO2 loss in cardiac arrest is negligible at ~1%/minute, multiplier settings have no effect #632

Open
mrschick opened this issue Oct 26, 2024 · 12 comments · May be fixed by #641
Open

SpO2 loss in cardiac arrest is negligible at ~1%/minute, multiplier settings have no effect #632

mrschick opened this issue Oct 26, 2024 · 12 comments · May be fixed by #641
Assignees
Labels
Milestone

Comments

@mrschick
Copy link

mrschick commented Oct 26, 2024

CBA Settings

CBA Settings All default ACE Medical and KAM settings, except for: `ace_medical_statemachine_fatalInjuriesAI = 2;` for repro purposes

Description:
Since the last update or so, SpO2 loss due to conditions and especially cardiac arrest is only negligible.
Units in CA will start from 97% and only lose at most 1%/minute, making any airway treatment redundant as they will still have enough SpO2 to wake up if recovered from CA within the usual 5-10 minute timeout.

Steps to reproduce:

  1. Place an AI civilian
  2. Shoot it in the chest to immediately trigger cardiac arrest (and possibly a pneumothorax)
  3. Monitor SpO2 with pulse-oximeter or vitals monitor for 5 minutes

Where did the issue occur?

  • Editor (Singleplayer)

Additional information:
Increasing the positive/negative SpO2 multiplier settings appears to have no effect at all.
On a related note, the Airway Zeus Module appears to be broken, on healthy AI it will show 90% SpO2 and modifying the slider won't affect an AI's actual SpO2. Explained by the slider actually modifying PaO2, but I think it would be more intuitive for it to still modify SpO2 via some reversed function.

RPT log file:

@Cplhardcore
Copy link
Contributor

The airway module shows PaO2, not SpO2
In addition, with the vitals update spo2 is calculated with a lot more factors then just ptx/airways, blood volume/heart rate/breathing is all taken into effect

@YetheSamartaka
Copy link
Contributor

Hi. I confirm the issue. SpO2 loss is completely broken. Even with occluded/obstructed airways and full pneumothorax, the SpO2 is negligible and multiplier settings have no effect.

@mrschick
Copy link
Author

The airway module shows PaO2, not SpO2

What do you mean? I don't see any oxygenation settings in the Airways category. Those in the Breathing category all reference SpO2.
Is that documented somewhere?

In addition, with the vitals update spo2 is calculated with a lot more factors then just ptx/airways, blood volume/heart rate/breathing is all taken into effect

What conditions will still cause a drop of oxygenation SpO2 comparable to past versions then? Shouldn't untreated cardiac arrest for multiple minutes have a more pronounced negative effect that will take extra "stable" time to compensate?

@Cplhardcore
Copy link
Contributor

On a related note, the Airway Zeus Module appears to be broken, on healthy AI it will show 90% SpO2 and modifying the slider won't affect an AI's actual SpO2.

Yes, as that module doesn't show SpO2 anymore, it shows PaO2

What conditions will still cause a drop of oxygenation SpO2 comparable to past versions then? Shouldn't untreated cardiac arrest for multiple minutes have a more pronounced negative effect that will take extra "stable" time to compensate?"

https://docs.google.com/document/d/1lpVcD5B0SfGvYc5hnz35jNVvX28lvdHVpacUs7RIXkA/edit?tab=t.0
Take a look through this, this mini guide shows what effects spO2 loss, and how it works in the new vitals simulation

@mrschick
Copy link
Author

Yes, as that module doesn't show SpO2 anymore, it shows PaO2

Ah, good to know. IIRC though I tried changing the slider's value and after reopening it it was still showing the previous state.

Take a look through this, this mini guide shows what effects spO2 loss, and how it works in the new vitals simulation

Neat, I read through it and it answers a lot of questions, especially about the new hypothermia 👍🏻

However, it's still unclear to me how SpO2 could appear entirely unaffected by cardiac arrest for several minutes.

In that condition FiO2 should be 0, leading to a drop of PAO2 and consequently SpO2. Given that "small shifts in PaO2 can result in large shifts in SpO2", one would expect a delayed but significant drop of SpO2 over a few minutes, no?
Otherwise, it renders carrying any airway items or BVMs completely redundant.

@Cplhardcore
Copy link
Contributor

Yes, but by significant you're thinking 40 points, in reality it will be 15-20
Testing showed a pt with a ptx, in CA, and no airways dropped about 20 points over 8 minutes, which is realistic
In return, its not as fast to get back up to stable, which be default is 85, but realistically it should be higher

@mrschick
Copy link
Author

mrschick commented Oct 27, 2024

Yeah, when testing it on a patient in CA and no airways, it takes 8 minutes to only drop from 97 to 80.
Isn't CA IRL likely to cause permanent brain damage after 8 minutes? Would that not coincide with a much larger loss down to 70% in the same timeframe?

Either way, another issue is that we can't customize SpO2 loss back to pre-v3.0 levels because neither kat_breathing_SpO2_MultiplyNegative nor kat_breathing_SpO2_PerfusionMultiplier at high values like 8 appear to affect the 97->80% / 8 minutes observation at all.

I also observed a different behaviour, after ~4m the patient got into VFib at SpO2 91, and it ended up fluctuating between 91 and 92 until it progressed to PEA/Asystole at ~7m, after which it only got down to 90% at ~14 minutes after CA (and imminent death).

@YetheSamartaka
Copy link
Contributor

No multiplier settings are used in the function handling oxygenation...
There is no way to customize it right now. And default values are set in a way that it is unrealistically slow.
Please fix it @mazinskihenry

@mrschick
Copy link
Author

mrschick commented Oct 27, 2024

For extra context, Cplhardcore wrote this on the ACE Discord:

IRL its closer to 4 minutes. and that's at a SPo2 value of 80%, with full death happening at 12 mins
In KAM that value is about doubled, because this is a game and there is no brain damage yet

I would argue that this should match default ACE Medical settings more, to optimize it towards the default 5m CA timeout that most people will use.
Just because "brain damage" is not a simulate-able symptom (yet) doesn't mean that that IRL timeout isn't appropriate for the death timeout in-game.

@Cplhardcore
Copy link
Contributor

5 minutes is way too fast of a timer, and the defaults are just that, defaults, everyone has the option to change the settings based on the units need,

@mrschick
Copy link
Author

Sure, unless the values are unaffected by settings. In which case IMO it's better to have the hard-coded behaviour match what most people are going to use, which is about 5 minutes in my experience.

But that doesn't matter now as the linked PR works to solve the issue 👍🏻

@mrschick
Copy link
Author

mrschick commented Oct 28, 2024

I also observed a different behaviour, after ~4m the patient got into VFib at SpO2 91, and it ended up fluctuating between 91 and 92 until it progressed to PEA/Asystole at ~7m, after which it only got down to 90% at ~14 minutes after CA (and imminent death).

@Cplhardcore I managed to repro this issue quite reliably. In short, it's because breathing rate is not considered by the FIO2 determination.

With the patient in any form of CA (from VTac to Asys), the following appears to happen:
Even with no respiration and a simple PTX (but clear airways), _fio2 is set to its default of 0.21 by the switch at L82.

[0, DEFAULT_FIO2] select ((_unit getVariable [QEGVAR(airway,recovery), false]) || (_unit getVariable [QEGVAR(airway,overstretch), false]))

Which then sets _pALVo2 to a high value of >99 in L92.

That causes the min _pALVo2 command in L95 to not affect the function, which only drops PaO2 to ~70% (given small blood loss)

private _pao2 = (DEFAULT_PAO2 - ((DEFAULT_ECB / ((GET_BODY_FLUID(_unit) select 0) max 100)) * ((_demandVentilation - _actualVentilation) / 120))) min _pALVo2;

Which then always corresponds to an SpO2 of >90 as per the function at:
private _o2Sat = ((_pao2 max 1)^2.7 / ((25 - (((_pH / DEFAULT_PH) - 1) * 150))^2.7 + _pao2^2.7)) min 0.999;

As soon as the airways are obstructed/occluded, _fio2 is reduced, which sets the minimum allowed PaO2 to 1, which allows SpO2 to actually plummet along the sigmoidal function.

YetheSamartaka pushed a commit that referenced this issue Nov 1, 2024
**When merged this pull request will:**
- Applies SpO2 multipliers to PaO2 values
- Fixes issue #632 

### IMPORTANT

- [Development Guidelines](https://ace3.acemod.org/wiki/development/)
are read, understood and applied.
- Title of this PR uses our standard template `Component -
Add|Fix|Improve|Change|Make|Remove {changes}`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants