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

Breathing - Add cyanosis diagnose #99

Merged
merged 32 commits into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ba3ec71
First commit
MiszczuZPolski Apr 25, 2022
9af2a9e
Log update
MiszczuZPolski Apr 25, 2022
0c8d570
Update stringtable.xml
MiszczuZPolski Apr 25, 2022
3f035ec
Update XEH_PREP.hpp
MiszczuZPolski Apr 25, 2022
b02b4a1
fix
MiszczuZPolski Apr 25, 2022
26323a9
fix
MiszczuZPolski Apr 25, 2022
b73554e
ITS WORKING
MiszczuZPolski Apr 25, 2022
7ecae71
Message improvement
MiszczuZPolski Apr 25, 2022
0ceb8ba
adjusting SpO2 level to defaulf dieValue (65)
MiszczuZPolski Apr 25, 2022
ff8f01d
Settings improvement
MiszczuZPolski Apr 26, 2022
1fe0885
little change
MiszczuZPolski Apr 26, 2022
9649d2a
Update stringtable.xml
MiszczuZPolski Apr 26, 2022
a7e2593
Add medical level for action
MiszczuZPolski Apr 26, 2022
e647e8b
improvement
MiszczuZPolski Apr 27, 2022
6d96c71
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
4690f1c
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
d1f657a
Update addons/breathing/functions/fnc_treatmentAdvanced_CyanosisLocal…
Tomcat-SG May 9, 2022
a1d7cda
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
4570aaf
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
7d1f4ab
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
308e80c
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
2469a6e
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
17a5322
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
c59abb0
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
1740cea
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
fa7760d
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
06845dc
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
f8c7472
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
cbc6d1a
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
b301a2d
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
bf3b8c6
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
13f1535
Update addons/breathing/stringtable.xml
Tomcat-SG May 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions addons/breathing/ACE_Medical_Treatment_Actions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,14 @@ class ACE_Medical_Treatment_Actions {
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon"};
};
class CheckCyanosis: CheckPulse{
displayName = CSTRING(CheckCyanosis_Name);
displayNameProgress = CSTRING(CheckCyanosis_Progress);
treatmentTime = 3;
allowedSelections[] = {"Head", "LeftArm", "RightArm"};
allowSelfTreatment = 1;
medicRequired = QGVAR(medLvl_Cyanosis);
condition = QGVAR(enableCyanosis);
callbackSuccess = QFUNC(treatmentAdvanced_Cyanosis);
};
};
2 changes: 2 additions & 0 deletions addons/breathing/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ PREP(hasStableVitals);
PREP(init);
PREP(treatmentAdvanced_chestSeal);
PREP(treatmentAdvanced_chestSealLocal);
PREP(treatmentAdvanced_Cyanosis);
PREP(treatmentAdvanced_CyanosisLocal);
PREP(treatmentAdvanced_hemopneumothorax);
PREP(treatmentAdvanced_hemopneumothoraxLocal);
PREP(treatmentAdvanced_pulseoximeter);
Expand Down
1 change: 1 addition & 0 deletions addons/breathing/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
["handleBreathing", {_this call FUNC(handleBreathing)}] call CBA_fnc_addEventHandler;
["treatmentHemopneumothorax", {_this call FUNC(treatmentAdvanced_hemopneumothoraxLocal)}] call CBA_fnc_addEventHandler;
["treatmentTensionpneumothorax", {_this call FUNC(treatmentAdvanced_tensionpneumothoraxLocal)}] call CBA_fnc_addEventHandler;
["treatmentCyanosis", {_this call FUNC(treatmentAdvanced_CyanosisLocal)}] call CBA_fnc_addEventHandler;

["ace_medical_woundReceived",{_this call FUNC(handlePulmoHit);}] call CBA_fnc_addEventHandler;

50 changes: 50 additions & 0 deletions addons/breathing/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,56 @@ PREP_RECOMPILE_END;
true
] call CBA_Settings_fnc_init;

//Enables cyanosis diagnose
[
QGVAR(enableCyanosis),
"CHECKBOX",
[LLSTRING(SETTING_Cyanosis), LLSTRING(SETTING_Cyanosis_DESC)],
CBA_SETTINGS_CAT,
[true],
true
] call CBA_Settings_fnc_init;

//Settable list for checking Cyanosis per medical class
[
QGVAR(medLvl_Cyanosis),
"LIST",
[LLSTRING(CYANOSIS_TREATMENT_LEVEL), LLSTRING(CYANOSIS_TREATMENT_LEVEL_DESCRIPTION)],
CBA_SETTINGS_CAT,
[[0, 1, 2], ["Anyone", "Medics", "Doctors"], 1],
true
] call CBA_settings_fnc_init;

//Slight level for cyanosis
[
QGVAR(slightValue),
"SLIDER",
[LLSTRING(SETTING_slightValue), LLSTRING(SETTING_slightValue_DESC)],
CBA_SETTINGS_CAT,
[0, 100, 90, 1],
true
] call CBA_Settings_fnc_init;

