Skip to content

Commit

Permalink
Circulation - Add ETCO2 and Respiratory Rate monitoring to AED-X Visu…
Browse files Browse the repository at this point in the history
…al Monitor (#693)

**When merged this pull request will:**
- Title

### IMPORTANT

- [Development Guidelines](https://ace3.acemod.org/wiki/development/)
are read, understood and applied.
- Title of this PR uses our standard template `Component -
Add|Fix|Improve|Change|Make|Remove {changes}`.
  • Loading branch information
mazinskihenry authored Jan 14, 2025
1 parent 66c97ae commit 7398fc8
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 9 deletions.
33 changes: 30 additions & 3 deletions addons/circulation/RscTitles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ class RscTitles
x = QUOTE(KAT_pxToScreen_X(1010));
colorBackground[] = {0.73,0.02,0.74,1};
colorText[] = {0,0,0,1};
text = "Resp";
text = "CO2";
};
class RespirationRateDisplayBackgroundText_Title: RespirationRateDisplayBackground_Title {
idc = -1;
style = 1;
colorBackground[] = {0,0,0,0};
font = "RobotoCondensedLight";
text = "/min";
text = "mmHg";
};
class SpO2DisplayBackground_Title: HeartRateVitalsDisplayBackground_Title {
idc = -1;
Expand Down Expand Up @@ -265,13 +265,40 @@ class RscTitles
text = "";
};
class RespirationRateDisplay_Title: HeartRateDisplay_Title {
idc = IDC_DISPLAY_RESP_TITLE;
idc = IDC_DISPLAY_RR_DEFAULT_TITLE;
x = QUOTE(KAT_pxToScreen_X(1010));
h = QUOTE(KAT_pxToScreen_H(120));
sizeEx = QUOTE(KAT_GRID_H * 0.7 * (0.55 / (getResolution select 5)));
colorText[] = {0.73,0.02,0.74,1};
text = "Resp off";
};
class RespirationRateDisplay_ETCO2_Title: RespirationRateDisplay_Title {
idc = IDC_DISPLAY_ETCO2_TITLE;
x = QUOTE(KAT_pxToScreen_X(1050));
y = QUOTE(KAT_pxToScreen_Y(875));
h = QUOTE(KAT_pxToScreen_H(120));
sizeEx = QUOTE(KAT_GRID_H * 2.2 * (0.55 / (getResolution select 5)));
show = 0;
text = "40";
};
class RespirationRateDisplay_ACTUAL_Title: RespirationRateDisplay_Title {
idc = IDC_DISPLAY_RR_TITLE;
x = QUOTE(KAT_pxToScreen_X(1060));
y = QUOTE(KAT_pxToScreen_Y(960));
h = QUOTE(KAT_pxToScreen_H(120));
sizeEx = QUOTE(KAT_GRID_H * 1.7 * (0.55 / (getResolution select 5)));
show = 0;
text = "15";
};
class RespirationRateDisplay_BR_Title: RespirationRateDisplay_Title {
idc = IDC_DISPLAY_BR_TITLE;
x = QUOTE(KAT_pxToScreen_X(990));
y = QUOTE(KAT_pxToScreen_Y(969));
h = QUOTE(KAT_pxToScreen_H(120));
sizeEx = QUOTE(KAT_GRID_H * 1 * (0.55 / (getResolution select 5)));
show = 0;
text = "BR";
};
class SpO2Display_Title: HeartRateDisplay_Title {
idc = IDC_DISPLAY_SPO2_TITLE;
x = QUOTE(KAT_pxToScreen_X(1200));
Expand Down
12 changes: 9 additions & 3 deletions addons/circulation/defines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define IDC_DISPLAY_BLOODPRESSURE_T 70013
#define IDC_DISPLAY_BLOODPRESSURE_B 70014
#define IDC_DISPLAY_BLOODPRESSURE_M 70015
#define IDC_DISPLAY_RESP 70016
#define IDC_DISPLAY_RR_DEFAULT 70016
#define IDC_DISPLAY_SPO2 70017
#define IDC_DISPLAY_PULSERATEBORDER 70018
#define IDC_DISPLAY_PULSERATEBG 70019
Expand Down Expand Up @@ -61,6 +61,9 @@
#define IDC_CHARGE_BAR_120 70058
#define IDC_CHARGE_BAR_150 70059
#define IDC_CHARGE_BAR_200 70060
#define IDC_DISPLAY_RR 70061
#define IDC_DISPLAY_ETCO2 70062
#define IDC_DISPLAY_BR 70063

#define IDC_AEDX_MONITOR_TITLE 71000
#define IDC_EKG_SLIDER_TITLE 71001
Expand All @@ -69,7 +72,7 @@
#define IDC_DISPLAY_BLOODPRESSURE_T_TITLE 71004
#define IDC_DISPLAY_BLOODPRESSURE_B_TITLE 71005
#define IDC_DISPLAY_BLOODPRESSURE_M_TITLE 71006
#define IDC_DISPLAY_RESP_TITLE 71007
#define IDC_DISPLAY_RR_DEFAULT_TITLE 71007
#define IDC_DISPLAY_SPO2_TITLE 71008
#define IDC_DISPLAY_PULSERATEBORDER_TITLE 71009
#define IDC_DISPLAY_PULSERATEBG_TITLE 71010
Expand All @@ -82,4 +85,7 @@
#define IDC_SHOCKBUTTON_TITLE 71017
#define IDC_AEDMODE_MSG_BG_TITLE 71018
#define IDC_AEDMODE_MSG_TOP_TITLE 71019
#define IDC_AEDMODE_MSG_TITLE 71020
#define IDC_AEDMODE_MSG_TITLE 71020
#define IDC_DISPLAY_RR_TITLE 71021
#define IDC_DISPLAY_ETCO2_TITLE 71022
#define IDC_DISPLAY_BR_TITLE 71023
20 changes: 20 additions & 0 deletions addons/circulation/functions/fnc_AEDX_ViewMonitor.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,26 @@ GVAR(PulseRateReady) = true;
ctrlSetText [IDC_DISPLAY_BLOODPRESSURE_M, ""];
ctrlSetText [IDC_DISPLAY_SPO2, "---"];
};

private _hasEtco2Monitor = !(GVAR(AEDX_MonitorTarget) getVariable [QEGVAR(breathing,etco2Monitor),[]] isEqualTo []); //check for etco2 monitoring apparatus
private _etco2 = GET_ETCO2(GVAR(AEDX_MonitorTarget));
private _breathrate = GET_BREATHING_RATE(GVAR(AEDX_MonitorTarget));

if (_hasEtco2Monitor) then {
ctrlShow [IDC_DISPLAY_RR_DEFAULT, false];
ctrlShow [IDC_DISPLAY_RR, true];
ctrlShow [IDC_DISPLAY_ETCO2, true];
ctrlShow [IDC_DISPLAY_BR, true];

ctrlSetText [IDC_DISPLAY_RR, format["%1", round(_breathrate)]];
ctrlSetText [IDC_DISPLAY_ETCO2, format["%1", round(_etco2)]];
} else {
ctrlShow [IDC_DISPLAY_RR_DEFAULT, true];
ctrlShow [IDC_DISPLAY_RR, false];
ctrlShow [IDC_DISPLAY_ETCO2, false];
ctrlShow [IDC_DISPLAY_BR, false];
};

}, 1, [_dlg]] call CBA_fnc_addPerFrameHandler;

