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

Circulation - Add/Change BP and HR default behavior #602

Open
wants to merge 11 commits into
base: dev-Tomcat
Choose a base branch
from

Conversation

Cplhardcore
Copy link
Contributor

When merged this pull request will:

  • overwrite ACEs functions for checking BP and HR making it no longer perfect
  • adds a blood pressure cuff to measure BP accurately
  • makes a stethoscope required to accurately get a HR

IMPORTANT

  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

@MiszczuZPolski MiszczuZPolski added this to the Ongoing milestone Oct 5, 2024
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})];
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link
Collaborator

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];

@mazinskihenry mazinskihenry modified the milestones: Ongoing, 3.0.4 Nov 30, 2024
@mazinskihenry mazinskihenry added enhancement New feature or request kind/feature request Release Notes: **ADDED:** and removed enhancement New feature or request labels Nov 30, 2024
@MiszczuZPolski MiszczuZPolski modified the milestones: 3.0.4, Ongoing Dec 3, 2024
Comment on lines 52 to 59
PREP(checkBloodPressure);
PREP(checkBloodPressureLocal);
PREP(checkBloodPressureCuff);
PREP(checkBloodPressureCuffLocal);
PREP(checkPulse);
PREP(checkPulseLocal);
PREP(checkPulseSteth);
PREP(checkPulseStethLocal);
Copy link
Collaborator

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})];
Copy link
Collaborator

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
Copy link
Collaborator

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)];
Copy link
Collaborator

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?

Copy link
Contributor Author

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 {
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature request Release Notes: **ADDED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants