mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Increae precission of duration
This commit is contained in:
parent
fc20e59fa1
commit
119112c7a1
@ -187,6 +187,7 @@ void DisabledInfo::update(QDate latestDate, QDate earliestDate)
|
|||||||
QList<Session *> sessions = day->getSessions(MT_CPAP,true);
|
QList<Session *> sessions = day->getSessions(MT_CPAP,true);
|
||||||
for (auto & sess : sessions) {
|
for (auto & sess : sessions) {
|
||||||
sessLength = sess->length();
|
sessLength = sess->length();
|
||||||
|
//if (sessLength<0) sessLength=0; // some sessions have negative length. Sould solve this issue
|
||||||
dayLength += sessLength;
|
dayLength += sessLength;
|
||||||
if (sess->enabled(true)) {
|
if (sess->enabled(true)) {
|
||||||
enabledLength += sessLength;
|
enabledLength += sessLength;
|
||||||
@ -241,6 +242,7 @@ QString DisabledInfo::display(int type)
|
|||||||
Permissive mode: some sessions are excluded from this report, as follows:
|
Permissive mode: some sessions are excluded from this report, as follows:
|
||||||
Total disabled sessions: xx, found in yy days.
|
Total disabled sessions: xx, found in yy days.
|
||||||
Duration of longest disabled session: aa minutes, Total duration of all disabled sessions: bb minutes.
|
Duration of longest disabled session: aa minutes, Total duration of all disabled sessions: bb minutes.
|
||||||
|
+tr("Date: %1 AHI: %2").arg(it.value().toString(Qt::SystemLocaleShortDate)).arg(it.key(), 0, 'f', 2) + "</a><br>";
|
||||||
*/
|
*/
|
||||||
switch (type) {
|
switch (type) {
|
||||||
default :
|
default :
|
||||||
@ -256,7 +258,7 @@ Duration of longest disabled session: aa minutes, Total duration of all disabled
|
|||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
return QString(QObject::tr( "Duration of longest disabled session: %1 minutes, Total duration of all disabled sessions: %2 minutes.")
|
return QString(QObject::tr( "Duration of longest disabled session: %1 minutes, Total duration of all disabled sessions: %2 minutes.")
|
||||||
.arg(maxDurationOfaDisabledsession) .arg(totalDurationOfDisabledSessions));
|
.arg(maxDurationOfaDisabledsession, 0, 'f', 1) .arg(totalDurationOfDisabledSessions, 0, 'f', 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,9 +35,9 @@ private:
|
|||||||
int daysInCompliance ;
|
int daysInCompliance ;
|
||||||
int numDisabledsessions ;
|
int numDisabledsessions ;
|
||||||
int numDaysWithDisabledsessions ;
|
int numDaysWithDisabledsessions ;
|
||||||
int maxDurationOfaDisabledsession ;
|
|
||||||
int numDaysDisabledSessionChangedCompliance ;
|
int numDaysDisabledSessionChangedCompliance ;
|
||||||
int totalDurationOfDisabledSessions ;
|
double maxDurationOfaDisabledsession ;
|
||||||
|
double totalDurationOfDisabledSessions ;
|
||||||
void clear () {
|
void clear () {
|
||||||
totalDays = 0;
|
totalDays = 0;
|
||||||
daysNoData = 0;
|
daysNoData = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user