ResMed CPAP Pressure display fix (purge and reimport)

This commit is contained in:
Mark Watkins 2014-05-29 02:23:40 +10:00
parent 1a6b75f36f
commit 466119b7f1
4 changed files with 18 additions and 12 deletions

View File

@ -656,7 +656,8 @@ void ResmedImport::run()
sess->settings[RMS9_MaskOnTime] = R.maskon;
// Grab all the system settings
if (R.set_pressure >= 0) sess->settings[RMS9_SetPressure] = R.set_pressure;
if (R.set_pressure >= 0)
sess->settings[CPAP_Pressure] = R.set_pressure;
if (R.min_pressure >= 0) sess->settings[CPAP_PressureMin] = R.min_pressure;
if (R.max_pressure >= 0) sess->settings[CPAP_PressureMax] = R.max_pressure;
if (R.ps >= 0) sess->settings[CPAP_PS] = R.ps;
@ -1260,7 +1261,8 @@ int ResmedLoader::Open(QString path, Profile *profile)
sess->SetChanged(true);
// First take the settings
if (R.set_pressure >= 0) sess->settings[RMS9_SetPressure] = R.set_pressure;
if (R.set_pressure >= 0)
sess->settings[CPAP_Pressure] = R.set_pressure;
if (R.min_pressure >= 0) sess->settings[CPAP_PressureMin] = R.min_pressure;
if (R.max_pressure >= 0) sess->settings[CPAP_PressureMax] = R.max_pressure;
if (R.ps >= 0) sess->settings[CPAP_PS] = R.ps;

View File

@ -9,7 +9,9 @@
<b>New features & bugs fixes in v0.9.6</b><br/>
<list>
<li>Deprecated old Oximetery page</li>
<li>Minor user interface tweaks</li>
<li>Added ChoiceMMed MD300W1 Oximeter file import support</li>
<li>Complete Rewrite of CMS50 Importer</li>
<li>Completely redesigned Oximetery with new Import Wizard</li>
<li>Improved data Purge and Reimport from backup abilities</li>
<li>Improved ResMed STR.edf summary import support</li>

View File

@ -18,6 +18,8 @@
#include <QFileDialog>
#include <QTextStream>
#include <QCalendarWidget>
#include <QMenuBar>
#include "preferencesdialog.h"
#include "common_gui.h"
@ -491,6 +493,7 @@ bool PreferencesDialog::Save()
PREF["Fonts_Application_Bold"] = ui->applicationFontBold->isChecked();
PREF["Fonts_Application_Italic"] = ui->applicationFontItalic->isChecked();
PREF["Fonts_Graph_Name"] = ui->graphFont->currentText();
PREF["Fonts_Graph_Size"] = ui->graphFontSize->value();
PREF["Fonts_Graph_Bold"] = ui->graphFontBold->isChecked();
@ -511,6 +514,7 @@ bool PreferencesDialog::Save()
font.setWeight(ui->applicationFontBold->isChecked() ? QFont::Bold : QFont::Normal);
font.setItalic(ui->applicationFontItalic->isChecked());
QApplication::setFont(font);
mainwin->menuBar()->setFont(font);
*defaultfont = ui->graphFont->currentFont();
defaultfont->setPointSize(ui->graphFontSize->value());

View File

@ -144,7 +144,7 @@ QString htmlHeader()
"border-radius:10px;"
"-moz-border-radius:10px;"
"-webkit-border-radius:10px;"
"width: 95%;"
"width: 99%;"
"page-break-after:auto;"
"-fs-table-paginate: paginate;"
"}"
@ -166,7 +166,7 @@ QString htmlHeader()
"function Go(url) { throw(url); }"
"</script>"
"</head>"
"<body leftmargin=0 topmargin=0 rightmargin=0>"
"<body leftmargin=0 topmargin=5 rightmargin=0>"
"<div align=center><table class=curved>" // cellpadding=3 cellspacing=0 border=0
"<td>"+userinfo+"</td>"
"<td align='right'>"
@ -847,7 +847,6 @@ QString Statistics::GenerateHTML()
rx.prelief = prelief;
rx.prelset = prelset;
rx.machine = mach;
if (mode < MODE_BIPAP) {
rx.per1 = p_profile->calcPercentile(CPAP_Pressure, percentile, MT_CPAP, first, last);
rx.per2 = 0;
@ -870,7 +869,7 @@ QString Statistics::GenerateHTML()
for (int i = 0; i < rxchange.size(); i++) {
RXChange &rx = rxchange[i];
if (rx.days > rxthresh) {
if (rx.days >= rxthresh) {
tmpRX.push_back(&rx);
}
}
@ -1046,9 +1045,8 @@ QString Statistics::GenerateHTML()
RXorder=true;
qSort(rxchange.begin(),rxchange.end());*/
html += "<p style=\"page-break-before:always;\"/>";
html += "<div align=center><br/>";
html += QString("<table class=curved>"); //cellpadding=2 cellspacing=0 border=1
html += QString("<table class=curved style=\"page-break-before:always;\">");
html += "<thead>";
html += "<tr bgcolor='"+heading_color+"'><th colspan=10 align=center><font size=+2>" + tr("Changes to Prescription Settings") + "</font></th></tr>";
@ -1160,8 +1158,8 @@ QString Statistics::GenerateHTML()
QString("=%2").arg(rx.per1, 0, 'f', decimals);
} else {
if (cpapmode > MODE_CPAP) {
extratxt += "<td colspan=2>"+QString(tr("CPAP %1")+"</td>").arg(rx.min, 4, 'f', 1);
if (cpapmode >= MODE_CPAP) {
extratxt += "<td colspan=2>"+QString(tr("Fixed %1")+"</td>").arg(rx.min, 4, 'f', 1);
tooltip = QString("%1").arg(machstr);
} else {
extratxt += "";