//Mild level for cyanosis
[
QGVAR(mildValue),
"SLIDER",
[LLSTRING(SETTING_mildValue), LLSTRING(SETTING_mildValue_DESC)],
CBA_SETTINGS_CAT,
[0, 100, 75, 1],
true
] call CBA_Settings_fnc_init;

//Severe level for cyanosis
[
QGVAR(severeValue),
"SLIDER",
[LLSTRING(SETTING_severeValue), LLSTRING(SETTING_severeValue_DESC)],
CBA_SETTINGS_CAT,
[0, 100, 66, 1],
true
] call CBA_Settings_fnc_init;

// sound volume for Stethoscope
/*
[
Expand Down
27 changes: 27 additions & 0 deletions addons/breathing/functions/fnc_treatmentAdvanced_Cyanosis.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include "script_component.hpp"
/*
* Author: MiszczuZPolski
* Checks the cyanosis level of the patient.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
*
* Return Value:
* None
*
* Example:
* call kat_breathing_fnc_checkCyanosis
*
* Public: No
*/

params ["_player", "_target"];

if (local _target) then {
["treatmentCyanosis", [_player, _target]] call CBA_fnc_localEvent;
} else {
["treatmentCyanosis", [_player, _target], _target] call CBA_fnc_targetEvent;
};

true;
49 changes: 49 additions & 0 deletions addons/breathing/functions/fnc_treatmentAdvanced_CyanosisLocal.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#include "script_component.hpp"
/*
* Author: MiszczuZPolski
* Local callback for checking the cyanosis level of a patient.
*
* Arguments:
* 0: Medic <OBJECT>
* 1: Patient <OBJECT>
*
* Return Value:
* None
*
* Example:
* call kat_breathing_fnc_checkCyanosisLocal
*
* Public: No
*/

params ["_player", "_target"];

private _spO2 = 0;

if (alive _target) then {
_spO2 = _patient getVariable ["KAT_medical_airwayStatus", 100];
};

private _messageCyanosis = LLSTRING(CyanosisStatus_N);
private _spO2Output = LSTRING(CyanosisStatus_N);

if (_spO2 < 100) then {
if (_spO2 < 100 && _spO2 >= GVAR(slightValue)) then {
_spO2Output = LSTRING(CyanosisStatus_Slight);
_messageCyanosis = LLSTRING(CyanosisStatus_Slight);
};
if (_spO2 < GVAR(slightValue) && _spO2 >= GVAR(mildValue)) then {
_spO2Output = LSTRING(CyanosisStatus_Mild);
_messageCyanosis = LLSTRING(CyanosisStatus_Mild);
};
if (_spO2 < GVAR(mildValue) && _spO2 >= GVAR(severeValue)) then {
_spO2Output = LSTRING(CyanosisStatus_Severe);
_messageCyanosis = LLSTRING(CyanosisStatus_Severe);
};

};

private _message = format ["%1",_messageCyanosis];
[_message, 2, _player] call ace_common_fnc_displayTextStructured;

