diff --git a/Htmldocs/release_notes.html b/Htmldocs/release_notes.html index cfb8a29c..b246c8fd 100644 --- a/Htmldocs/release_notes.html +++ b/Htmldocs/release_notes.html @@ -31,6 +31,7 @@
  • [new] Purge Current Selected Day allows purge of each machine type separately
  • [new] Multi-file import for non-CPAP loaders (Somnopose, Viatom, Zeo, Dreem)
  • [new] Weight, BMI and Zombie history appear in statistics
  • +
  • [new] Add Turkish signal names to RedMed loader.
  • [fix] Correct calculation of average leak rate on Welcome page.
  • [fix] Correct installation of non-English Release Notes on Windows.
  • [fix] About/Credits page now offers Google translations to other languages.
  • @@ -49,6 +50,7 @@
  • [fix] Stop skipping the first 40 seconds of ResMed low-rate pressure data.
  • [fix] Correct Total Time and AHI in CSV Export when non-CPAP devices are used.
  • [fix] Fix value display and bookmark behavior with clock drift.
  • +
  • [fix] Ignore old sessions should not impact existing data.
  • Changes and fixes in OSCAR v1.2.0 diff --git a/oscar/SleepLib/journal.cpp b/oscar/SleepLib/journal.cpp index 6e515497..e7c0d429 100644 --- a/oscar/SleepLib/journal.cpp +++ b/oscar/SleepLib/journal.cpp @@ -76,7 +76,7 @@ JournalEntry::JournalEntry(QDate date) session->set_last(et); // Let it live in memory...but not on disk unless data is changed... - jmach->AddSession(session); + jmach->AddSession(session, true); // and where does day get set??? does day actually need to be set?? day = p_profile->GetDay(date, MT_JOURNAL); diff --git a/oscar/SleepLib/loader_plugins/resmed_loader.cpp b/oscar/SleepLib/loader_plugins/resmed_loader.cpp index 44764189..c66e8f11 100644 --- a/oscar/SleepLib/loader_plugins/resmed_loader.cpp +++ b/oscar/SleepLib/loader_plugins/resmed_loader.cpp @@ -3286,7 +3286,7 @@ void setupResMedTranslationMap() resmed_codes[CPAP_PS] = QStringList { "PS", "S.VA.PS" }; resmed_codes[CPAP_PSMin] = QStringList { "Min PS" }; resmed_codes[CPAP_PSMax] = QStringList { "Max PS" }; - resmed_codes[CPAP_Leak] = QStringList { "Leak", "Leck", "Fuites", "Fuite", "Fuga", "\xE6\xBC\x8F\xE6\xB0\x94", "Lekk", "Läck","Läck", "Leak.2s" }; + resmed_codes[CPAP_Leak] = QStringList { "Leak", "Leck", "Fuites", "Fuite", "Fuga", "\xE6\xBC\x8F\xE6\xB0\x94", "Lekk", "Läck","Läck", "Leak.2s", "Sızıntı" }; resmed_codes[CPAP_RespRate] = QStringList { "RR", "AF", "FR", "RespRate.2s" }; resmed_codes[CPAP_MinuteVent] = QStringList { "MV", "VM", "MinVent.2s" }; resmed_codes[CPAP_TidalVolume] = QStringList { "Vt", "VC", "TidVol.2s" }; @@ -3296,19 +3296,19 @@ void setupResMedTranslationMap() resmed_codes[CPAP_Ti] = QStringList { "Ti", "B5ITime.2s" }; resmed_codes[CPAP_Te] = QStringList { "Te", "B5ETime.2s" }; resmed_codes[CPAP_TgMV] = QStringList { "TgMV", "TgtVent.2s" }; - resmed_codes[OXI_Pulse] = QStringList { "Pulse", "Puls", "Pouls", "Pols", "Pulse.1s" }; + resmed_codes[OXI_Pulse] = QStringList { "Pulse", "Puls", "Pouls", "Pols", "Pulse.1s", "Nabiz" }; resmed_codes[OXI_SPO2] = QStringList { "SpO2", "SpO2.1s" }; resmed_codes[CPAP_Obstructive] = QStringList { "Obstructive apnea" }; resmed_codes[CPAP_Hypopnea] = QStringList { "Hypopnea" }; resmed_codes[CPAP_Apnea] = QStringList { "Apnea" }; resmed_codes[CPAP_RERA] = QStringList { "Arousal" }; resmed_codes[CPAP_ClearAirway] = QStringList { "Central apnea" }; - resmed_codes[CPAP_Mode] = QStringList { "Mode", "Modus", "Funktion", "\xE6\xA8\xA1\xE5\xBC\x8F" }; - resmed_codes[RMS9_SetPressure] = QStringList { "Set Pressure", "Eingest. Druck", "Ingestelde druk", "\xE8\xAE\xBE\xE5\xAE\x9A\xE5\x8E\x8B\xE5\x8A\x9B", "Pres. prescrite", "Inställt tryck", "Inställt tryck", "S.C.Press" }; + resmed_codes[CPAP_Mode] = QStringList { "Mode", "Modus", "Funktion", "\xE6\xA8\xA1\xE5\xBC\x8F", "Mod" }; + resmed_codes[RMS9_SetPressure] = QStringList { "Set Pressure", "Eingest. Druck", "Ingestelde druk", "\xE8\xAE\xBE\xE5\xAE\x9A\xE5\x8E\x8B\xE5\x8A\x9B", "Pres. prescrite", "Inställt tryck", "Inställt tryck", "S.C.Press", "Basıncı Ayarl" }; resmed_codes[RMS9_EPR] = QStringList { "EPR", "\xE5\x91\xBC\xE6\xB0\x94\xE9\x87\x8A\xE5\x8E\x8B\x28\x45\x50" }; - resmed_codes[RMS9_EPRLevel] = QStringList { "EPR Level", "EPR-Stufe", "EPR-niveau", "\x45\x50\x52\x20\xE6\xB0\xB4\xE5\xB9\xB3", "Niveau EPR", "EPR-nivå", "EPR-nivÃ¥", "S.EPR.Level" }; - resmed_codes[CPAP_PressureMax] = QStringList { "Max Pressure", "Max. Druck", "Max druk", "\xE6\x9C\x80\xE5\xA4\xA7\xE5\x8E\x8B\xE5\x8A\x9B", "Pression max.", "Max tryck", "S.AS.MaxPress" }; - resmed_codes[CPAP_PressureMin] = QStringList { "Min Pressure", "Min. Druck", "Min druk", "\xE6\x9C\x80\xE5\xB0\x8F\xE5\x8E\x8B\xE5\x8A\x9B", "Pression min.", "Min tryck", "S.AS.MinPress" }; + resmed_codes[RMS9_EPRLevel] = QStringList { "EPR Level", "EPR-Stufe", "EPR-niveau", "\x45\x50\x52\x20\xE6\xB0\xB4\xE5\xB9\xB3", "Niveau EPR", "EPR-nivå", "EPR-nivÃ¥", "S.EPR.Level", "EPR Düzeyi" }; + resmed_codes[CPAP_PressureMax] = QStringList { "Max Pressure", "Max. Druck", "Max druk", "\xE6\x9C\x80\xE5\xA4\xA7\xE5\x8E\x8B\xE5\x8A\x9B", "Pression max.", "Max tryck", "S.AS.MaxPress", "Azami Basınç" }; + resmed_codes[CPAP_PressureMin] = QStringList { "Min Pressure", "Min. Druck", "Min druk", "\xE6\x9C\x80\xE5\xB0\x8F\xE5\x8E\x8B\xE5\x8A\x9B", "Pression min.", "Min tryck", "S.AS.MinPress", "Min Basınç" }; //resmed_codes[RMS9_EPR].push_back("S.EPR.EPRType"); } diff --git a/oscar/SleepLib/machine.cpp b/oscar/SleepLib/machine.cpp index e8358382..afe58b1c 100644 --- a/oscar/SleepLib/machine.cpp +++ b/oscar/SleepLib/machine.cpp @@ -279,7 +279,11 @@ QDate Machine::pickDate(qint64 first) return date; } -bool Machine::AddSession(Session *s) +// allowOldSessions defaults to false and is only set to true when loading +// summary data on profile load. This true setting prevents old sessions from +// becoming lost if user preference indicates to not import sessions prior to a +// given date. +bool Machine::AddSession(Session *s, bool allowOldSessions) { if (s == nullptr) { qCritical() << "AddSession() called with a null object"; @@ -303,7 +307,10 @@ bool Machine::AddSession(Session *s) return false; } - if (profile->session->ignoreOlderSessions()) { + // allowOldSessions is true when loading summaries (already imported sessions) + // We don't want to throw away data already in the database in circumstances + // where user wants to ignore old sessions on import. + if (profile->session->ignoreOlderSessions() && !allowOldSessions) { qint64 ignorebefore = profile->session->ignoreOlderSessionsDate().toMSecsSinceEpoch(); if (s->last() < ignorebefore) { qDebug() << s->session() << "Ignoring old session"; @@ -783,7 +790,7 @@ bool Machine::Load(ProgressDialog *progress) // Forced to load it, because know nothing about this session.. if (sess->LoadSummary()) { - AddSession(sess); + AddSession(sess, true); } else { qWarning() << "Error loading summary file" << filename; delete sess; @@ -1019,7 +1026,7 @@ bool Machine::LoadSummary(ProgressDialog * progress) // } *****************************************************************/ Session * sess = it.value(); - if ( ! AddSession(sess)) { + if ( ! AddSession(sess, true)) { delete sess; } else { if (loadSummaries) { diff --git a/oscar/SleepLib/machine.h b/oscar/SleepLib/machine.h index 6de7a430..e9cd8f26 100644 --- a/oscar/SleepLib/machine.h +++ b/oscar/SleepLib/machine.h @@ -143,7 +143,7 @@ class Machine Session *SessionExists(SessionID session); //! \brief Adds the session to this machine object, and the Master Profile list. (used during load) - bool AddSession(Session *s); + bool AddSession(Session *s, bool allowOldSessions=false); //! \brief Find the date this session belongs in, according to profile settings QDate pickDate(qint64 start); diff --git a/oscar/daily.cpp b/oscar/daily.cpp index 88aeda70..9f14b31c 100644 --- a/oscar/daily.cpp +++ b/oscar/daily.cpp @@ -2126,7 +2126,7 @@ Session * Daily::CreateJournalSession(QDate date) sess->SetSessionID(st / 1000L); sess->set_first(st); sess->set_last(et); - m->AddSession(sess); + m->AddSession(sess, true); return sess; } Session * Daily::GetJournalSession(QDate date) // Get the first journal session