ResMed Flow Limitation Graph

This commit is contained in:
Mark Watkins 2011-06-30 22:07:11 +10:00
parent 95d006f699
commit 9ad2bd1850
5 changed files with 51 additions and 11 deletions

View File

@ -42,7 +42,7 @@ public:
class WaveData:public gPointData class WaveData:public gPointData
{ {
public: public:
WaveData(MachineCode _code,int _size=250000); WaveData(MachineCode _code,int _size=800000);
virtual ~WaveData(); virtual ~WaveData();
virtual void Reload(Day *day=NULL); virtual void Reload(Day *day=NULL);
protected: protected:

View File

@ -515,16 +515,28 @@ bool ResmedLoader::LoadPLD(Machine *mach,Session *sess,EDFParser &edf)
ToTimeDelta(mach,sess,edf,edf.edfsignals[s]->data, code,recs,duration,50.0); ToTimeDelta(mach,sess,edf,edf.edfsignals[s]->data, code,recs,duration,50.0);
} else if (edf.edfsignals[s]->label=="MV") { } else if (edf.edfsignals[s]->label=="MV") {
code=CPAP_MinuteVentilation; code=CPAP_MinuteVentilation;
ToTimeDelta(mach,sess,edf,edf.edfsignals[s]->data, code,recs,duration,1.0); //ToTimeDelta(mach,sess,edf,edf.edfsignals[s]->data, code,recs,duration,1.0);
Waveform *w=new Waveform(edf.startdate,code,edf.edfsignals[s]->data,recs,duration,edf.edfsignals[s]->digital_minimum,edf.edfsignals[s]->digital_maximum);
edf.edfsignals[s]->data=NULL; // so it doesn't get deleted when edf gets trashed.
sess->AddWaveform(w);
} else if (edf.edfsignals[s]->label=="RR") { } else if (edf.edfsignals[s]->label=="RR") {
code=CPAP_RespiratoryRate; code=CPAP_RespiratoryRate;
ToTimeDelta(mach,sess,edf,edf.edfsignals[s]->data, code,recs,duration,1.0); //ToTimeDelta(mach,sess,edf,edf.edfsignals[s]->data, code,recs,duration,1.0);
Waveform *w=new Waveform(edf.startdate,code,edf.edfsignals[s]->data,recs,duration,edf.edfsignals[s]->digital_minimum,edf.edfsignals[s]->digital_maximum);
edf.edfsignals[s]->data=NULL; // so it doesn't get deleted when edf gets trashed.
sess->AddWaveform(w);
} else if (edf.edfsignals[s]->label=="Vt") { } else if (edf.edfsignals[s]->label=="Vt") {
code=CPAP_TidalVolume; code=CPAP_TidalVolume;
ToTimeDelta(mach,sess,edf,edf.edfsignals[s]->data, code,recs,duration,1.0); //ToTimeDelta(mach,sess,edf,edf.edfsignals[s]->data, code,recs,duration,1.0);
Waveform *w=new Waveform(edf.startdate,code,edf.edfsignals[s]->data,recs,duration,edf.edfsignals[s]->digital_minimum,edf.edfsignals[s]->digital_maximum);
edf.edfsignals[s]->data=NULL; // so it doesn't get deleted when edf gets trashed.
sess->AddWaveform(w);
} else if (edf.edfsignals[s]->label=="Leak") { } else if (edf.edfsignals[s]->label=="Leak") {
code=CPAP_Leak; code=CPAP_Leak;
ToTimeDelta(mach,sess,edf,edf.edfsignals[s]->data, code,recs,duration,1.0); ToTimeDelta(mach,sess,edf,edf.edfsignals[s]->data, code,recs,duration,1.0);
} else if (edf.edfsignals[s]->label=="FFL Index") {
code=CPAP_FlowLimitGraph;
ToTimeDelta(mach,sess,edf,edf.edfsignals[s]->data, code,recs,duration,1.0);
} else { } else {
qDebug(("Unknown Signal "+edf.edfsignals[s]->label).toLatin1()); qDebug(("Unknown Signal "+edf.edfsignals[s]->label).toLatin1());
} }

View File

@ -35,7 +35,7 @@ enum MachineCode//:qint16
CPAP_Obstructive, CPAP_Hypopnea, CPAP_ClearAirway, CPAP_RERA, CPAP_VSnore, CPAP_FlowLimit, CPAP_Obstructive, CPAP_Hypopnea, CPAP_ClearAirway, CPAP_RERA, CPAP_VSnore, CPAP_FlowLimit,
CPAP_Leak, CPAP_Pressure, CPAP_EAP, CPAP_IAP, CPAP_CSR, CPAP_FlowRate, CPAP_MaskPressure, CPAP_Leak, CPAP_Pressure, CPAP_EAP, CPAP_IAP, CPAP_CSR, CPAP_FlowRate, CPAP_MaskPressure,
CPAP_Snore,CPAP_MinuteVentilation, CPAP_RespiratoryRate, CPAP_TidalVolume, CPAP_Snore,CPAP_MinuteVentilation, CPAP_RespiratoryRate, CPAP_TidalVolume,CPAP_FlowLimitGraph,
// General CPAP Summary Information // General CPAP Summary Information
CPAP_PressureMin=0x80, CPAP_PressureMax, CPAP_RampTime, CPAP_RampStartingPressure, CPAP_Mode, CPAP_PressureReliefType, CPAP_PressureMin=0x80, CPAP_PressureMax, CPAP_RampTime, CPAP_RampStartingPressure, CPAP_Mode, CPAP_PressureReliefType,

