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

Medical - Add Airway Management #8929

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Slatery
Copy link

@Slatery Slatery commented Jun 1, 2022

When merged this pull request will:

  • Adds in airway management to the medical loop
  • Management of a pt's SpO2 levels
  • Check for and manage foreign debris and airway collapse
  • Diagnose and treat Pneumothorax
  • Monitor HR and SpO2 from limbs with a Pulse Oximeter

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

@Slatery Slatery changed the title Airway Management (WIP) Airway Management Jun 1, 2022
@Slatery Slatery changed the title (WIP) Airway Management Medical - Add Airway Management (WIP) Jun 1, 2022
Slatery and others added 4 commits May 4, 2023 14:47
@Slatery Slatery force-pushed the feature/pr/airways branch from dd04c5b to 1ef3a65 Compare May 4, 2023 07:40
@Slatery Slatery changed the title Medical - Add Airway Management (WIP) Medical - Add Airway Management May 4, 2023
Copy link
Member

@BrettMayson BrettMayson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thoughts from a quick first pass.

There is a decent amount of code style to fix up

@@ -44,6 +44,13 @@
#define DEFAULT_HEART_RATE 80
#define DEFAULT_PERIPH_RES 100

// --- Airway
#define DEFAULT_SPO2 100
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see a closer to real life spo2 value personally.

Have it vary a bit over time, tie in with breathing speed, and change with altitude and other conditions.

Never been a huge fan of healthy is always 100%

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should move this idea to a forum post in discord

Comment on lines +53 to +54
[_unit, "blockSprint", QEGVAR(medical,airway), _spo2Level < 95] call EFUNC(common,statusEffect_set);
[_unit, "forceWalk", QEGVAR(medical,airway), _spo2Level < 85] call EFUNC(common,statusEffect_set);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo these should be a little bit lower, but that'd again tie into a potential more realistic spo2 system. Right now this is more of a "how long have they had a lung problem" variable

Comment on lines +59 to +76
if (HAS_PULSE_OXI_APPLIED_ON(_target,_selectionN)) then {
private _spo2 = GET_SPO2(_target);
private _hr = GET_HEART_RATE(_target);
private _spo2Status = format ["HR: %1, SpO2: %2", (round _hr), (round _spo2)];
private _color = [1,1,1,1];
switch (true) do {
case (_spo2 < 80 || {_hr < 30 || _hr > 140}): {
_color = [1,0,0,1];
};
case ((_spo2 > 79 && _spo2 < 87) || {_hr < 40 || _hr > 120}): {
_color = [1, 0.67,0,1];
};
case (_spo2 > 86 && _spo2 < 95): {
_color = [1, 1,0,1];
};
};
_entries pushBack [_spo2Status,_color];
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally not a fan of the entries list. It's good to put it here anyway, but maybe also a little picture UI that shows up when you look at the patient within 3m or something, and is off on the side when the medical menu is open?

Would givee the ability to glance over without opening the menu

Comment on lines +84 to +86
case 1: {_message = "Head tilted to the side"};
case 2: {_message = "Basic airway inserted"};
case 3: {_message = "Advanced airway inserted"};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to stringtables

_entries pushBack [_message, [0.2, 0.2, 1, 1]];
} else {
if (GET_AIRWAY_COLLAPSED(_target)) then {
_entries pushBack ["Airways has collapsed", [1, 0.67, 0, 1]];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stringtables

Comment on lines +143 to +145
if (GET_PNEUMO(_target) && {_selectionN == 1}) then {
_entries pushBack [localize LSTRING(STATUS_HAS_PNUEMOTHORAX), [1, 0, 0, 1]];
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We definitely need a way to diagnose this without just seeing this, stethoscope would be the most familiar for people, but maybe we could also tie into breath sounds? Play a different sound that indicates they are having troubles breathing, maybe coughing too?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sound thing is nice, but normally it is not that easy to say it from the sounds without a stethoscope, but maybe a "Closer look at the chest" would diagnose it, since half of the body is not moving while ex or inhale

) then {
_unit setVariable [VAR_AIRWAY_COLLAPSED, true, true];
_unit setVariable [VAR_AIRWAY_TREATMENT_LVL, 0, true]; // Reset treatment level so we can head tilt again
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should configure your editor to add newlines at the end of files and fix all these up

Suggested change
};
};

Comment on lines +34 to +35
private _spo2 = GET_SPO2(_unit);
if (_spo2 < 80) exitWith { false };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private _spo2 = GET_SPO2(_unit);
if (_spo2 < 80) exitWith { false };
if (GET_SPO2(_unit) < 80) exitWith { false };

Is there a reason this can't work? Existing could possibly also be changed

if (HAS_PULSE_OXI_APPLIED_ON(_target,_selectionN)) then {
private _spo2 = GET_SPO2(_target);
private _hr = GET_HEART_RATE(_target);
private _spo2Status = format ["HR: %1, SpO2: %2", (round _hr), (round _spo2)];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe stringtable

};
if (_selectionN == 0) then {
if (GET_AIRWAY_BLOCKED(_target)) then {
_entries pushBack ["Airways blocked by debris", [1, 0.67, 0, 1]];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stringtable

Comment on lines +84 to +86
case 1: {_message = "Head tilted to the side"};
case 2: {_message = "Basic airway inserted"};
case 3: {_message = "Advanced airway inserted"};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stringtable

_entries pushBack [_message, [0.2, 0.2, 1, 1]];
} else {
if (GET_AIRWAY_COLLAPSED(_target)) then {
_entries pushBack ["Airways has collapsed", [1, 0.67, 0, 1]];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stringtable

_patient setVariable [VAR_PNEUMO, false, true];

[_patient, "ACE_chestSeal"] call FUNC(addToTriageCard);
[_patient, "activity", "Applied chest seal", [[_medic, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stringtable

@@ -0,0 +1,11 @@
#include "script_component.hpp"
params ["_unit","_state"];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function description is missing

Comment on lines +555 to +576
class AirwayAdjunct {
airwayRecoveryLevel = 1;
class HeadTilt{
airwayRecoveryLevel = 1;
};
class BasicAirwayy{
airwayRecoveryLevel = 2;
};
class AdvancedAirway{
airwayRecoveryLevel = 3;
};
};

class ManualBreathing {
airwayRecoveryLevel = 1;
class BVM{
airwayRecoveryLevel = 2; // Just as good as breathing
};
class MouthToMouth{
airwayRecoveryLevel = 0.5;
};
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some spaces in front of the curly brackets

category = "airway";
treatmentLocations = TREATMENT_LOCATIONS_ALL;
allowedSelections[] = {"Head"};
allowSelfTreatment = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I shouldn't be able to tilt my on head (I think this doesn't make any difference)

treatmentLocations = TREATMENT_LOCATIONS_ALL;
allowedSelections[] = {"Head"};
allowSelfTreatment = 0;
medicRequired = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a setting, since there is a little bit of skill required

icon = "";
category = "examine";
treatmentLocations = TREATMENT_LOCATIONS_ALL;
allowedSelections[] = {"Head", "LeftArm", "RightArm", "LeftLeg", "RightLeg"};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't add a pulseoxi on the head, we can discuss limbs, but head is not possible (only earlobe, but that is absolutely Shit)

@BrettMayson BrettMayson mentioned this pull request Sep 4, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants