mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-06 11:10:44 +00:00
Summary page cleanup for VPAP/ASV
This commit is contained in:
parent
ce48401f08
commit
53f893fb99
@ -72,15 +72,20 @@ EventDataType Day::settings_max(ChannelID code)
|
|||||||
{
|
{
|
||||||
EventDataType val=0,tmp;
|
EventDataType val=0,tmp;
|
||||||
|
|
||||||
|
bool fir=true;
|
||||||
QList<Session *>::iterator s;
|
QList<Session *>::iterator s;
|
||||||
for (s=sessions.begin();s!=sessions.end();s++) {
|
for (s=sessions.begin();s!=sessions.end();s++) {
|
||||||
if (!(*s)->enabled()) continue;
|
if (!(*s)->enabled())
|
||||||
|
continue;
|
||||||
|
|
||||||
Session & sess=*(*s);
|
Session & sess=*(*s);
|
||||||
QHash<ChannelID,QVariant>::iterator i=sess.settings.find(code);
|
QHash<ChannelID,QVariant>::iterator i=sess.settings.find(code);
|
||||||
if (i!=sess.settings.end()) {
|
if (i!=sess.settings.end()) {
|
||||||
tmp=i.value().toDouble();
|
tmp=i.value().toDouble();
|
||||||
if (tmp>val) val=tmp;
|
if (fir) {
|
||||||
|
val=tmp;
|
||||||
|
fir=false;
|
||||||
|
} else if (tmp>val) val=tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
|
@ -84,14 +84,15 @@ enum MCDataType
|
|||||||
|
|
||||||
|
|
||||||
extern ChannelID NoChannel,SESSION_ENABLED;
|
extern ChannelID NoChannel,SESSION_ENABLED;
|
||||||
extern ChannelID CPAP_IPAP, CPAP_IPAPLo, CPAP_IPAPHi, CPAP_EPAP, CPAP_EPAPLo, CPAP_EPAPHi, CPAP_Pressure, CPAP_PS, CPAP_Mode, CPAP_AHI,
|
extern ChannelID CPAP_IPAP, CPAP_IPAPLo, CPAP_IPAPHi, CPAP_EPAP, CPAP_EPAPLo, CPAP_EPAPHi, CPAP_Pressure, CPAP_PS, CPAP_PSMin, CPAP_PSMax,
|
||||||
|
CPAP_Mode, CPAP_AHI,
|
||||||
CPAP_PressureMin, CPAP_PressureMax, CPAP_RampTime, CPAP_RampPressure, CPAP_Obstructive, CPAP_Hypopnea,
|
CPAP_PressureMin, CPAP_PressureMax, CPAP_RampTime, CPAP_RampPressure, CPAP_Obstructive, CPAP_Hypopnea,
|
||||||
CPAP_ClearAirway, CPAP_Apnea, CPAP_CSR, CPAP_LeakFlag, CPAP_ExP, CPAP_NRI, CPAP_VSnore, CPAP_VSnore2,
|
CPAP_ClearAirway, CPAP_Apnea, CPAP_CSR, CPAP_LeakFlag, CPAP_ExP, CPAP_NRI, CPAP_VSnore, CPAP_VSnore2,
|
||||||
CPAP_RERA, CPAP_PressurePulse, CPAP_FlowLimit, CPAP_FlowRate, CPAP_MaskPressure, CPAP_MaskPressureHi,
|
CPAP_RERA, CPAP_PressurePulse, CPAP_FlowLimit, CPAP_FlowRate, CPAP_MaskPressure, CPAP_MaskPressureHi,
|
||||||
CPAP_RespEvent, CPAP_Snore, CPAP_MinuteVent, CPAP_RespRate, CPAP_TidalVolume, CPAP_PTB, CPAP_Leak,
|
CPAP_RespEvent, CPAP_Snore, CPAP_MinuteVent, CPAP_RespRate, CPAP_TidalVolume, CPAP_PTB, CPAP_Leak,
|
||||||
CPAP_LeakMedian, CPAP_LeakTotal, CPAP_MaxLeak, CPAP_FLG, CPAP_IE, CPAP_Te, CPAP_Ti, CPAP_TgMV,
|
CPAP_LeakMedian, CPAP_LeakTotal, CPAP_MaxLeak, CPAP_FLG, CPAP_IE, CPAP_Te, CPAP_Ti, CPAP_TgMV,
|
||||||
CPAP_UserFlag1, CPAP_UserFlag2, CPAP_UserFlag3, CPAP_BrokenSummary, CPAP_BrokenWaveform, CPAP_RDI,
|
CPAP_UserFlag1, CPAP_UserFlag2, CPAP_UserFlag3, CPAP_BrokenSummary, CPAP_BrokenWaveform, CPAP_RDI,
|
||||||
CPAP_PresReliefSet, CPAP_PresReliefMode, CPAP_PresReliefType, CPAP_PSMin, CPAP_PSMax, CPAP_Test1, CPAP_Test2;
|
CPAP_PresReliefSet, CPAP_PresReliefMode, CPAP_PresReliefType, CPAP_Test1, CPAP_Test2;
|
||||||
|
|
||||||
extern ChannelID RMS9_E01, RMS9_E02, RMS9_EPR, RMS9_EPRSet, RMS9_SetPressure;
|
extern ChannelID RMS9_E01, RMS9_E02, RMS9_EPR, RMS9_EPRSet, RMS9_SetPressure;
|
||||||
extern ChannelID INTP_SmartFlex;
|
extern ChannelID INTP_SmartFlex;
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>6</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="importTab">
|
<widget class="QWidget" name="importTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -114,7 +114,8 @@ struct RXChange
|
|||||||
min=copy.min;
|
min=copy.min;
|
||||||
max=copy.max;
|
max=copy.max;
|
||||||
ps=copy.ps;
|
ps=copy.ps;
|
||||||
maxhi=copy.maxhi;
|
pshi=copy.pshi;
|
||||||
|
maxipap=copy.maxipap;
|
||||||
machine=copy.machine;
|
machine=copy.machine;
|
||||||
per1=copy.per1;
|
per1=copy.per1;
|
||||||
per2=copy.per2;
|
per2=copy.per2;
|
||||||
@ -132,7 +133,8 @@ struct RXChange
|
|||||||
EventDataType min;
|
EventDataType min;
|
||||||
EventDataType max;
|
EventDataType max;
|
||||||
EventDataType ps;
|
EventDataType ps;
|
||||||
EventDataType maxhi;
|
EventDataType pshi;
|
||||||
|
EventDataType maxipap;
|
||||||
EventDataType per1;
|
EventDataType per1;
|
||||||
EventDataType per2;
|
EventDataType per2;
|
||||||
EventDataType weighted;
|
EventDataType weighted;
|
||||||
@ -142,7 +144,7 @@ struct RXChange
|
|||||||
short highlight;
|
short highlight;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum RXSortMode { RX_first, RX_last, RX_days, RX_ahi, RX_mode, RX_min, RX_max, RX_ps, RX_maxhi, RX_per1, RX_per2, RX_weighted };
|
enum RXSortMode { RX_first, RX_last, RX_days, RX_ahi, RX_mode, RX_min, RX_max, RX_ps, RX_pshi, RX_maxipap, RX_per1, RX_per2, RX_weighted };
|
||||||
RXSortMode RXsort=RX_first;
|
RXSortMode RXsort=RX_first;
|
||||||
bool RXorder=false;
|
bool RXorder=false;
|
||||||
|
|
||||||
@ -159,7 +161,8 @@ bool operator<(const RXChange & c1, const RXChange & c2) {
|
|||||||
case RX_min: return comp1->min < comp2->min;
|
case RX_min: return comp1->min < comp2->min;
|
||||||
case RX_max: return comp1->max < comp2->max;
|
case RX_max: return comp1->max < comp2->max;
|
||||||
case RX_ps: return comp1->ps < comp2->ps;
|
case RX_ps: return comp1->ps < comp2->ps;
|
||||||
case RX_maxhi: return comp1->maxhi < comp2->maxhi;
|
case RX_pshi: return comp1->pshi < comp2->pshi;
|
||||||
|
case RX_maxipap: return comp1->maxipap < comp2->maxipap;
|
||||||
case RX_per1: return comp1->per1 < comp2->per1;
|
case RX_per1: return comp1->per1 < comp2->per1;
|
||||||
case RX_per2: return comp1->per2 < comp2->per2;
|
case RX_per2: return comp1->per2 < comp2->per2;
|
||||||
case RX_weighted: return comp1->weighted < comp2->weighted;
|
case RX_weighted: return comp1->weighted < comp2->weighted;
|
||||||
@ -174,7 +177,8 @@ bool operator<(const RXChange & c1, const RXChange & c2) {
|
|||||||
case RX_min: return comp1->min > comp2->min;
|
case RX_min: return comp1->min > comp2->min;
|
||||||
case RX_max: return comp1->max > comp2->max;
|
case RX_max: return comp1->max > comp2->max;
|
||||||
case RX_ps: return comp1->ps > comp2->ps;
|
case RX_ps: return comp1->ps > comp2->ps;
|
||||||
case RX_maxhi: return comp1->maxhi > comp2->maxhi;
|
case RX_pshi: return comp1->pshi > comp2->pshi;
|
||||||
|
case RX_maxipap: return comp1->maxipap > comp2->maxipap;
|
||||||
case RX_per1: return comp1->per1 > comp2->per1;
|
case RX_per1: return comp1->per1 > comp2->per1;
|
||||||
case RX_per2: return comp1->per2 > comp2->per2;
|
case RX_per2: return comp1->per2 > comp2->per2;
|
||||||
case RX_weighted: return comp1->weighted > comp2->weighted;
|
case RX_weighted: return comp1->weighted > comp2->weighted;
|
||||||
@ -194,7 +198,8 @@ bool RXSort(const RXChange * comp1, const RXChange * comp2) {
|
|||||||
case RX_min: return comp1->min < comp2->min;
|
case RX_min: return comp1->min < comp2->min;
|
||||||
case RX_max: return comp1->max < comp2->max;
|
case RX_max: return comp1->max < comp2->max;
|
||||||
case RX_ps: return comp1->ps < comp2->ps;
|
case RX_ps: return comp1->ps < comp2->ps;
|
||||||
case RX_maxhi: return comp1->maxhi < comp2->maxhi;
|
case RX_pshi: return comp1->pshi < comp2->pshi;
|
||||||
|
case RX_maxipap: return comp1->maxipap < comp2->maxipap;
|
||||||
case RX_per1: return comp1->per1 < comp2->per1;
|
case RX_per1: return comp1->per1 < comp2->per1;
|
||||||
case RX_per2: return comp1->per2 < comp2->per2;
|
case RX_per2: return comp1->per2 < comp2->per2;
|
||||||
case RX_weighted: return comp1->weighted < comp2->weighted;
|
case RX_weighted: return comp1->weighted < comp2->weighted;
|
||||||
@ -208,8 +213,9 @@ bool RXSort(const RXChange * comp1, const RXChange * comp2) {
|
|||||||
case RX_mode: return comp1->mode > comp2->mode;
|
case RX_mode: return comp1->mode > comp2->mode;
|
||||||
case RX_min: return comp1->min > comp2->min;
|
case RX_min: return comp1->min > comp2->min;
|
||||||
case RX_max: return comp1->max > comp2->max;
|
case RX_max: return comp1->max > comp2->max;
|
||||||
case RX_ps: return comp1->ps > comp2->ps;
|
case RX_ps: return comp1->ps > comp2->ps;
|
||||||
case RX_maxhi: return comp1->maxhi > comp2->maxhi;
|
case RX_pshi: return comp1->pshi > comp2->pshi;
|
||||||
|
case RX_maxipap: return comp1->maxipap > comp2->maxipap;
|
||||||
case RX_per1: return comp1->per1 > comp2->per1;
|
case RX_per1: return comp1->per1 > comp2->per1;
|
||||||
case RX_per2: return comp1->per2 > comp2->per2;
|
case RX_per2: return comp1->per2 > comp2->per2;
|
||||||
case RX_weighted: return comp1->weighted > comp2->weighted;
|
case RX_weighted: return comp1->weighted > comp2->weighted;
|
||||||
@ -515,7 +521,7 @@ QString Summary::GenerateHTML()
|
|||||||
if (cpapdays>0) {
|
if (cpapdays>0) {
|
||||||
QDate first,last=lastcpap;
|
QDate first,last=lastcpap;
|
||||||
CPAPMode mode=MODE_UNKNOWN,cmode=MODE_UNKNOWN;
|
CPAPMode mode=MODE_UNKNOWN,cmode=MODE_UNKNOWN;
|
||||||
EventDataType cmin=0,cmax=0, cps=0, cmaxhi=0, min=0,max=0,maxhi=0,ps=0;
|
EventDataType cmin=0,cmax=0, cps=0, cpshi=0, cmaxipap=0, min=0,max=0,maxipap=0,ps=0,pshi=0;
|
||||||
Machine *mach=NULL,*lastmach=NULL;
|
Machine *mach=NULL,*lastmach=NULL;
|
||||||
PRTypes lastpr=PR_UNKNOWN, prelief=PR_UNKNOWN;
|
PRTypes lastpr=PR_UNKNOWN, prelief=PR_UNKNOWN;
|
||||||
short prelset=0, lastprelset=-1;
|
short prelset=0, lastprelset=-1;
|
||||||
@ -546,21 +552,41 @@ QString Summary::GenerateHTML()
|
|||||||
prelset=round(day->settings_wavg(CPAP_PresReliefSet));
|
prelset=round(day->settings_wavg(CPAP_PresReliefSet));
|
||||||
mode=(CPAPMode)(int)round(day->settings_wavg(CPAP_Mode));
|
mode=(CPAPMode)(int)round(day->settings_wavg(CPAP_Mode));
|
||||||
mach=day->machine;
|
mach=day->machine;
|
||||||
if (mode>=MODE_ASV) {
|
|
||||||
min=day->settings_min(CPAP_EPAP);
|
min=max=ps=pshi=maxipap=0;
|
||||||
max=day->settings_max(CPAP_IPAPLo);
|
|
||||||
maxhi=day->settings_max(CPAP_IPAPHi);
|
if (mode==MODE_CPAP) {
|
||||||
} else if (mode>=MODE_BIPAP) {
|
min=day->settings_min(CPAP_Pressure);
|
||||||
min=day->settings_min(CPAP_EPAP);
|
} else if (mode<MODE_BIPAP) {
|
||||||
max=day->settings_max(CPAP_IPAP);
|
|
||||||
ps=day->settings_max(CPAP_PS);
|
|
||||||
} else if (mode>=MODE_APAP) {
|
|
||||||
min=day->settings_min(CPAP_PressureMin);
|
min=day->settings_min(CPAP_PressureMin);
|
||||||
max=day->settings_max(CPAP_PressureMax);
|
max=day->settings_max(CPAP_PressureMax);
|
||||||
} else {
|
} else {
|
||||||
min=day->settings_min(CPAP_Pressure);
|
// BIPAP or ASV machines
|
||||||
|
// min & max hold EPAP
|
||||||
|
if (day->settingExists(CPAP_EPAPLo)) {
|
||||||
|
min=day->settings_min(CPAP_EPAPLo);
|
||||||
|
} else if (day->settingExists(CPAP_EPAP)) {
|
||||||
|
max=min=day->settings_min(CPAP_EPAP);
|
||||||
|
}
|
||||||
|
if (day->settingExists(CPAP_EPAPHi)) {
|
||||||
|
max=day->settings_min(CPAP_EPAPHi);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (day->settingExists(CPAP_PSMin)) {
|
||||||
|
ps=day->settings_min(CPAP_PSMin);
|
||||||
|
} else if (day->settingExists(CPAP_PS)) {
|
||||||
|
pshi=ps=day->settings_min(CPAP_PS);
|
||||||
|
}
|
||||||
|
if (day->settingExists(CPAP_PSMax)) {
|
||||||
|
pshi=day->settings_max(CPAP_PSMax);
|
||||||
|
}
|
||||||
|
if (day->settingExists(CPAP_IPAPHi)) {
|
||||||
|
maxipap=day->settings_max(CPAP_IPAPHi);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if ((mode!=cmode) || (min!=cmin) || (max!=cmax) || (ps!=cps) || (mach!=lastmach) || (prelset!=lastprelset)) {
|
|
||||||
|
if ((mode!=cmode) || (min!=cmin) || (max!=cmax) || (ps!=cps) || (pshi!=cpshi) || (maxipap!=cmaxipap) || (mach!=lastmach) || (prelset!=lastprelset)) {
|
||||||
if ((cmode!=MODE_UNKNOWN) && (lastmach!=NULL)) {
|
if ((cmode!=MODE_UNKNOWN) && (lastmach!=NULL)) {
|
||||||
first=date.addDays(1);
|
first=date.addDays(1);
|
||||||
int days=PROFILE.countDays(MT_CPAP,first,last);
|
int days=PROFILE.countDays(MT_CPAP,first,last);
|
||||||
@ -573,8 +599,9 @@ QString Summary::GenerateHTML()
|
|||||||
rx.mode=cmode;
|
rx.mode=cmode;
|
||||||
rx.min=cmin;
|
rx.min=cmin;
|
||||||
rx.max=cmax;
|
rx.max=cmax;
|
||||||
rx.ps=ps;
|
rx.ps=cps;
|
||||||
rx.maxhi=cmaxhi;
|
rx.pshi=cpshi;
|
||||||
|
rx.maxipap=cmaxipap;
|
||||||
rx.prelief=lastpr;
|
rx.prelief=lastpr;
|
||||||
rx.prelset=lastprelset;
|
rx.prelset=lastprelset;
|
||||||
rx.machine=lastmach;
|
rx.machine=lastmach;
|
||||||
@ -596,7 +623,8 @@ QString Summary::GenerateHTML()
|
|||||||
cmin=min;
|
cmin=min;
|
||||||
cmax=max;
|
cmax=max;
|
||||||
cps=ps;
|
cps=ps;
|
||||||
cmaxhi=maxhi;
|
cpshi=pshi;
|
||||||
|
cmaxipap=maxipap;
|
||||||
lastpr=prelief;
|
lastpr=prelief;
|
||||||
lastprelset=prelset;
|
lastprelset=prelset;
|
||||||
last=date;
|
last=date;
|
||||||
@ -626,7 +654,8 @@ QString Summary::GenerateHTML()
|
|||||||
rx.min=min;
|
rx.min=min;
|
||||||
rx.max=max;
|
rx.max=max;
|
||||||
rx.ps=ps;
|
rx.ps=ps;
|
||||||
rx.maxhi=maxhi;
|
rx.pshi=pshi;
|
||||||
|
rx.maxipap=maxipap;
|
||||||
rx.prelief=prelief;
|
rx.prelief=prelief;
|
||||||
rx.prelset=prelset;
|
rx.prelset=prelset;
|
||||||
rx.machine=mach;
|
rx.machine=mach;
|
||||||
@ -709,6 +738,7 @@ QString Summary::GenerateHTML()
|
|||||||
tmpRX[ls]->highlight=1; //best
|
tmpRX[ls]->highlight=1; //best
|
||||||
CPAPMode mode=(CPAPMode)(int)PROFILE.calcSettingsMax(CPAP_Mode,MT_CPAP,tmpRX[ls]->first,tmpRX[ls]->last);
|
CPAPMode mode=(CPAPMode)(int)PROFILE.calcSettingsMax(CPAP_Mode,MT_CPAP,tmpRX[ls]->first,tmpRX[ls]->last);
|
||||||
|
|
||||||
|
|
||||||
if (mode<MODE_APAP) { // is CPAP?
|
if (mode<MODE_APAP) { // is CPAP?
|
||||||
minstr=STR_TR_Pressure;
|
minstr=STR_TR_Pressure;
|
||||||
maxstr="";
|
maxstr="";
|
||||||
@ -717,7 +747,9 @@ QString Summary::GenerateHTML()
|
|||||||
minstr=STR_TR_Min;
|
minstr=STR_TR_Min;
|
||||||
maxstr=STR_TR_Max;
|
maxstr=STR_TR_Max;
|
||||||
modestr=STR_TR_APAP;
|
modestr=STR_TR_APAP;
|
||||||
} else if (mode<MODE_ASV) { // BIPAP
|
} else {
|
||||||
|
|
||||||
|
if (mode<MODE_ASV) { // BIPAP
|
||||||
minstr=STR_TR_EPAP;
|
minstr=STR_TR_EPAP;
|
||||||
maxstr=STR_TR_IPAP;
|
maxstr=STR_TR_IPAP;
|
||||||
modestr=STR_TR_BiLevel;
|
modestr=STR_TR_BiLevel;
|
||||||
@ -728,6 +760,7 @@ QString Summary::GenerateHTML()
|
|||||||
modestr=STR_TR_STASV;
|
modestr=STR_TR_STASV;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
recbox+=QString("<tr><td colspan=2><table width=100% border=0 cellpadding=1 cellspacing=0><tr><td colspan=2 align=center><b>%3</b></td></tr>")
|
recbox+=QString("<tr><td colspan=2><table width=100% border=0 cellpadding=1 cellspacing=0><tr><td colspan=2 align=center><b>%3</b></td></tr>")
|
||||||
.arg(tr("Best RX Setting"));
|
.arg(tr("Best RX Setting"));
|
||||||
@ -740,7 +773,7 @@ QString Summary::GenerateHTML()
|
|||||||
recbox+=QString("<tr><td>%1</td><td align=right>%2</td></tr>").arg(STR_TR_Mode).arg(modestr);
|
recbox+=QString("<tr><td>%1</td><td align=right>%2</td></tr>").arg(STR_TR_Mode).arg(modestr);
|
||||||
recbox+=QString("<tr><td>%1</td><td align=right>%2%3</td></tr>").arg(minstr).arg(tmpRX[ls]->min,0,'f',1).arg(STR_UNIT_CMH2O);
|
recbox+=QString("<tr><td>%1</td><td align=right>%2%3</td></tr>").arg(minstr).arg(tmpRX[ls]->min,0,'f',1).arg(STR_UNIT_CMH2O);
|
||||||
if (!maxstr.isEmpty()) recbox+=QString("<tr><td>%1</td><td align=right>%2%3</td></tr>").arg(maxstr).arg(tmpRX[ls]->max,0,'f',1).arg(STR_UNIT_CMH2O);
|
if (!maxstr.isEmpty()) recbox+=QString("<tr><td>%1</td><td align=right>%2%3</td></tr>").arg(maxstr).arg(tmpRX[ls]->max,0,'f',1).arg(STR_UNIT_CMH2O);
|
||||||
if (!maxhistr.isEmpty()) recbox+=QString("<tr><td>%1</td><td align=right>%2%3</td></tr>").arg(maxhistr).arg(tmpRX[ls]->maxhi,0,'f',1).arg(STR_UNIT_CMH2O);
|
if (!maxhistr.isEmpty()) recbox+=QString("<tr><td>%1</td><td align=right>%2%3</td></tr>").arg(maxhistr).arg(tmpRX[ls]->maxipap,0,'f',1).arg(STR_UNIT_CMH2O);
|
||||||
recbox+="</table></td></tr>";
|
recbox+="</table></td></tr>";
|
||||||
|
|
||||||
recbox+=QString("<tr><td colspan=2> </td></tr>");
|
recbox+=QString("<tr><td colspan=2> </td></tr>");
|
||||||
@ -776,7 +809,7 @@ QString Summary::GenerateHTML()
|
|||||||
recbox+=QString("<tr><td>%1</td><td align=right>%2</td></tr>").arg(STR_TR_Mode).arg(modestr);
|
recbox+=QString("<tr><td>%1</td><td align=right>%2</td></tr>").arg(STR_TR_Mode).arg(modestr);
|
||||||
recbox+=QString("<tr><td>%1</td><td align=right>%2%3</td></tr>").arg(minstr).arg(tmpRX[0]->min,0,'f',1).arg(STR_UNIT_CMH2O);
|
recbox+=QString("<tr><td>%1</td><td align=right>%2%3</td></tr>").arg(minstr).arg(tmpRX[0]->min,0,'f',1).arg(STR_UNIT_CMH2O);
|
||||||
if (!maxstr.isEmpty()) recbox+=QString("<tr><td>%1</td><td align=right>%2%3</td></tr>").arg(maxstr).arg(tmpRX[0]->max,0,'f',1).arg(STR_UNIT_CMH2O);
|
if (!maxstr.isEmpty()) recbox+=QString("<tr><td>%1</td><td align=right>%2%3</td></tr>").arg(maxstr).arg(tmpRX[0]->max,0,'f',1).arg(STR_UNIT_CMH2O);
|
||||||
if (!maxhistr.isEmpty()) recbox+=QString("<tr><td>%1</td><td align=right>%2%3</td></tr>").arg(maxhistr).arg(tmpRX[0]->maxhi,0,'f',1).arg(STR_UNIT_CMH2O);
|
if (!maxhistr.isEmpty()) recbox+=QString("<tr><td>%1</td><td align=right>%2%3</td></tr>").arg(maxhistr).arg(tmpRX[0]->maxipap,0,'f',1).arg(STR_UNIT_CMH2O);
|
||||||
recbox+="</table></td></tr>";
|
recbox+="</table></td></tr>";
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -792,30 +825,17 @@ QString Summary::GenerateHTML()
|
|||||||
html+=QString("<table cellpadding=2 cellspacing=0 border=1 width=90%>");
|
html+=QString("<table cellpadding=2 cellspacing=0 border=1 width=90%>");
|
||||||
QString extratxt;
|
QString extratxt;
|
||||||
|
|
||||||
if (cpapmode>=MODE_ASV) {
|
|
||||||
extratxt=QString("<td><b>%1</b></td><td><b>%2</b></td><td><b>%3</b></td><td><b>%4</b></td><td><b>%5</b></td>")
|
|
||||||
.arg(STR_TR_EPAP).arg(STR_TR_IPAPLo).arg(STR_TR_IPAPHi).arg(tr("PS Min")).arg(tr("PS Max"));
|
|
||||||
} else if (cpapmode>=MODE_BIPAP) {
|
|
||||||
extratxt=QString("<td><b>%1</b></td><td><b>%2</b></td><td><b>%3</b></td>")
|
|
||||||
.arg(STR_TR_EPAP).arg(STR_TR_IPAP).arg(STR_TR_PS);
|
|
||||||
} else if (cpapmode>MODE_CPAP) {
|
|
||||||
extratxt=QString("<td><b>%1</b></td><td><b>%2</b></td>")
|
|
||||||
.arg(tr("Min Pres.")).arg(tr("Max Pres."));
|
|
||||||
} else {
|
|
||||||
extratxt=QString("<td><b>%1</b></td>")
|
|
||||||
.arg(STR_TR_Pressure);
|
|
||||||
}
|
|
||||||
QString tooltip;
|
QString tooltip;
|
||||||
html+=QString("<tr><td><b>%1</b></td><td><b>%2</b></td><td><b>%3</b></td><td><b>%4</b></td><td><b>%5</b></td><td><b>%6</b></td><td><b>%7</td><td><b>%8</td>%9</tr>")
|
html+=QString("<tr><td><b>%1</b></td><td><b>%2</b></td><td><b>%3</b></td><td><b>%4</b></td><td><b>%5</b></td><td><b>%6</b></td><td><b>%7</b></td><td><b>%8</b></td><td><b>%9</b></td></tr>")
|
||||||
.arg(STR_TR_First)
|
.arg(STR_TR_First)
|
||||||
.arg(STR_TR_Last)
|
.arg(STR_TR_Last)
|
||||||
.arg(tr("Days"))
|
.arg(tr("Days"))
|
||||||
.arg(ahitxt)
|
.arg(ahitxt)
|
||||||
.arg(tr("FL"))
|
.arg(tr("FL"))
|
||||||
.arg(STR_TR_Machine)
|
.arg(STR_TR_Machine)
|
||||||
.arg(STR_TR_Mode)
|
|
||||||
.arg(tr("Pr. Rel."))
|
.arg(tr("Pr. Rel."))
|
||||||
.arg(extratxt);
|
.arg(STR_TR_Mode)
|
||||||
|
.arg("Pressure Settings");
|
||||||
|
|
||||||
for (int i=0;i<rxchange.size();i++) {
|
for (int i=0;i<rxchange.size();i++) {
|
||||||
RXChange rx=rxchange.at(i);
|
RXChange rx=rxchange.at(i);
|
||||||
@ -840,34 +860,56 @@ QString Summary::GenerateHTML()
|
|||||||
}
|
}
|
||||||
|
|
||||||
mode=rx.mode;
|
mode=rx.mode;
|
||||||
if(mode>=MODE_ASV) {
|
extratxt="<table cellpadding=0 cellspacing=0 border=0 width=100%><tr>";
|
||||||
extratxt=QString("<td>%1</td><td>%2</td><td>%3</td><td>%4</td>")
|
// tooltip=QString("%1 %2% ").arg(machstr).arg(percentile*100.0)+STR_TR_EPAP+
|
||||||
.arg(rx.max,0,'f',decimals).arg(rx.maxhi,0,'f',decimals).arg(rx.max-rx.min,0,'f',decimals).arg(rx.maxhi-rx.min,0,'f',decimals);
|
// QString("=%1<br/>%2% ").arg(rx.per1,0,'f',decimals).arg(percentile*100.0)+
|
||||||
|
// STR_TR_IPAP+QString("=%1").arg(rx.per2,0,'f',decimals);
|
||||||
tooltip=QString("%1 %2% ").arg(machstr).arg(percentile*100.0)+STR_TR_EPAP+
|
if(mode>=MODE_BIPAP) {
|
||||||
QString("=%1<br/>%2% ").arg(rx.per1,0,'f',decimals).arg(percentile*100.0)+
|
if (rx.min>0) {
|
||||||
STR_TR_IPAP+QString("=%1").arg(rx.per2,0,'f',decimals);
|
extratxt+=QString("<td>EPAP %1")
|
||||||
} else if (mode>=MODE_BIPAP) {
|
.arg(rx.min,4,'f',1);
|
||||||
extratxt=QString("<td>%1</td><td>%2</td>")
|
}
|
||||||
.arg(rx.max,0,'f',decimals).arg(rx.ps,0,'f',decimals);
|
if ((rx.max>0) && (rx.min!=rx.max)) {
|
||||||
|
extratxt+=QString(" - %2")
|
||||||
|
.arg(rx.max,4,'f',1);
|
||||||
|
}
|
||||||
|
extratxt+="</td><td>";
|
||||||
|
if (rx.ps>0) {
|
||||||
|
extratxt+=QString("<td>PS %1")
|
||||||
|
.arg(rx.ps,4,'f',1);
|
||||||
|
}
|
||||||
|
if ((rx.pshi>0) && (rx.ps!=rx.pshi)) {
|
||||||
|
extratxt+=QString(" - %2")
|
||||||
|
.arg(rx.pshi,4,'f',1);
|
||||||
|
}
|
||||||
|
extratxt+="</td>";
|
||||||
|
if (rx.maxipap>0) {
|
||||||
|
extratxt+=QString("<td>IPAP %1</td>")
|
||||||
|
.arg(rx.maxipap,4,'f',1);
|
||||||
|
}
|
||||||
tooltip=QString("%1 %2% ").arg(machstr).arg(percentile*100.0)+
|
tooltip=QString("%1 %2% ").arg(machstr).arg(percentile*100.0)+
|
||||||
STR_TR_EPAP+
|
STR_TR_EPAP+
|
||||||
QString("=%1<br/>%2% ").arg(rx.per1,0,'f',decimals)
|
QString("=%1<br/>%2% ").arg(rx.per1,0,'f',decimals)
|
||||||
.arg(percentile*100.0)
|
.arg(percentile*100.0)
|
||||||
+STR_TR_IPAP+QString("=%1").arg(rx.per2,0,'f',decimals);
|
+STR_TR_IPAP+QString("=%1").arg(rx.per2,0,'f',decimals);
|
||||||
} else if (mode>MODE_CPAP) {
|
} else if (mode>MODE_CPAP) {
|
||||||
extratxt=QString("<td>%1</td>").arg(rx.max,0,'f',decimals);
|
extratxt+=QString("<td align=left>APAP %1 - %2</td><td align=left></td>")
|
||||||
|
.arg(rx.min,4,'f',1)
|
||||||
|
.arg(rx.max,4,'f',1)
|
||||||
|
.arg(STR_UNIT_CMH2O);
|
||||||
tooltip=QString("%1 %2% ").arg(machstr).arg(percentile*100.0)+STR_TR_Pressure+
|
tooltip=QString("%1 %2% ").arg(machstr).arg(percentile*100.0)+STR_TR_Pressure+
|
||||||
QString("=%2").arg(rx.per1,0,'f',decimals);
|
QString("=%2").arg(rx.per1,0,'f',decimals);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (cpapmode>MODE_CPAP) {
|
if (cpapmode>MODE_CPAP) {
|
||||||
extratxt="<td> </td>";
|
extratxt+=QString("<td colspan=2>CPAP %1</td>").arg(rx.min,4,'f',1).arg(STR_UNIT_CMH2O);
|
||||||
tooltip=QString("%1").arg(machstr);
|
tooltip=QString("%1").arg(machstr);
|
||||||
} else {
|
} else {
|
||||||
extratxt="";
|
extratxt+="";
|
||||||
tooltip="";
|
tooltip="";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
extratxt+="</tr></table>";
|
||||||
QString presrel;
|
QString presrel;
|
||||||
if (rx.prelset>0) {
|
if (rx.prelset>0) {
|
||||||
presrel=schema::channel[CPAP_PresReliefType].option(int(rx.prelief));
|
presrel=schema::channel[CPAP_PresReliefType].option(int(rx.prelief));
|
||||||
@ -878,18 +920,17 @@ QString Summary::GenerateHTML()
|
|||||||
tooltipshow=QString("tooltip.show(\"%1\");").arg(tooltip);
|
tooltipshow=QString("tooltip.show(\"%1\");").arg(tooltip);
|
||||||
tooltiphide="tooltip.hide();";
|
tooltiphide="tooltip.hide();";
|
||||||
}
|
}
|
||||||
html+=QString("<tr bgcolor='"+color+"' onmouseover='ChangeColor(this, \"#eeeeee\"); %13' onmouseout='ChangeColor(this, \""+color+"\"); %14' onclick='alert(\"overview=%1,%2\");'><td>%3</td><td>%4</td><td>%5</td><td>%6</td><td>%7</td><td>%8</td><td>%9</td><td>%10</td><td>%11</td>%12</tr>")
|
html+=QString("<tr bgcolor='"+color+"' onmouseover='ChangeColor(this, \"#eeeeee\"); %12' onmouseout='ChangeColor(this, \""+color+"\"); %13' onclick='alert(\"overview=%1,%2\");'><td>%3</td><td>%4</td><td>%5</td><td>%6</td><td>%7</td><td>%8</td><td>%9</td><td>%10</td><td>%11</td></tr>")
|
||||||
.arg(rx.first.toString(Qt::ISODate))
|
.arg(rx.first.toString(Qt::ISODate))
|
||||||
.arg(rx.last.toString(Qt::ISODate))
|
.arg(rx.last.toString(Qt::ISODate))
|
||||||
.arg(rx.first.toString(Qt::SystemLocaleShortDate))
|
.arg(rx.first.toString(Qt::SystemLocaleShortDate))
|
||||||
.arg(rx.last.toString(Qt::SystemLocaleShortDate))
|
.arg(rx.last.toString(Qt::SystemLocaleShortDate))
|
||||||
.arg(rx.days)
|
.arg(rx.days)
|
||||||
.arg(rx.ahi,0,'f',decimals)
|
.arg(rx.ahi,0,'f',decimals)
|
||||||
.arg(rx.fl,0,'f',decimals)
|
.arg(rx.fl,0,'f',decimals) // Not the best way to do this.. Todo: Add an extra field for data..
|
||||||
.arg(rx.machine->GetClass())
|
.arg(rx.machine->GetClass())
|
||||||
.arg(schema::channel[CPAP_Mode].option(int(rx.mode)-1))
|
|
||||||
.arg(presrel)
|
.arg(presrel)
|
||||||
.arg(rx.min,0,'f',decimals)
|
.arg(schema::channel[CPAP_Mode].option(int(rx.mode)-1))
|
||||||
.arg(extratxt)
|
.arg(extratxt)
|
||||||
.arg(tooltipshow)
|
.arg(tooltipshow)
|
||||||
.arg(tooltiphide);
|
.arg(tooltiphide);
|
||||||
|
Loading…
Reference in New Issue
Block a user