mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 03:30:44 +00:00
Dreamstation 0x14 flag is missing hypopnea, change CSR to PB on P.R. machines
This commit is contained in:
parent
db594af8e6
commit
c9b774a47a
@ -730,7 +730,7 @@ bool PRS1Import::ParseF5Events()
|
|||||||
{
|
{
|
||||||
ChannelID Codes[] = {
|
ChannelID Codes[] = {
|
||||||
PRS1_00, PRS1_01, CPAP_Pressure, CPAP_EPAP, CPAP_PressurePulse, CPAP_Obstructive,
|
PRS1_00, PRS1_01, CPAP_Pressure, CPAP_EPAP, CPAP_PressurePulse, CPAP_Obstructive,
|
||||||
CPAP_ClearAirway, CPAP_Hypopnea, PRS1_08, CPAP_FlowLimit, PRS1_0A, CPAP_CSR,
|
CPAP_ClearAirway, CPAP_Hypopnea, PRS1_08, CPAP_FlowLimit, PRS1_0A, CPAP_PB,
|
||||||
PRS1_0C, CPAP_VSnore, PRS1_0E, PRS1_0F,
|
PRS1_0C, CPAP_VSnore, PRS1_0E, PRS1_0F,
|
||||||
CPAP_LargeLeak, // Large leak apparently
|
CPAP_LargeLeak, // Large leak apparently
|
||||||
CPAP_LeakTotal, PRS1_12
|
CPAP_LeakTotal, PRS1_12
|
||||||
@ -741,7 +741,7 @@ bool PRS1Import::ParseF5Events()
|
|||||||
|
|
||||||
EventList *OA = session->AddEventList(CPAP_Obstructive, EVL_Event);
|
EventList *OA = session->AddEventList(CPAP_Obstructive, EVL_Event);
|
||||||
EventList *HY = session->AddEventList(CPAP_Hypopnea, EVL_Event);
|
EventList *HY = session->AddEventList(CPAP_Hypopnea, EVL_Event);
|
||||||
EventList *CSR = session->AddEventList(CPAP_CSR, EVL_Event);
|
EventList *PB = session->AddEventList(CPAP_PB, EVL_Event);
|
||||||
EventList *LEAK = session->AddEventList(CPAP_LeakTotal, EVL_Event);
|
EventList *LEAK = session->AddEventList(CPAP_LeakTotal, EVL_Event);
|
||||||
EventList *LL = session->AddEventList(CPAP_LargeLeak, EVL_Event);
|
EventList *LL = session->AddEventList(CPAP_LargeLeak, EVL_Event);
|
||||||
EventList *SNORE = session->AddEventList(CPAP_Snore, EVL_Event);
|
EventList *SNORE = session->AddEventList(CPAP_Snore, EVL_Event);
|
||||||
@ -928,14 +928,14 @@ bool PRS1Import::ParseF5Events()
|
|||||||
//tt-=delta;
|
//tt-=delta;
|
||||||
tt -= qint64(data[1]) * 1000L;
|
tt -= qint64(data[1]) * 1000L;
|
||||||
|
|
||||||
if (!CSR) {
|
if (!PB) {
|
||||||
if (!(CSR = session->AddEventList(cpapcode, EVL_Event))) {
|
if (!(PB = session->AddEventList(cpapcode, EVL_Event))) {
|
||||||
qDebug() << "!CSR addeventlist exit";
|
qDebug() << "!PB addeventlist exit";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CSR->AddEvent(tt, data[0]);
|
PB->AddEvent(tt, data[0]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x0c:
|
case 0x0c:
|
||||||
@ -1086,7 +1086,7 @@ bool PRS1Import::ParseF0Events()
|
|||||||
|
|
||||||
EventList *OA = session->AddEventList(CPAP_Obstructive, EVL_Event);
|
EventList *OA = session->AddEventList(CPAP_Obstructive, EVL_Event);
|
||||||
EventList *HY = session->AddEventList(CPAP_Hypopnea, EVL_Event);
|
EventList *HY = session->AddEventList(CPAP_Hypopnea, EVL_Event);
|
||||||
EventList *CSR = session->AddEventList(CPAP_CSR, EVL_Event);
|
EventList *PB = session->AddEventList(CPAP_PB, EVL_Event);
|
||||||
EventList *LEAK = session->AddEventList(CPAP_LeakTotal, EVL_Event);
|
EventList *LEAK = session->AddEventList(CPAP_LeakTotal, EVL_Event);
|
||||||
EventList *SNORE = session->AddEventList(CPAP_Snore, EVL_Event);
|
EventList *SNORE = session->AddEventList(CPAP_Snore, EVL_Event);
|
||||||
|
|
||||||
@ -1141,6 +1141,7 @@ bool PRS1Import::ParseF0Events()
|
|||||||
if (code != 0x12) {
|
if (code != 0x12) {
|
||||||
delta = buffer[pos + 1] << 8 | buffer[pos];
|
delta = buffer[pos + 1] << 8 | buffer[pos];
|
||||||
pos += 2;
|
pos += 2;
|
||||||
|
|
||||||
t += qint64(delta) * 1000L;
|
t += qint64(delta) * 1000L;
|
||||||
tt = t;
|
tt = t;
|
||||||
}
|
}
|
||||||
@ -1232,8 +1233,10 @@ bool PRS1Import::ParseF0Events()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x04: // Pressure Pulse
|
case 0x04: // Pressure Pulse
|
||||||
|
data[0] = buffer[pos++];
|
||||||
|
tt = t - (qint64(data[0]) * 1000L);
|
||||||
|
|
||||||
PP->AddEvent(t, buffer[pos++]);
|
PP->AddEvent(tt, data[0]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x05: // RERA
|
case 0x05: // RERA
|
||||||
@ -1297,7 +1300,7 @@ bool PRS1Import::ParseF0Events()
|
|||||||
//qDebug() << hex << data[0] << data[1] << data[2];
|
//qDebug() << hex << data[0] << data[1] << data[2];
|
||||||
//session->AddEvent(new Event(t,cpapcode, 0, data, 3));
|
//session->AddEvent(new Event(t,cpapcode, 0, data, 3));
|
||||||
//tt-=data[1]*1000;
|
//tt-=data[1]*1000;
|
||||||
//session->AddEvent(new Event(t,CPAP_CSR, data, 2));
|
//session->AddEvent(new Event(t,CPAP_PB, data, 2));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x0f: // Cheyne Stokes Respiration
|
case 0x0f: // Cheyne Stokes Respiration
|
||||||
@ -1305,7 +1308,7 @@ bool PRS1Import::ParseF0Events()
|
|||||||
pos += 2;
|
pos += 2;
|
||||||
data[1] = buffer[pos++];
|
data[1] = buffer[pos++];
|
||||||
tt = t - qint64(data[1]) * 1000L;
|
tt = t - qint64(data[1]) * 1000L;
|
||||||
CSR->AddEvent(tt, data[0]);
|
PB->AddEvent(tt, data[0]);
|
||||||
break;
|
break;
|
||||||
case 0x10: // Large Leak
|
case 0x10: // Large Leak
|
||||||
data[0] = buffer[pos + 1] << 8 | buffer[pos];
|
data[0] = buffer[pos + 1] << 8 | buffer[pos];
|
||||||
@ -1349,9 +1352,12 @@ bool PRS1Import::ParseF0Events()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x14: // DreamStation unknown code
|
case 0x14: // DreamStation unknown code
|
||||||
|
data[0] = buffer[pos++];
|
||||||
tt = t - (qint64(data[0]) * 1000L);
|
tt = t - (qint64(data[0]) * 1000L);
|
||||||
|
HY->AddEvent(tt, data[0]);
|
||||||
|
// tt = t - (qint64(data[0]) * 1000L);
|
||||||
|
|
||||||
pos++;
|
// pos++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -15,7 +15,7 @@ ChannelID CPAP_IPAP, CPAP_IPAPLo, CPAP_IPAPHi, CPAP_EPAP, CPAP_EPAPLo, CPAP_EPAP
|
|||||||
CPAP_PS, CPAP_Mode, CPAP_AHI,
|
CPAP_PS, CPAP_Mode, CPAP_AHI,
|
||||||
CPAP_PressureMin, CPAP_PressureMax, CPAP_Ramp, CPAP_RampTime, CPAP_RampPressure, CPAP_Obstructive,
|
CPAP_PressureMin, CPAP_PressureMax, CPAP_Ramp, CPAP_RampTime, CPAP_RampPressure, CPAP_Obstructive,
|
||||||
CPAP_Hypopnea,
|
CPAP_Hypopnea,
|
||||||
CPAP_ClearAirway, CPAP_Apnea, CPAP_CSR, CPAP_LeakFlag, CPAP_ExP, CPAP_NRI, CPAP_VSnore,
|
CPAP_ClearAirway, CPAP_Apnea, CPAP_PB, CPAP_CSR, CPAP_LeakFlag, CPAP_ExP, CPAP_NRI, CPAP_VSnore,
|
||||||
CPAP_VSnore2,
|
CPAP_VSnore2,
|
||||||
CPAP_RERA, CPAP_PressurePulse, CPAP_FlowLimit, CPAP_SensAwake, CPAP_FlowRate, CPAP_MaskPressure,
|
CPAP_RERA, CPAP_PressurePulse, CPAP_FlowLimit, CPAP_SensAwake, CPAP_FlowRate, CPAP_MaskPressure,
|
||||||
CPAP_MaskPressureHi,
|
CPAP_MaskPressureHi,
|
||||||
|
@ -139,7 +139,7 @@ extern ChannelID CPAP_IPAP, CPAP_IPAPLo, CPAP_IPAPHi, CPAP_EPAP, CPAP_EPAPLo, CP
|
|||||||
CPAP_Mode, CPAP_AHI,
|
CPAP_Mode, CPAP_AHI,
|
||||||
CPAP_PressureMin, CPAP_PressureMax, CPAP_Ramp, CPAP_RampTime, CPAP_RampPressure, CPAP_Obstructive,
|
CPAP_PressureMin, CPAP_PressureMax, CPAP_Ramp, CPAP_RampTime, CPAP_RampPressure, CPAP_Obstructive,
|
||||||
CPAP_Hypopnea,
|
CPAP_Hypopnea,
|
||||||
CPAP_ClearAirway, CPAP_Apnea, CPAP_CSR, CPAP_LeakFlag, CPAP_ExP, CPAP_NRI, CPAP_VSnore,
|
CPAP_ClearAirway, CPAP_Apnea, CPAP_PB, CPAP_CSR, CPAP_LeakFlag, CPAP_ExP, CPAP_NRI, CPAP_VSnore,
|
||||||
CPAP_VSnore2,
|
CPAP_VSnore2,
|
||||||
CPAP_RERA, CPAP_PressurePulse, CPAP_FlowLimit, CPAP_SensAwake, CPAP_FlowRate, CPAP_MaskPressure,
|
CPAP_RERA, CPAP_PressurePulse, CPAP_FlowLimit, CPAP_SensAwake, CPAP_FlowRate, CPAP_MaskPressure,
|
||||||
CPAP_MaskPressureHi,
|
CPAP_MaskPressureHi,
|
||||||
|
@ -57,6 +57,7 @@ QHash<QString, ScopeType> Scopes;
|
|||||||
bool schema_initialized = false;
|
bool schema_initialized = false;
|
||||||
|
|
||||||
void setOrders() {
|
void setOrders() {
|
||||||
|
schema::channel[CPAP_PB].setOrder(1);
|
||||||
schema::channel[CPAP_CSR].setOrder(1);
|
schema::channel[CPAP_CSR].setOrder(1);
|
||||||
schema::channel[CPAP_Ramp].setOrder(2);
|
schema::channel[CPAP_Ramp].setOrder(2);
|
||||||
schema::channel[CPAP_LargeLeak].setOrder(2);
|
schema::channel[CPAP_LargeLeak].setOrder(2);
|
||||||
@ -183,9 +184,14 @@ void init()
|
|||||||
// Flags
|
// Flags
|
||||||
schema::channel.add(GRP_CPAP, new Channel(CPAP_CSR = 0x1000, SPAN, MT_CPAP, SESSION, "CSR",
|
schema::channel.add(GRP_CPAP, new Channel(CPAP_CSR = 0x1000, SPAN, MT_CPAP, SESSION, "CSR",
|
||||||
QObject::tr("Cheyne Stokes Respiration"),
|
QObject::tr("Cheyne Stokes Respiration"),
|
||||||
QObject::tr("An abnormal period of Periodic Breathing/Cheyne Stokes Respiration"),
|
QObject::tr("An abnormal period of Cheyne Stokes Respiration"),
|
||||||
QObject::tr("CSR"), STR_UNIT_Percentage, DEFAULT, COLOR_CSR));
|
QObject::tr("CSR"), STR_UNIT_Percentage, DEFAULT, COLOR_CSR));
|
||||||
|
|
||||||
|
schema::channel.add(GRP_CPAP, new Channel(CPAP_PB = 0x1028, SPAN, MT_CPAP, SESSION, "PB",
|
||||||
|
QObject::tr("Periodic Breathing"),
|
||||||
|
QObject::tr("An abnormal period of Periodic Breathing"),
|
||||||
|
QObject::tr("PB"), STR_UNIT_Percentage, DEFAULT, COLOR_CSR));
|
||||||
|
|
||||||
|
|
||||||
schema::channel.add(GRP_CPAP, new Channel(CPAP_ClearAirway = 0x1001, FLAG, MT_CPAP, SESSION,
|
schema::channel.add(GRP_CPAP, new Channel(CPAP_ClearAirway = 0x1001, FLAG, MT_CPAP, SESSION,
|
||||||
"ClearAirway", QObject::tr("Clear Airway"),
|
"ClearAirway", QObject::tr("Clear Airway"),
|
||||||
|
@ -664,8 +664,8 @@ void Daily::UpdateEventsTree(QTreeWidget *tree,Day *day)
|
|||||||
for (quint32 o=0;o<ev.count();o++) {
|
for (quint32 o=0;o<ev.count();o++) {
|
||||||
qint64 t=ev.time(o)+drift;
|
qint64 t=ev.time(o)+drift;
|
||||||
|
|
||||||
if (code==CPAP_CSR) { // center it in the middle of span
|
if ((code == CPAP_CSR) || (code == CPAP_PB)) { // center it in the middle of span
|
||||||
t-=float(ev.raw(o)/2.0)*1000.0;
|
t -= float(ev.raw(o) / 2.0) * 1000.0;
|
||||||
}
|
}
|
||||||
QStringList a;
|
QStringList a;
|
||||||
QDateTime d=QDateTime::fromMSecsSinceEpoch(t, Qt::UTC);
|
QDateTime d=QDateTime::fromMSecsSinceEpoch(t, Qt::UTC);
|
||||||
|
@ -5,17 +5,19 @@
|
|||||||
|
|
||||||
<p><h2><b>Release Notes</b></h2></p>
|
<p><h2><b>Release Notes</b></h2></p>
|
||||||
<p>Greetings!</p>
|
<p>Greetings!</p>
|
||||||
<p>I know it's been a while, but here is new and improved SleepyHead build :)</p>
|
|
||||||
|
|
||||||
<p><b>Warning: This is a test build, not all features are complete or will work 100% as intended yet!</b></p>
|
|
||||||
|
|
||||||
|
<p><h2><font color='red'><b>Warning:</b></font> This is a pre-release test build, not all features are complete or will work 100% as intended yet!</h2></p>
|
||||||
|
<p><h2>This one is specifically to test CMS50i on Mac, and nothing else.</h2></p>
|
||||||
|
<p><h2><font color='red'><b>Important:</b></font> <i>Back up your data folder manually, by making a copy the SleepyHeadData folder, as attempting to roll back later may break things.</i></h2></p>
|
||||||
|
<p><h2><font color='blue'>DreamStation support is not ready yet, so please, I <font color='red'>*don't*</font> want feedback from DreamStation users testing this particular build.</font>(You're of course welcome to try, but you are likely to be a little disappointed.)</h2></p>
|
||||||
|
<p><h2>Please don't share this with anyone else or reupload anywhere, it's not a public release.</h2></p>
|
||||||
<p><b>Sleep Well, and good luck!</b></p>
|
<p><b>Sleep Well, and good luck!</b></p>
|
||||||
<p><b><i>JediMark</i></b></p>
|
<p><b><i>JediMark</i></b></p>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<b>Changes and fixes in v0.9.8-2</b>
|
<b>Changes and fixes in v0.9.8-2</b>
|
||||||
<list>
|
<list>
|
||||||
<li>DreamStation support (Thanks for your assistance JediBob!)
|
<li>Initial DreamStation support (Thanks for your assistance JediBob!)
|
||||||
<li>AirCurve pressure reporting glitches</li>
|
<li>AirCurve pressure reporting glitches</li>
|
||||||
<li>Fix F&P Import hang</li>
|
<li>Fix F&P Import hang</li>
|
||||||
<li>Pinch to zoom support</li>
|
<li>Pinch to zoom support</li>
|
||||||
|
@ -210,6 +210,7 @@ void Report::PrintReport(gGraphView *gv, QString name, QDate date)
|
|||||||
float hours = day->hours(MT_CPAP);
|
float hours = day->hours(MT_CPAP);
|
||||||
ahi /= hours;
|
ahi /= hours;
|
||||||
float csr = (100.0 / hours) * (day->sum(CPAP_CSR) / 3600.0);
|
float csr = (100.0 / hours) * (day->sum(CPAP_CSR) / 3600.0);
|
||||||
|
float pb = (100.0 / hours) * (day->sum(CPAP_PB) / 3600.0);
|
||||||
float uai = day->count(CPAP_Apnea) / hours;
|
float uai = day->count(CPAP_Apnea) / hours;
|
||||||
float oai = day->count(CPAP_Obstructive) / hours;
|
float oai = day->count(CPAP_Obstructive) / hours;
|
||||||
float hi = (day->count(CPAP_ExP) + day->count(CPAP_Hypopnea)) / hours;
|
float hi = (day->count(CPAP_ExP) + day->count(CPAP_Hypopnea)) / hours;
|
||||||
@ -270,6 +271,8 @@ void Report::PrintReport(gGraphView *gv, QString name, QDate date)
|
|||||||
2);
|
2);
|
||||||
|
|
||||||
if (cpap->loaderName() == STR_MACH_PRS1) {
|
if (cpap->loaderName() == STR_MACH_PRS1) {
|
||||||
|
|
||||||
|
// FIXME: PB / CSR are now separate flags
|
||||||
stats += QObject::tr("REI=%1 VSI=%2 FLI=%3 PB/CSR=%4%%")
|
stats += QObject::tr("REI=%1 VSI=%2 FLI=%3 PB/CSR=%4%%")
|
||||||
.arg(rei, 0, 'f', 2).arg(vsi, 0, 'f', 2)
|
.arg(rei, 0, 'f', 2).arg(vsi, 0, 'f', 2)
|
||||||
.arg(fli, 0, 'f', 2).arg(csr, 0, 'f', 2);
|
.arg(fli, 0, 'f', 2).arg(csr, 0, 'f', 2);
|
||||||
|
@ -1959,6 +1959,36 @@ void Statistics::UpdateRecordsBox()
|
|||||||
html += "<br/>";
|
html += "<br/>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (p_profile->hasChannel(CPAP_PB)) {
|
||||||
|
ahilist.clear();
|
||||||
|
for (QDate date = first; date <= last; date = date.addDays(1)) {
|
||||||
|
Day * day = p_profile->GetGoodDay(date, MT_CPAP);
|
||||||
|
if (!day) continue;
|
||||||
|
|
||||||
|
float leak = day->calcPON(CPAP_PB);
|
||||||
|
ahilist.insert(leak, date);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ahilist.size() > (show_records * 2)) {
|
||||||
|
html += "<b>"+QObject::tr("Worst PB")+"</b><br/>";
|
||||||
|
|
||||||
|
it = ahilist.end() - 1;
|
||||||
|
it_end = ahilist.begin();
|
||||||
|
for (int i=0; (i < show_records) && (it != it_end); ++i, --it) {
|
||||||
|
|
||||||
|
if (it.key() > 0) {
|
||||||
|
html += QString("<a href='daily=%1'>").arg(it.value().toString(Qt::ISODate))
|
||||||
|
+QObject::tr("Date: %1 PB: %2%").arg(it.value().toString(Qt::SystemLocaleShortDate)).arg(it.key(), 0, 'f', 2) + "</a><br/>";
|
||||||
|
cnt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (cnt == 0) {
|
||||||
|
html+= "<i>"+QObject::tr("No PB on record")+"</i><br/>";
|
||||||
|
}
|
||||||
|
|
||||||
|
html += "<br/>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
html += "<br/><b>"+QObject::tr("Want more information?")+"</b><br/>";
|
html += "<br/><b>"+QObject::tr("Want more information?")+"</b><br/>";
|
||||||
|
Loading…
Reference in New Issue
Block a user