Statistics: Added User Event Flags if permissiveMode and userFlags enabled

This commit is contained in:
LoudSnorer 2023-12-06 07:27:58 -05:00
parent aa86e6c684
commit 53eac87402

View File

@ -7,7 +7,7 @@
* License. See the file COPYING in the main directory of the source code * License. See the file COPYING in the main directory of the source code
* for more details. */ * for more details. */
#define TEST_MACROS_ENABLEDoff // remember to turn off for release. #define TEST_MACROS_ENABLEDoff
#include <test_macros.h> #include <test_macros.h>
/* /*
@ -667,7 +667,6 @@ EventDataType calcMedian(QDate start, QDate end, DAY_VALUE funct )
nth_element(be ,me, en); nth_element(be ,me, en);
median = vec[mediaOffset]; median = vec[mediaOffset];
} }
IF(len < 66) DEBUGFC Q(len) Q(median) Z(vec);
return median; return median;
} }
@ -718,9 +717,13 @@ Statistics::Statistics(QObject *parent) :
rows.push_back(StatisticsRow("Hypopnea", SC_CPH, MT_CPAP)); rows.push_back(StatisticsRow("Hypopnea", SC_CPH, MT_CPAP));
rows.push_back(StatisticsRow("Apnea", SC_CPH, MT_CPAP)); rows.push_back(StatisticsRow("Apnea", SC_CPH, MT_CPAP));
rows.push_back(StatisticsRow("ClearAirway", SC_CPH, MT_CPAP)); rows.push_back(StatisticsRow("ClearAirway", SC_CPH, MT_CPAP));
rows.push_back(StatisticsRow("RERA", SC_CPH, MT_CPAP));
if (p_profile->cpap->userEventFlagging() && !p_profile->cpap->clinicalMode()) {
rows.push_back(StatisticsRow("UserFlag1", SC_CPH, MT_CPAP));
rows.push_back(StatisticsRow("UserFlag2", SC_CPH, MT_CPAP));
}
rows.push_back(StatisticsRow("FlowLimit", SC_CPH, MT_CPAP)); rows.push_back(StatisticsRow("FlowLimit", SC_CPH, MT_CPAP));
rows.push_back(StatisticsRow("FLG", SC_90P, MT_CPAP)); rows.push_back(StatisticsRow("FLG", SC_90P, MT_CPAP));
rows.push_back(StatisticsRow("RERA", SC_CPH, MT_CPAP));
rows.push_back(StatisticsRow("SensAwake", SC_CPH, MT_CPAP)); rows.push_back(StatisticsRow("SensAwake", SC_CPH, MT_CPAP));
rows.push_back(StatisticsRow("CSR", SC_SPH, MT_CPAP)); rows.push_back(StatisticsRow("CSR", SC_SPH, MT_CPAP));