-
Notifications
You must be signed in to change notification settings - Fork 100
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
Circulation - Add/Change BP and HR default behavior #602
base: dev-Tomcat
Are you sure you want to change the base?
Conversation
if (_bloodPressureLow > 40) then { | ||
if (_medic call ACEFUNC(medical_treatment,isMedic)) then { | ||
_bloodPressureOutput = LSTRING(Check_Bloodpressure_Output_Palp); | ||
_logOutput = format [localize "STR_KAT_Circulation_Bloodpressure_Output_Palp", round ((_bloodPressureLow / 10) * 10) + (if (random 1 > 0.5) then {10} else {-10})]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not using macro for this localization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because i haven't learned how to do Macro's properly yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also ((_bloodPressureLow / 10) * 10)? Aren't you just undoing the division? Why not just pull _bloodPressureLow and then add the random?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also ((_bloodPressureLow / 10) * 10)? Aren't you just undoing the division? Why not just pull _bloodPressureLow and then add the random?
That parenthathese is in the wrong position, it should be (round (_bloodPressureLow / 10) * 10)
GET_HEART_RATE(_patient) | ||
}; | ||
case (alive (_patient getVariable [QACEGVAR(medical,CPR_provider), objNull])): { | ||
random [25, 30, 35] // fake heart rate because patient is dead and off state machine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt that show bigger number? 100-110 or smth like that we have defined for CPR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we dont have a heartrate defined for CPR, plus you are not going to get an accurate pulse rate when CPR is happening
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of course we have
_actualHeartRate = random [100, 110, 120]; |
addons/circulation/XEH_PREP.hpp
Outdated
PREP(checkBloodPressure); | ||
PREP(checkBloodPressureLocal); | ||
PREP(checkBloodPressureCuff); | ||
PREP(checkBloodPressureCuffLocal); | ||
PREP(checkPulse); | ||
PREP(checkPulseLocal); | ||
PREP(checkPulseSteth); | ||
PREP(checkPulseStethLocal); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PREP alphabetical order
if (_bloodPressureLow > 40) then { | ||
if (_medic call ACEFUNC(medical_treatment,isMedic)) then { | ||
_bloodPressureOutput = LSTRING(Check_Bloodpressure_Output_Palp); | ||
_logOutput = format [localize "STR_KAT_Circulation_Bloodpressure_Output_Palp", (round (_bloodPressureLow / 10) * 10) + (if (random 1 > 0.5) then {10} else {-10})]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first, why did you not use LSTRING?
secondly, whats the point of (_bloodPressureLow / 10) * 10)?
and last, (if (random 1 > 0.5) then {10} else {-10}) can be converted to use select
GET_HEART_RATE(_patient) | ||
}; | ||
case (alive (_patient getVariable [QACEGVAR(medical,CPR_provider), objNull])): { | ||
random [25, 30, 35] // fake heart rate because patient is dead and off state machine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of course we have
_actualHeartRate = random [100, 110, 120]; |
if (_heartRate > 1) then { | ||
if (_medic call ACEFUNC(medical_treatment,isMedic)) then { | ||
_heartRateOutput = LSTRING(Check_Pulse_Output); | ||
_logOutput = format [localize "STR_KAT_Circulation_Pulse_Output", round ((_heartRateOutput / 5) * 5)]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once again, whats the point of rounding it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can only get an approximation of the pulse by doing it via palp, so that's why there's a round
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; | ||
animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"}; | ||
}; | ||
class CheckBloodPressureCuff: CheckPulse { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo should inherit from CheckBloodPressure
addons/circulation/functions/fnc_checkBloodPressureCuffLocal.sqf
Outdated
Show resolved
Hide resolved
Co-authored-by: MiszczuZPolski <[email protected]>
When merged this pull request will:
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.