[_target, "quick_view", LSTRING(CheckCyanosis_Log), [_spO2Output]] call ace_medical_treatment_fnc_addToLog;
85 changes: 85 additions & 0 deletions addons/breathing/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -752,5 +752,90 @@
<Italian>Valore di SpO2 sotto il quale causa la perdita di coscienza</Italian>
<Japanese>SpO2(血中酸素濃度)が設定した値を下回ると気絶し、無意識状態に陥ります。</Japanese>
</Key>
<Key ID="STR_kat_breathing_CheckCyanosis_Name">
<English>Check Cyanosis</English>
Tomcat-SG marked this conversation as resolved.
Show resolved Hide resolved
<German>Zyanose überprüfen</German>
<Polish>Sprawdź sinicę</Polish>
</Key>
<Key ID="STR_kat_breathing_CheckCyanosis_Progress">
<English>Checking Cyanosis</English>
Tomcat-SG marked this conversation as resolved.
Show resolved Hide resolved
<German>Zyanose prüfen</German>
<Polish>Sprawdzanie sinicy</Polish>
</Key>
<Key ID="STR_kat_breathing_CheckCyanosis_Log">
<English>Cyanosis Status: %1</English>
<German>Status der Zyanose: %1</German>
<Polish>Status sinicy: %1</Polish>
</Key>
<Key ID="STR_kat_breathing_CyanosisStatus_N">
<English>No Cyanosis</English>
Tomcat-SG marked this conversation as resolved.
Show resolved Hide resolved
<German>Keine Zyanose</German>
<Polish>Brak sinicy</Polish>
</Key>
<Key ID="STR_kat_breathing_CyanosisStatus_Slight">
<English>Slight Cyanosis</English>
Tomcat-SG marked this conversation as resolved.
Show resolved Hide resolved
<German>Leichte Zyanose</German>
<Polish>Lekka sinica</Polish>
</Key>
<Key ID="STR_kat_breathing_CyanosisStatus_Mild">
<English>Mild Cyanosis</English>
Tomcat-SG marked this conversation as resolved.
Show resolved Hide resolved
<German>Mittelschwere Zyanose</German>
<Polish>Umiarkowana sinica</Polish>
</Key>
<Key ID="STR_kat_breathing_CyanosisStatus_Severe">
<English>Severe Cyanosis</English>
Tomcat-SG marked this conversation as resolved.
Show resolved Hide resolved
<German>Schwere Zyanose</German>
<Polish>Ciężka sinica</Polish>
</Key>
<Key ID="STR_kat_breathing_SETTING_Cyanosis">
<English>Enable cyanosis diagnose</English>
Tomcat-SG marked this conversation as resolved.
Show resolved Hide resolved
<German>Zyanose-Diagnose aktivieren</German>
<Polish>Włącz diagnozę sinicy</Polish>
</Key>
<Key ID="STR_kat_breathing_SETTING_Cyanosis_DESC">
<English>Enables cyanosis diagnose</English>
Tomcat-SG marked this conversation as resolved.
Show resolved Hide resolved
<German>Aktiviert die Zyanose-Diagnose</German>
<Polish>Włącza diagnozę sinicy</Polish>
</Key>
<Key ID="STR_kat_breathing_SETTING_slightValue">
<English>Slight cyanosis SpO2 value</English>
Tomcat-SG marked this conversation as resolved.
Show resolved Hide resolved
<German>Leichter Zyanose SpO2-Wert</German>
<Polish>Poziom SpO2 dla lekkiej sinicy</Polish>
</Key>
<Key ID="STR_kat_breathing_SETTING_slightValue_DESC">
<English>Slight cyanosis value - default 90 SpO2</English>
Tomcat-SG marked this conversation as resolved.
Show resolved Hide resolved
<German>Leichte Zyanose - Standardwert 90 SpO2</German>
<Polish>Poziom SpO2 dla lekkiej sinicy - domyślnie 90 SpO2</Polish>
</Key>
<Key ID="STR_kat_breathing_SETTING_mildValue">
<English>Mild cyanosis SpO2 value</English>
Tomcat-SG marked this conversation as resolved.
Show resolved Hide resolved
<German>Mittelschwere Zyanose SpO2-Wert</German>
<Polish>Poziom SpO2 dla umiarkowanej sinicy</Polish>
</Key>
<Key ID="STR_kat_breathing_SETTING_mildValue_DESC">
<English>Mild cyanosis value - default 75 SpO2</English>
Tomcat-SG marked this conversation as resolved.
Show resolved Hide resolved
<German>Mittelschwere Zyanose - Standardwert 75 SpO2</German>
<Polish>Poziom SpO2 dla umiarkowanej sinicy - domyślnie 75 SpO2</Polish>
</Key>
<Key ID="STR_kat_breathing_SETTING_severeValue">
<English>Severe cyanosis SpO2 value</English>
Tomcat-SG marked this conversation as resolved.
Show resolved Hide resolved
<German>Schwere Zyanose SpO2-Wert</German>
<Polish>Poziom SpO2 dla ciężkiej sinicy</Polish>
</Key>
<Key ID="STR_kat_breathing_SETTING_severeValue_DESC">
<English>Severe cyanosis value - default 66 SpO2 \nShould be little bit higher than lethal SpO2 value</English>
Tomcat-SG marked this conversation as resolved.
Show resolved Hide resolved
<German>Schwere Zyanose - Standardwert 66 SpO2 \nSollte etwas höher sein als der tödliche SpO2-Wert</German>
<Polish>Poziom SpO2 dla ciężkiej sinicy - domyślnie 66 SpO2 \nPowinien być minimalnie wyższy niż wartość śmiertelna SpO2</Polish>
</Key>
<Key ID="STR_kat_breathing_CYANOSIS_TREATMENT_LEVEL">
<English>Check Cyanosis Minimum Level</English>
Tomcat-SG marked this conversation as resolved.
Show resolved Hide resolved
<German>Zyanose prüfen Medic Level</German>
<Polish>Minimalny poziom wyszkolenia do sprawdzenia sinicy</Polish>
</Key>
<Key ID="STR_kat_breathing_CYANOSIS_TREATMENT_LEVEL_DESCRIPTION">
<English>The minimum medical level required for someone to be able to check cyanosis.</English>
Tomcat-SG marked this conversation as resolved.
Show resolved Hide resolved
<German>Das Medic Level, das erforderlich ist, damit jemand eine Zyanose feststellen kann.</German>
<Polish>Minimalny poziom wyszkolenia medycznego wymagany, aby ktoś był w stanie sprawdzić sinicę.</Polish>
</Key>
</Package>
</Project>