diff --git a/oscar/SleepLib/loader_plugins/prs1_loader.cpp b/oscar/SleepLib/loader_plugins/prs1_loader.cpp index fc7c1ccb..b623a5b8 100644 --- a/oscar/SleepLib/loader_plugins/prs1_loader.cpp +++ b/oscar/SleepLib/loader_plugins/prs1_loader.cpp @@ -229,6 +229,7 @@ ChannelID PRS1_TimedBreath = 0, PRS1_HumidMode = 0, PRS1_TubeTemp = 0; ChannelID PRS1_FlexLock = 0, PRS1_TubeLock = 0, PRS1_RampType = 0; ChannelID PRS1_BackupBreathMode = 0, PRS1_BackupBreathRate = 0, PRS1_BackupBreathTi = 0; ChannelID PRS1_AutoTrial = 0, PRS1_EZStart = 0, PRS1_RiseTime = 0, PRS1_RiseTimeLock = 0; +ChannelID PRS1_PeakFlow = 0; ChannelID PRS1_VariableBreathing = 0; // TODO: UNCONFIRMED, but seems to match sample data QString PRS1Loader::PresReliefLabel() { return QObject::tr(""); } @@ -1645,7 +1646,7 @@ static const QHash> PRS1ImportChannelMap { PRS1MinuteVentilationEvent::TYPE, { &CPAP_MinuteVent } }, { PRS1PatientTriggeredBreathsEvent::TYPE, { &CPAP_PTB } }, { PRS1TimedBreathEvent::TYPE, { &PRS1_TimedBreath } }, - { PRS1FlowRateEvent::TYPE, { &CPAP_FlowRate } }, // Only reported by F3V3 // TODO: should this stat be calculated from flow waveforms on other models? + { PRS1FlowRateEvent::TYPE, { &PRS1_PeakFlow } }, // Only reported by F3V0 and F3V3 // TODO: should this stat be calculated from flow waveforms on other models? { PRS1PressureSetEvent::TYPE, { &CPAP_PressureSet } }, { PRS1IPAPSetEvent::TYPE, { &CPAP_IPAPSet, &CPAP_PS } }, // PS is calculated from IPAPset and EPAPset when both are supported (F0) TODO: Should this be a separate channel since it's not a 2-minute average? @@ -9159,6 +9160,15 @@ void PRS1Loader::initChannels() QObject::tr("TB"), STR_UNIT_Seconds, DEFAULT, QColor("black"))); + + channel.add(GRP_CPAP, chan = new Channel(PRS1_PeakFlow = 0x115a, WAVEFORM, MT_CPAP, SESSION, + "PRS1PeakFlow", + QObject::tr("Peak Flow"), + QObject::tr("Peak flow during a 2-minute interval"), + QObject::tr("Peak Flow"), + STR_UNIT_LPM, + DEFAULT, QColor("red"))); + chan->setShowInOverview(true); } void PRS1Loader::Register() diff --git a/oscar/daily.cpp b/oscar/daily.cpp index 85bf2d5b..401703d2 100644 --- a/oscar/daily.cpp +++ b/oscar/daily.cpp @@ -56,6 +56,7 @@ QString htmlLeftMachineSettings; QString htmlLeftSessionInfo; QString htmlLeftFooter; +extern ChannelID PRS1_PeakFlow; // This was Sean Stangl's idea.. but I couldn't apply that patch. inline QString channelInfo(ChannelID code) { @@ -238,7 +239,7 @@ Daily::Daily(QWidget *parent,gGraphView * shared) //============================================ const ChannelID cpapcodes[] = { CPAP_FlowRate, CPAP_Pressure, CPAP_Leak, CPAP_FLG, CPAP_Snore, CPAP_TidalVolume, - CPAP_MaskPressure, CPAP_RespRate, CPAP_MinuteVent, CPAP_PTB, CPAP_RespEvent, CPAP_Ti, CPAP_Te, + CPAP_MaskPressure, CPAP_RespRate, CPAP_MinuteVent, CPAP_PTB, PRS1_PeakFlow, CPAP_RespEvent, CPAP_Ti, CPAP_Te, /* CPAP_IE, */ ZEO_SleepStage, POS_Inclination, POS_Orientation, POS_Movement, CPAP_Test1 }; @@ -390,6 +391,7 @@ Daily::Daily(QWidget *parent,gGraphView * shared) graphlist[schema::channel[CPAP_Snore].code()]->AddLayer(new gLineChart(CPAP_Snore, true)); graphlist[schema::channel[CPAP_PTB].code()]->AddLayer(new gLineChart(CPAP_PTB, square)); + graphlist[schema::channel[PRS1_PeakFlow].code()]->AddLayer(new gLineChart(PRS1_PeakFlow, square)); graphlist[schema::channel[CPAP_Test1].code()]->AddLayer(new gLineChart(CPAP_Test1, square)); //graphlist[schema::channel[CPAP_Test2].code()]->AddLayer(new gLineChart(CPAP_Test2, square)); @@ -1290,6 +1292,7 @@ QString Daily::getStatisticsInfo(Day * day) ChannelID chans[]={ CPAP_Pressure,CPAP_PressureSet,CPAP_EPAP,CPAP_EPAPSet,CPAP_IPAP,CPAP_IPAPSet,CPAP_PS,CPAP_PTB, + PRS1_PeakFlow, CPAP_MinuteVent, CPAP_RespRate, CPAP_RespEvent,CPAP_FLG, CPAP_Leak, CPAP_LeakTotal, CPAP_Snore, /* CPAP_IE, */ CPAP_Ti,CPAP_Te, CPAP_TgMV, CPAP_TidalVolume, OXI_Pulse, OXI_SPO2, POS_Inclination, POS_Orientation, POS_Movement diff --git a/oscar/tests/sessiontests.cpp b/oscar/tests/sessiontests.cpp index 0e07540c..0b7a4103 100644 --- a/oscar/tests/sessiontests.cpp +++ b/oscar/tests/sessiontests.cpp @@ -58,6 +58,7 @@ extern ChannelID PRS1_TimedBreath, PRS1_HumidMode, PRS1_TubeTemp; extern ChannelID PRS1_FlexLock, PRS1_TubeLock, PRS1_RampType; extern ChannelID PRS1_BackupBreathMode, PRS1_BackupBreathRate, PRS1_BackupBreathTi; extern ChannelID PRS1_AutoTrial, PRS1_EZStart, PRS1_RiseTime, PRS1_RiseTimeLock; +extern ChannelID PRS1_PeakFlow; extern ChannelID PRS1_VariableBreathing; extern ChannelID RMS9_EPR, RMS9_EPRLevel, RMS9_Mode, RMS9_SmartStart, RMS9_HumidStatus, RMS9_HumidLevel, @@ -159,6 +160,7 @@ static QString eventChannel(ChannelID i) CHANNELNAME(CPAP_RespRate); CHANNELNAME(CPAP_PTB); CHANNELNAME(PRS1_TimedBreath); + CHANNELNAME(PRS1_PeakFlow); CHANNELNAME(CPAP_MinuteVent); CHANNELNAME(CPAP_TidalVolume); CHANNELNAME(CPAP_ClearAirway);