View File

@ -145,21 +145,29 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
SNORE->AddLayer(new gLineChart(snore,Qt::black,4096,false,false,true)); SNORE->AddLayer(new gLineChart(snore,Qt::black,4096,false,false,true));
SNORE->setMinimumHeight(150); SNORE->setMinimumHeight(150);
AddCPAPData(mv=new EventData(CPAP_MinuteVentilation,0)); AddCPAPData(flg=new EventData(CPAP_FlowLimitGraph,0));
AddGraph(FLG=new gGraphWindow(gSplitter,tr("Flow Limitation"),SF));
FLG->AddLayer(new gXAxis());
FLG->AddLayer(new gYAxis());
FLG->AddLayer(new gLineChart(flg,Qt::black,4096,false,false,true));
FLG->setMinimumHeight(150);
AddCPAPData(mv=new WaveData(CPAP_MinuteVentilation));
AddGraph(MV=new gGraphWindow(gSplitter,tr("Minute Ventilation"),SF)); AddGraph(MV=new gGraphWindow(gSplitter,tr("Minute Ventilation"),SF));
MV->AddLayer(new gXAxis()); MV->AddLayer(new gXAxis());
MV->AddLayer(new gYAxis()); MV->AddLayer(new gYAxis());
MV->AddLayer(new gLineChart(mv,QColor(0x20,0x20,0x7f),65536,false,false,false)); MV->AddLayer(new gLineChart(mv,QColor(0x20,0x20,0x7f),65536,false,false,false));
MV->setMinimumHeight(150); MV->setMinimumHeight(150);
AddCPAPData(tv=new EventData(CPAP_TidalVolume,0)); AddCPAPData(tv=new WaveData(CPAP_TidalVolume));
AddGraph(TV=new gGraphWindow(gSplitter,tr("Tidal Volume"),SF)); AddGraph(TV=new gGraphWindow(gSplitter,tr("Tidal Volume"),SF));
TV->AddLayer(new gXAxis()); TV->AddLayer(new gXAxis());
TV->AddLayer(new gYAxis()); TV->AddLayer(new gYAxis());
TV->AddLayer(new gLineChart(tv,QColor(0x7f,0x20,0x20),65536,false,false,false)); TV->AddLayer(new gLineChart(tv,QColor(0x7f,0x20,0x20),65536,false,false,false));
TV->setMinimumHeight(150); TV->setMinimumHeight(150);
AddCPAPData(rr=new EventData(CPAP_RespiratoryRate,0)); AddCPAPData(rr=new WaveData(CPAP_RespiratoryRate));
AddGraph(RR=new gGraphWindow(gSplitter,tr("Respiratory Rate"),SF)); AddGraph(RR=new gGraphWindow(gSplitter,tr("Respiratory Rate"),SF));
RR->AddLayer(new gXAxis()); RR->AddLayer(new gXAxis());
RR->AddLayer(new gYAxis()); RR->AddLayer(new gYAxis());
@ -252,6 +260,7 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
FRW->LinkZoom(MV); FRW->LinkZoom(MV);
FRW->LinkZoom(TV); FRW->LinkZoom(TV);
FRW->LinkZoom(RR); FRW->LinkZoom(RR);
FRW->LinkZoom(FLG);
SF->LinkZoom(FRW); SF->LinkZoom(FRW);
SF->LinkZoom(PRD); SF->LinkZoom(PRD);
SF->LinkZoom(LEAK); SF->LinkZoom(LEAK);
@ -259,6 +268,7 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
SF->LinkZoom(MV); SF->LinkZoom(MV);
SF->LinkZoom(TV); SF->LinkZoom(TV);
SF->LinkZoom(RR); SF->LinkZoom(RR);
SF->LinkZoom(FLG);
PRD->LinkZoom(SF); PRD->LinkZoom(SF);
PRD->LinkZoom(FRW); PRD->LinkZoom(FRW);
PRD->LinkZoom(LEAK); PRD->LinkZoom(LEAK);
@ -266,6 +276,7 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
PRD->LinkZoom(MV); PRD->LinkZoom(MV);
PRD->LinkZoom(TV); PRD->LinkZoom(TV);
PRD->LinkZoom(RR); PRD->LinkZoom(RR);
PRD->LinkZoom(FLG);
LEAK->LinkZoom(SF); LEAK->LinkZoom(SF);
LEAK->LinkZoom(FRW); LEAK->LinkZoom(FRW);
@ -274,7 +285,7 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
LEAK->LinkZoom(MV); LEAK->LinkZoom(MV);
LEAK->LinkZoom(TV); LEAK->LinkZoom(TV);
LEAK->LinkZoom(RR); LEAK->LinkZoom(RR);
LEAK->LinkZoom(FLG);
SNORE->LinkZoom(SF); SNORE->LinkZoom(SF);
SNORE->LinkZoom(FRW); SNORE->LinkZoom(FRW);
@ -283,6 +294,7 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
SNORE->LinkZoom(MV); SNORE->LinkZoom(MV);
SNORE->LinkZoom(TV); SNORE->LinkZoom(TV);
SNORE->LinkZoom(RR); SNORE->LinkZoom(RR);
SNORE->LinkZoom(FLG);
MV->LinkZoom(SF); MV->LinkZoom(SF);
MV->LinkZoom(FRW); MV->LinkZoom(FRW);
@ -291,6 +303,7 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
MV->LinkZoom(SNORE); MV->LinkZoom(SNORE);
MV->LinkZoom(TV); MV->LinkZoom(TV);
MV->LinkZoom(RR); MV->LinkZoom(RR);
MV->LinkZoom(FLG);
TV->LinkZoom(SF); TV->LinkZoom(SF);
TV->LinkZoom(FRW); TV->LinkZoom(FRW);
@ -299,6 +312,7 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
TV->LinkZoom(SNORE); TV->LinkZoom(SNORE);
TV->LinkZoom(MV); TV->LinkZoom(MV);
TV->LinkZoom(RR); TV->LinkZoom(RR);
TV->LinkZoom(FLG);
RR->LinkZoom(SF); RR->LinkZoom(SF);
RR->LinkZoom(FRW); RR->LinkZoom(FRW);
@ -307,6 +321,16 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
RR->LinkZoom(SNORE); RR->LinkZoom(SNORE);
RR->LinkZoom(MV); RR->LinkZoom(MV);
RR->LinkZoom(TV); RR->LinkZoom(TV);
RR->LinkZoom(FLG);
FLG->LinkZoom(SF);
FLG->LinkZoom(FRW);
FLG->LinkZoom(PRD);
FLG->LinkZoom(LEAK);
FLG->LinkZoom(SNORE);
FLG->LinkZoom(MV);
FLG->LinkZoom(TV);
FLG->LinkZoom(RR);
gSplitter->addWidget(SF); gSplitter->addWidget(SF);
@ -316,6 +340,7 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
gSplitter->addWidget(RR); gSplitter->addWidget(RR);
gSplitter->addWidget(PRD); gSplitter->addWidget(PRD);
gSplitter->addWidget(LEAK); gSplitter->addWidget(LEAK);
gSplitter->addWidget(FLG);
gSplitter->addWidget(SNORE); gSplitter->addWidget(SNORE);
gSplitter->addWidget(NoData); gSplitter->addWidget(NoData);
gSplitter->addWidget(PULSE); gSplitter->addWidget(PULSE);
@ -390,6 +415,9 @@ void Daily::UpdateEventsTree(QTreeWidget *tree,Day *day)
if (code==CPAP_RespiratoryRate) continue; if (code==CPAP_RespiratoryRate) continue;
if (code==CPAP_TidalVolume) continue; if (code==CPAP_TidalVolume) continue;
if (code==CPAP_MinuteVentilation) continue; if (code==CPAP_MinuteVentilation) continue;
if (code==CPAP_FlowLimitGraph) continue;
// Note this is not so evil on PRS1.
if (code==CPAP_Pressure) continue; if (code==CPAP_Pressure) continue;
if (code==CPAP_Snore) continue; if (code==CPAP_Snore) continue;

View File

@ -58,9 +58,9 @@ private:
void UpdateEventsTree(QTreeWidget * tree,Day *day); void UpdateEventsTree(QTreeWidget * tree,Day *day);
gPointData *tap,*tap_eap,*tap_iap,*g_ahi,*frw,*prd,*leakdata,*pressure_iap,*pressure_eap,*snore; gPointData *tap,*tap_eap,*tap_iap,*g_ahi,*frw,*prd,*leakdata,*pressure_iap,*pressure_eap,*snore;
gPointData *pulse,*spo2,*rr,*mv,*tv,*mpw; gPointData *pulse,*spo2,*rr,*mv,*tv,*mpw,*flg;
gGraphWindow *PRD,*FRW,*G_AHI,*TAP,*LEAK,*SF,*TAP_EAP,*TAP_IAP,*PULSE,*SPO2,*SNORE,*RR,*MV,*TV; gGraphWindow *PRD,*FRW,*G_AHI,*TAP,*LEAK,*SF,*TAP_EAP,*TAP_IAP,*PULSE,*SPO2,*SNORE,*RR,*MV,*TV,*FLG;
list<gPointData *> OXIData; list<gPointData *> OXIData;
list<gPointData *> CPAPData; list<gPointData *> CPAPData;