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 RR Check to checkBreathing #699

Merged
merged 7 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 13 additions & 2 deletions addons/breathing/functions/fnc_checkBreathing.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ params ["_medic", "_patient"];

private _ph = GET_PH(_patient);
private _hr = GET_HEART_RATE(_patient);
private _rr = GET_BREATHING_RATE(_patient);
private _output = "";
private _output_log = "";

private _breathing = LLSTRING(breathing_isNormal);
private _breathing_log = localize ACELSTRING(medical_treatment,Check_Pulse_Normal);
private _breath = "";
private _breathRate = "RR: ";

if ((_patient getVariable [QGVAR(pneumothorax), 0] > 0) || (_patient getVariable [QEGVAR(chemical,airPoisoning), false])) then {
_breathing = LLSTRING(breathing_isShallow);
Expand All @@ -41,9 +43,18 @@ if (_ph < 7.2) then {
};
};

_output = format ["%1%2", _breathing ,_breath];
_output_log = format ["%1%2", _breathing_log, _breath];
if ([_medic] call ACEFUNC(common,isMedic)) then {
_breathRate = format ["%1%2", _breathRate, _rr];
} else {
switch (true) do {
case (_rr > 25): { _breathRate = LLSTRING(breathing_rrRapid); };
case (_rr < 11): { _breathRate = LLSTRING(breathing_rrSlow); };
default { _breathRate = LLSTRING(breathing_rrNormal); };
};
};

_output = format ["%1%2, %3", _breathing ,_breath, _breathRate];
_output_log = format ["%1%2, %3", _breathing_log, _breath, _breathRate];

if (_hr == 0 || !(alive _patient) || (_patient getVariable [QEGVAR(airway,obstruction), false] && !(_patient getVariable [QEGVAR(airway,overstretch), false])) || _patient getVariable [QEGVAR(airway,occluded), false] || _patient getVariable [QGVAR(hemopneumothorax), false] || _patient getVariable [QGVAR(tensionpneumothorax), false]) then {
_output = LLSTRING(breathing_none);
Expand Down
9 changes: 9 additions & 0 deletions addons/breathing/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2490,6 +2490,15 @@
<Italian>Superficiale</Italian>
<Chinesesimp>浅</Chinesesimp>
</Key>
<Key ID="STR_KAT_Breathing_breathing_rrRapid">
<English>RR: Rapid</English>
</Key>
<Key ID="STR_KAT_Breathing_breathing_rrSlow">
<English>RR: Slow</English>
</Key>
<Key ID="STR_KAT_Breathing_breathing_rrNormal">
<English>RR: Normal</English>
</Key>
<Key ID="STR_KAT_Breathing_breathing_none">
<English>Patient is not breathing</English>
<Japanese>患者は呼吸していない</Japanese>
Expand Down
Loading