mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 20:20:44 +00:00
Correct Total Time and AHI in CSV Export when non-CPAP devices are used
This commit is contained in:
parent
e20518e84c
commit
89edb3f077
@ -45,6 +45,7 @@
|
||||
<li>[fix] Mark exported Journal backup file as UTF-8.</li>
|
||||
<li>[fix] Improve error message when unable to access OSCAR database.</li>
|
||||
<li>[fix] Stop skipping the first 40 seconds of ResMed low-rate pressure data.</li>
|
||||
<li>[fix] Correct Total Time and AHI in CSV Export when non-CPAP devices are used.</li>
|
||||
</ul>
|
||||
<p>
|
||||
<b>Changes and fixes in OSCAR v1.2.0</b>
|
||||
|
@ -248,14 +248,13 @@ void ExportCSV::on_exportButton_clicked()
|
||||
data += sep + QString::number(day->size(), 10);
|
||||
data += sep + start.toString(Qt::ISODate);
|
||||
data += sep + end.toString(Qt::ISODate);
|
||||
int time = day->total_time() / 1000L;
|
||||
// Given this is a CPAP specific report, just report CPAP hours
|
||||
int time = int(day->hours(MT_CPAP) * 3600L);
|
||||
int h = time / 3600;
|
||||
int m = int(time / 60) % 60;
|
||||
int s = int(time) % 60;
|
||||
data += sep + QString().sprintf("%02i:%02i:%02i", h, m, s);
|
||||
float ahi = day->count(CPAP_Obstructive) + day->count(CPAP_Hypopnea) + day->count(
|
||||
CPAP_Apnea) + day->count(CPAP_ClearAirway);
|
||||
ahi /= day->hours();
|
||||
float ahi = day->calcAHI();
|
||||
data += sep + QString::number(ahi, 'f', 3);
|
||||
|
||||
for (int i = 0; i < countlist.size(); i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user