2015-02-23 19:35:36 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Local callback for checking the pulse of a patient
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The medic <OBJECT>
|
|
|
|
* 1: The patient <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2015-08-22 14:25:10 +00:00
|
|
|
* None
|
2015-02-23 19:35:36 +00:00
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [bob, kevin] call ACE_medical_fnc_actionCheckPulseLocal
|
|
|
|
*
|
2015-02-23 19:35:36 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-29 21:49:58 +00:00
|
|
|
params ["_caller", "_unit", "_selectionName"];
|
2015-02-23 19:35:36 +00:00
|
|
|
|
2016-06-13 08:55:19 +00:00
|
|
|
private _heartRate = _unit getVariable [QGVAR(heartRate), 80];
|
2015-02-23 19:35:36 +00:00
|
|
|
if (!alive _unit) then {
|
|
|
|
_heartRate = 0;
|
|
|
|
};
|
2016-06-13 08:55:19 +00:00
|
|
|
private _heartRateOutput = LSTRING(Check_Pulse_Output_5);
|
|
|
|
private _logOutPut = LSTRING(Check_Pulse_None);
|
2015-02-23 19:35:36 +00:00
|
|
|
|
|
|
|
if (_heartRate > 1.0) then {
|
|
|
|
if ([_caller] call FUNC(isMedic)) then {
|
2015-05-28 19:59:04 +00:00
|
|
|
_heartRateOutput = LSTRING(Check_Pulse_Output_1);
|
2015-02-23 19:35:36 +00:00
|
|
|
_logOutPut = format["%1",round(_heartRate)];
|
|
|
|
} else {
|
|
|
|
// non medical personel will only find a pulse/HR
|
2015-05-28 19:59:04 +00:00
|
|
|
_heartRateOutput = LSTRING(Check_Pulse_Output_2);
|
2015-06-09 22:30:02 +00:00
|
|
|
_logOutPut = LSTRING(Check_Pulse_Weak);
|
2015-02-23 19:35:36 +00:00
|
|
|
if (_heartRate > 60) then {
|
|
|
|
if (_heartRate > 100) then {
|
2015-05-28 19:59:04 +00:00
|
|
|
_heartRateOutput = LSTRING(Check_Pulse_Output_3);
|
2015-06-09 22:30:02 +00:00
|
|
|
_logOutPut = LSTRING(Check_Pulse_Strong);
|
2015-02-23 19:35:36 +00:00
|
|
|
} else {
|
2015-05-28 19:59:04 +00:00
|
|
|
_heartRateOutput = LSTRING(Check_Pulse_Output_4);
|
2015-06-09 22:30:02 +00:00
|
|
|
_logOutPut = LSTRING(Check_Pulse_Normal);
|
2015-02-23 19:35:36 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-08-26 01:00:43 +00:00
|
|
|
if (_selectionName in ["hand_l","hand_r"] && {[_unit, _selectionName] call FUNC(hasTourniquetAppliedTo)}) then {
|
2015-08-26 00:37:51 +00:00
|
|
|
_heartRateOutput = LSTRING(Check_Pulse_Output_5);
|
|
|
|
_logOutPut = LSTRING(Check_Pulse_None);
|
2015-08-26 00:39:34 +00:00
|
|
|
};
|
2015-08-26 00:37:51 +00:00
|
|
|
|
2016-06-04 10:12:56 +00:00
|
|
|
[QEGVAR(common,displayTextStructured), [[_heartRateOutput, [_unit] call EFUNC(common,getName), round(_heartRate)], 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
|
2015-02-23 19:35:36 +00:00
|
|
|
|
|
|
|
if (_logOutPut != "") then {
|
2015-06-09 22:30:02 +00:00
|
|
|
[_unit,"activity", LSTRING(Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog);
|
2015-08-07 17:11:57 +00:00
|
|
|
[_unit,"quick_view", LSTRING(Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog);
|
2015-02-23 19:35:36 +00:00
|
|
|
};
|