[{
Expand Down
20 changes: 20 additions & 0 deletions addons/circulation/functions/fnc_AEDX_ViewMonitor_CPR.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,24 @@ private _dlg = uiNamespace getVariable ["KAT_Circulation_AEDX_Monitor_Display",
(_dlg displayCtrl IDC_DISPLAY_BLOODPRESSURE_M_TITLE) ctrlSetText "";
(_dlg displayCtrl IDC_DISPLAY_SPO2_TITLE) ctrlSetText "---";
};

private _hasEtco2Monitor = !(GVAR(AEDX_MonitorTarget) getVariable [QEGVAR(breathing,etco2Monitor),[]] isEqualTo []);
private _etco2 = GET_ETCO2(GVAR(AEDX_MonitorTarget));
private _breathrate = GET_BREATHING_RATE(GVAR(AEDX_MonitorTarget));

if (_hasEtco2Monitor) then {
(_dlg displayCtrl IDC_DISPLAY_RR_DEFAULT_TITLE) ctrlShow false;
(_dlg displayCtrl IDC_DISPLAY_RR_TITLE) ctrlShow true;
(_dlg displayCtrl IDC_DISPLAY_ETCO2_TITLE) ctrlShow true;
(_dlg displayCtrl IDC_DISPLAY_BR_TITLE) ctrlShow true;

(_dlg displayCtrl IDC_DISPLAY_RR_TITLE) ctrlSetText (format ["%1", round(_breathrate)]);
(_dlg displayCtrl IDC_DISPLAY_ETCO2_TITLE) ctrlSetText (format ["%1", round(_etco2)]);
} else {
(_dlg displayCtrl IDC_DISPLAY_RR_DEFAULT_TITLE) ctrlShow true;
(_dlg displayCtrl IDC_DISPLAY_RR_TITLE) ctrlShow false;
(_dlg displayCtrl IDC_DISPLAY_ETCO2_TITLE) ctrlShow false;
(_dlg displayCtrl IDC_DISPLAY_BR_TITLE) ctrlShow false;
};

}, 1, [_dlg]] call CBA_fnc_addPerFrameHandler;
33 changes: 30 additions & 3 deletions addons/circulation/ui/AEDX_Monitor_Dialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ class GVAR(AEDX_Monitor_Dialog) {
x = QUOTE(KAT_pxToScreen_X(1010));
colorBackground[] = {0.73,0.02,0.74,1};
colorText[] = {0,0,0,1};
text = "Resp";
text = "CO2";
};
class RespirationRateDisplayBackgroundText: RespirationRateDisplayBackground {
idc = -1;
style = 1;
colorBackground[] = {0,0,0,0};
font = "RobotoCondensedLight";
text = "/min";
text = "mmHg";
};
class SpO2DisplayBackground: HeartRateVitalsDisplayBackground {
idc = -1;
Expand Down Expand Up @@ -202,13 +202,40 @@ class GVAR(AEDX_Monitor_Dialog) {
text = "";
};
class RespirationRateDisplay: HeartRateDisplay {
idc = IDC_DISPLAY_RESP;
idc = IDC_DISPLAY_RR_DEFAULT;
x = QUOTE(KAT_pxToScreen_X(1010));
h = QUOTE(KAT_pxToScreen_H(120));
sizeEx = QUOTE(KAT_GRID_H * 0.7 * (0.55 / (getResolution select 5)));
colorText[] = {0.73,0.02,0.74,1};
text = "Resp off";
};
class RespirationRateDisplay_ETCO2: RespirationRateDisplay {
idc = IDC_DISPLAY_ETCO2;
x = QUOTE(KAT_pxToScreen_X(1050));
y = QUOTE(KAT_pxToScreen_Y(1175));
h = QUOTE(KAT_pxToScreen_H(120));
sizeEx = QUOTE(KAT_GRID_H * 2.2 * (0.55 / (getResolution select 5)));
show = 0;
text = "40";
};
class RespirationRateDisplay_ACTUAL: RespirationRateDisplay {
idc = IDC_DISPLAY_RR;
x = QUOTE(KAT_pxToScreen_X(1060));
y = QUOTE(KAT_pxToScreen_Y(1260));
h = QUOTE(KAT_pxToScreen_H(120));
sizeEx = QUOTE(KAT_GRID_H * 1.7 * (0.55 / (getResolution select 5)));
show = 0;
text = "15";
};
class RespirationRateDisplay_BR: RespirationRateDisplay {
idc = IDC_DISPLAY_BR;
x = QUOTE(KAT_pxToScreen_X(990));
y = QUOTE(KAT_pxToScreen_Y(1269));
h = QUOTE(KAT_pxToScreen_H(120));
sizeEx = QUOTE(KAT_GRID_H * 1 * (0.55 / (getResolution select 5)));
show = 0;
text = "BR";
};
class SpO2Display: HeartRateDisplay {
idc = IDC_DISPLAY_SPO2;
x = QUOTE(KAT_pxToScreen_X(1200));
Expand Down

0 comments on commit 7398fc8

Please sign in to comment.