diff --git a/SleepLib/loader_plugins/resmed_loader.cpp b/SleepLib/loader_plugins/resmed_loader.cpp index c5733bf3..5d05962f 100644 --- a/SleepLib/loader_plugins/resmed_loader.cpp +++ b/SleepLib/loader_plugins/resmed_loader.cpp @@ -455,6 +455,7 @@ bool ResmedLoader::LoadEVE(Session *sess,EDFParser &edf) code=MC_UNKNOWN; if (t=="obstructive apnea") code=CPAP_Obstructive; else if (t=="hypopnea") code=CPAP_Hypopnea; + else if (t=="apnea") code=CPAP_Apnea; else if (t=="central apnea") code=CPAP_ClearAirway; if (code!=MC_UNKNOWN) { fields[0]=duration; @@ -547,6 +548,7 @@ bool ResmedLoader::LoadPLD(Session *sess,EDFParser &edf) sess->set_last(edf.enddate); qint64 duration=edf.GetNumDataRecords()*edf.GetDuration(); QString t; + int emptycnt=0; for (int s=0;snr*edf.GetNumDataRecords(); MachineCode code; @@ -583,8 +585,25 @@ bool ResmedLoader::LoadPLD(Session *sess,EDFParser &edf) } else if (edf.edfsignals[s]->label=="FFL Index") { code=CPAP_FlowLimitGraph; ToTimeDelta(sess,edf,edf.edfsignals[s]->data, code,recs,duration,1.0); + } else if (edf.edfsignals[s]->label=="Mask Pres") { + code=CPAP_MaskPressureExt; + ToTimeDelta(sess,edf,edf.edfsignals[s]->data, code,recs,duration,50.0); + } else if (edf.edfsignals[s]->label=="Exp Press") { + code=CPAP_ExpPressure; + ToTimeDelta(sess,edf,edf.edfsignals[s]->data, code,recs,duration,50.0); + } else if (edf.edfsignals[s]->label=="") { + if (emptycnt==0) { + code=ResMed_Empty1; + ToTimeDelta(sess,edf,edf.edfsignals[s]->data, code,recs,duration,1.0); + } else if (emptycnt==1) { + code=ResMed_Empty2; + ToTimeDelta(sess,edf,edf.edfsignals[s]->data, code,recs,duration,1.0); + } else { + qDebug() << "Unobserved Empty Signal " << edf.edfsignals[s]->label; + } + emptycnt++; } else { - qDebug() << "Unknown Signal " << edf.edfsignals[s]->label; + qDebug() << "Unobserved Signal " << edf.edfsignals[s]->label; } } return true; diff --git a/SleepLib/machine_common.h b/SleepLib/machine_common.h index 51250734..624ae012 100644 --- a/SleepLib/machine_common.h +++ b/SleepLib/machine_common.h @@ -33,7 +33,7 @@ enum MachineCode//:qint16 // General Event Codes MC_UNKNOWN=0, - CPAP_Obstructive, CPAP_Hypopnea, CPAP_ClearAirway, CPAP_RERA, CPAP_VSnore, CPAP_FlowLimit, + CPAP_Obstructive, CPAP_Apnea, 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_Snore,CPAP_MinuteVentilation, CPAP_RespiratoryRate, CPAP_TidalVolume,CPAP_FlowLimitGraph, CPAP_PatientTriggeredBreaths, CPAP_PS, CPAP_IAPLO, CPAP_IAPHI, @@ -43,7 +43,7 @@ enum MachineCode//:qint16 CPAP_PressureReliefSetting, CPAP_HumidifierSetting, CPAP_HumidifierStatus, CPAP_PressureMinAchieved, CPAP_PressureMaxAchieved, CPAP_PressurePercentValue, CPAP_PressurePercentName, CPAP_PressureAverage, CPAP_PressureMedian, CPAP_LeakMedian,CPAP_LeakMinimum,CPAP_LeakMaximum,CPAP_LeakAverage,CPAP_Duration, - CPAP_SnoreMinimum, CPAP_SnoreMaximum, CPAP_SnoreAverage, CPAP_SnoreMedian, + CPAP_SnoreMinimum, CPAP_SnoreMaximum, CPAP_SnoreAverage, CPAP_SnoreMedian, CPAP_MaskPressureEvt, CPAP_ExpPressure, BIPAP_EAPAverage,BIPAP_IAPAverage,BIPAP_EAPMin,BIPAP_EAPMax,BIPAP_IAPMin,BIPAP_IAPMax, BIPAP_PSAverage,BIPAP_PSMin, BIPAP_PSMax, @@ -58,6 +58,8 @@ enum MachineCode//:qint16 // ASV Unknown Codes PRS1_Unknown0A,PRS1_Unknown0C, PRS1_Unknown0F, + ResMed_Empty1, ResMed_Empty2, + // Oximeter Codes OXI_Pulse=0x2000, OXI_SPO2, OXI_Plethy, OXI_Signal2, OXI_SignalGood, OXI_PulseAverage, OXI_PulseMin, OXI_PulseMax, OXI_SPO2Average, OXI_SPO2Min, OXI_SPO2Max,