BMI Fix, plus show unit tooltips in Daily View html pane

This commit is contained in:
Mark Watkins 2011-12-03 13:43:23 +10:00
parent 7aabc7f4f5
commit 194a2f7ac0
3 changed files with 15 additions and 8 deletions

View File

@ -55,6 +55,7 @@ public:
const QString & name() { return m_name; }
const QString & description() { return m_description; }
const QString & label() { return m_label; }
const QString & units() { return m_unit; }
QColor & defaultColor() { return m_defaultcolor; }
void setDefaultColor(QColor color) { m_defaultcolor=color; }
QHash<int,QString> m_options;

View File

@ -335,6 +335,8 @@ void Daily::on_Link_clicked(const QUrl &url)
ui->treeWidget->setCurrentItem(wi);
ui->tabWidget->setCurrentIndex(1);
}
} else if (code=="graph") {
qDebug() << "Select graph " << data;
} else {
qDebug() << "Clicked on" << code << data;
}
@ -731,7 +733,9 @@ void Daily::Load(QDate date)
ChannelID code=chans[i];
if (cpap && cpap->channelHasData(code)) {
//if (code==CPAP_LeakTotal) suboffset=PROFILE["IntentionalLeak"].toDouble(); else suboffset=0;
html+="<tr><td align=left>"+schema::channel[code].label();
QString tooltip=schema::channel[code].description();
if (!schema::channel[code].units().isEmpty()) tooltip+=" ("+schema::channel[code].units()+")";
html+="<tr><td align=left><a href='graph="+code+"' title='"+tooltip+"'>"+schema::channel[code].label()+"</a>";
html+="</td><td>"+a.sprintf("%.2f",cpap->min(code)-suboffset);
html+="</td><td>"+a.sprintf("%.2f",cpap->wavg(code)-suboffset);
html+="</td><td>"+a.sprintf("%.2f",cpap->p90(code)-suboffset);
@ -739,7 +743,9 @@ void Daily::Load(QDate date)
html+="</td><tr>";
}
if (oxi && oxi->channelHasData(code)) {
html+="<tr><td align=left>"+schema::channel[code].label();
QString tooltip=schema::channel[code].description();
if (!schema::channel[code].units().isEmpty()) tooltip+=" ("+schema::channel[code].units()+")";
html+="<tr><td align=left><a href='graph="+code+"' title='"+tooltip+"'>"+schema::channel[code].label()+"</a>";
html+="</td><td>"+a.sprintf("%.2f",oxi->min(code));
html+="</td><td>"+a.sprintf("%.2f",oxi->wavg(code));
html+="</td><td>"+a.sprintf("%.2f",oxi->p90(code));
@ -954,7 +960,7 @@ void Daily::Unload(QDate date)
double bmi=(height*height)/kg;
if (kg>0) {
journal->settings["Weight"]=kg;
journal->settings["BMI"]=kg;
journal->settings["BMI"]=bmi;
journal->SetChanged(true);
} else {
if (journal->settings.contains("Weight")) {

View File

@ -30,10 +30,10 @@ One id code per item
<channel id="0x1100" class="data" name="FlowRate" details="Flow Rate" label="Flow Rate" unit="L/min" color="black"/>
<channel id="0x1101" class="data" name="MaskPressure" details="Mask Pressure" label="Mask Pressure" unit="cmH20" color="blue"/>
<channel id="0x1102" class="data" name="MaskPressureHi" details="Mask Pressure" label="Mask Pressure" unit="cmH20" color="blue" link="0x1101"/>
<channel id="0x1103" class="data" name="TidalVolume" details="Tidal Volume" label="Tidal Volume" unit="" color="magenta"/>
<channel id="0x1103" class="data" name="TidalVolume" details="Tidal Volume" label="Tidal Volume" unit="ml" color="magenta"/>
<channel id="0x1104" class="data" name="Snore" details="Snore" label="Snore" unit="" color="grey"/>
<channel id="0x1105" class="data" name="MinuteVent" details="Minute Ventilation" label="Minute Vent." unit="" color="dark cyan"/>
<channel id="0x1106" class="data" name="RespRate" details="Respiratory Rate" label="Resp. Rate" unit="Breaths/Min" color="dark magenta"/>
<channel id="0x1106" class="data" name="RespRate" details="Respiratory Rate" label="Resp. Rate" unit="breaths/min" color="dark magenta"/>
<channel id="0x1107" class="data" name="PTB" details="Patient Triggered Breaths" label="Pat. Trig. Breaths" unit="%" color="dark grey"/>
<channel id="0x1108" class="data" name="Leak" details="Leak Rate" label="Leaks" unit="L/min" color="dark green"/>
<channel id="0x1109" class="data" name="I:E" details="Inspiratory:Expiratory" label="I:E" unit="ratio" color="dark red"/>
@ -49,7 +49,7 @@ One id code per item
<channel id="0x1113" class="data" name="FLG" details="Flow Limit Graph" label="Flow Limit" unit="" color="dark grey"/>
<channel id="0x1114" class="data" name="TgMV" details="Target Minute Ventilation" label="Trgt Min Vent." unit="" color="dark cyan"/>
<channel id="0x1115" class="data" name="MaxLeak" details="Maximum Leak" label="MaxLeaks" unit="L/min" color="dark red"/>
<channel id="0x1116" class="data" name="AHI" details="AHI/Hour" label="AHI/Hr" unit="" color="dark red"/>
<channel id="0x1116" class="data" name="AHI" details="AHI/Hour" label="AHI/Hr" unit="events/hr" color="dark red"/>
<channel id="0x1117" class="data" name="LeakTotal" details="Total Leak Rate" label="Total Leaks" unit="L/min" color="dark green"/>
<channel id="0x1150" class="data" name="PRS1_00" details="Unknown 00" label="U00" unit="" color="black"/>
@ -73,8 +73,8 @@ One id code per item
</channel>
</group>
<group name="OXI">
<channel id="0x1800" class="data" name="Pulse" details="Pulse Rate" label="Pulse" color="red"/>
<channel id="0x1801" class="data" name="SPO2" details="% SpO2" label="SpO2" color="blue"/>
<channel id="0x1800" class="data" name="Pulse" details="Pulse Rate" label="Pulse" unit="bpm" color="red"/>
<channel id="0x1801" class="data" name="SPO2" details="Oxygen Saturation" label="SpO2" unit="%" color="blue"/>
<channel id="0x1802" class="data" name="Plethy" details="Plethysomogram" label="Plethy" color="black"/>
<channel id="0x1803" class="data" name="PulseChange" details="Pulse Change" label="Pulse Change" color="red"/>
<channel id="0x1804" class="data" name="SPO2Drop" details="SPO2Drop" label="SPO2 Drop" color="blue"/>