Reverse-engineering Oximetry for ResScan 3.10. Can we do it?

General Discussion on any topic relating to CPAP and/or Sleep Apnea.
User avatar
DreamDiver
Posts: 3082
Joined: Thu Oct 04, 2007 11:19 am

Reverse-engineering Oximetry for ResScan 3.10. Can we do it?

Post by DreamDiver » Wed Apr 28, 2010 5:25 am

Looking at the data from the S9 in the EDFBrowser made me realize something interesting.
You have to convert the *EVE.edf data from one format to another in order to visualize it in the EDFBrowser.
While looking at the various format conversions, I discovered that there is a way to take ascii data and convert it to .edf format.
It should just be a case of taking the data from the contec CMS-60D (or your preferred contec recording model) and converting
the .csv file to .edf format, and then adding the time stamp in such a way that ResScan can visualize it.

I haven't made the attempt yet, but am considering trying to do so. If it could be made to work, it might end up with some amount of skew, so it wouldn't be as accurate as the ResLink method. However, the price is right. Because the edflib is avaialble, it might just be possible to create a software app that would do the manipulation for us quickly from the four file types involved: .spoR, .csv, *SAD.edf, *SAD.crc.

I'd like to get some feedback on whether others think this might be worth the effort or is just a hole in time, waiting for itself to be dug.
It shouldn't void any warranties, since we'd be working with a copy of the SD card -- not the one that we use with the S9.

If nothing else, something like this could still be useful with the EDFBrowser.

_________________
Mask: ResMed AirFit™ F20 Mask with Headgear + 2 Replacement Cushions
Additional Comments: Pressure: APAP 10.4 | 11.8 | Also Quattro FX FF, Simplus FF

User avatar
alterego61
Posts: 83
Joined: Wed Aug 26, 2009 10:11 pm
Location: Ontario, Canada

Re: Reverse-engineering Oximetry for ResScan 3.10. Can we do it?

Post by alterego61 » Wed Apr 28, 2010 7:10 am

I think this is a fine idea, if someone has the time to look into it. It will be made easier once we can take a look at a .SAD (s9 oximetry) file from a machine that is hooked up through the oximetry interface to see how the data are laid out.

Coincidentally I have just started looking at the data files from a CMS-50F - there are two: the first is a CSV file that contains two series of values, one for pulse and one for SpO2. The other file is of type .spoR - I haven't figured out yet how it's structured but it looks like some kind of header file that contains the start time etc.

If someone has the programming smarts and a set of equivalent s9 files no doubt the data could be massaged so that they lined up in ResScan by manipulating the start time and either chopping or padding the data values in the CMS file.

_________________
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: APAP 5-7, EPR 1, ClimateLine Hose, ClimateControl Auto 27C/80F, ResScan 3.10 / Win7 64, 16GB SanDisk Ultra Class 4 (15MB/s) SD Card

User avatar
dsm
Posts: 6996
Joined: Mon Jun 20, 2005 6:53 am
Location: Near the coast.

Re: Reverse-engineering Oximetry for ResScan 3.10. Can we do it?

Post by dsm » Wed Apr 28, 2010 7:24 am

I have the ResScan SpO2 units & could look at collecting the file from one.
I am sure we can format the data into a file format that ResScan recognizes.

The SpO2 units are the 3012 Nonin xPod/iPod units.

DSM
xPAP and Quattro std mask (plus a pad-a-cheek anti-leak strap)

User avatar
alterego61
Posts: 83
Joined: Wed Aug 26, 2009 10:11 pm
Location: Ontario, Canada

Re: Reverse-engineering Oximetry for ResScan 3.10. Can we do it?

Post by alterego61 » Wed Apr 28, 2010 7:32 am

dsm wrote:I have the ResScan SpO2 units & could look at collecting the file from one.
I am sure we can format the data into a file format that ResScan recognizes.

The SpO2 units are the 3012 Nonin xPod/iPod units.

DSM
Hi DSM, thanks for the feedback. If I read you correctly, you have the oximeter model that the s9 is likely to require (Nonin 3010), but not the s9 oximetry interface - is that right?

_________________
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: APAP 5-7, EPR 1, ClimateLine Hose, ClimateControl Auto 27C/80F, ResScan 3.10 / Win7 64, 16GB SanDisk Ultra Class 4 (15MB/s) SD Card

User avatar
DreamDiver
Posts: 3082
Joined: Thu Oct 04, 2007 11:19 am

Re: Reverse-engineering Oximetry for ResScan 3.10. Can we do it?

Post by DreamDiver » Wed Apr 28, 2010 7:43 am

alterego61 wrote:...The other file is of type .spoR - I haven't figured out yet how it's structured but it looks like some kind of header file that contains the start time etc.
There's more than just start time data there. In Frhed, it looks like a bunch of jumbled patterned letters, but I cannot make out what anything is beyond the first identifying string for date and name. I'm not sure how useful the bulk of the data in the .spoR files will end up being if we cannot manipulate the it into something EDFBrowser can see.
dsm wrote:I have the ResScan SpO2 units & could look at collecting the file from one.
I am sure we can format the data into a file format that ResScan recognizes.

The SpO2 units are the 3012 Nonin xPod/iPod units.

DSM
I wonder if the files are in the .crc and .edf format for the VPAP Adapt SV and the S8. I'll bet they are.

If you're interested in working with some files from the S9 and some corresponding contec oximetry for comparison, I could send you some.

_________________
Mask: ResMed AirFit™ F20 Mask with Headgear + 2 Replacement Cushions
Additional Comments: Pressure: APAP 10.4 | 11.8 | Also Quattro FX FF, Simplus FF

User avatar
DreamDiver
Posts: 3082
Joined: Thu Oct 04, 2007 11:19 am

Re: Reverse-engineering Oximetry for ResScan 3.10. Can we do it?

Post by DreamDiver » Wed Apr 28, 2010 9:45 am

Here's some examples of what I was able to do with data from the .csv file and EDFBrowser:
Could be a challenge trying to get it into ResScan though...
Hey! No apneas last night! Only a single hypopnea. It will be interesting to line up hypopneas with oximetry to see how they correspond.
It looks like some of the lines below are derived from an algorithm that compiles some combination of data found here for ResScan.
Two different mask pressures, Exp pressure, RR, Vt, MV -- I wonder what some of these mean. Does anyone have a clue?

One full mask session:
Image

A five-minute interval:
Image

A twenty-minute interval:
Image

_________________
Mask: ResMed AirFit™ F20 Mask with Headgear + 2 Replacement Cushions
Additional Comments: Pressure: APAP 10.4 | 11.8 | Also Quattro FX FF, Simplus FF

User avatar
alterego61
Posts: 83
Joined: Wed Aug 26, 2009 10:11 pm
Location: Ontario, Canada

Re: Reverse-engineering Oximetry for ResScan 3.10. Can we do it?

Post by alterego61 » Wed Apr 28, 2010 10:00 am

DD that's a pretty neat result.

Did you just upload a set of S9 files together with the CMS files? It was that easy?

_________________
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: APAP 5-7, EPR 1, ClimateLine Hose, ClimateControl Auto 27C/80F, ResScan 3.10 / Win7 64, 16GB SanDisk Ultra Class 4 (15MB/s) SD Card

User avatar
alterego61
Posts: 83
Joined: Wed Aug 26, 2009 10:11 pm
Location: Ontario, Canada

Re: Reverse-engineering Oximetry for ResScan 3.10. Can we do it?

Post by alterego61 » Wed Apr 28, 2010 10:02 am

DreamDiver wrote: Two different mask pressures, Exp pressure, RR, Vt, MV -- I wonder what some of these mean. Does anyone have a clue?
Have you compared them to the same charts in ResScan? It should be easy from that to figure out what they are.

_________________
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: APAP 5-7, EPR 1, ClimateLine Hose, ClimateControl Auto 27C/80F, ResScan 3.10 / Win7 64, 16GB SanDisk Ultra Class 4 (15MB/s) SD Card

User avatar
DreamDiver
Posts: 3082
Joined: Thu Oct 04, 2007 11:19 am

Re: Reverse-engineering Oximetry for ResScan 3.10. Can we do it?

Post by DreamDiver » Wed Apr 28, 2010 10:12 am

alterego61 wrote:Did you just upload a set of S9 files together with the CMS files? It was that easy?
No, I had to massage the data. I created the .edf file from the oximetry .csv file (using the EDFBrowser conversion tools) for the same time frame as the mask session. The oximetry data is actually longer than one session, so I zoomed in to this particular session.
alterego61 wrote:
DreamDiver wrote: Two different mask pressures, Exp pressure, RR, Vt, MV -- I wonder what some of these mean. Does anyone have a clue?
Have you compared them to the same charts in ResScan? It should be easy from that to figure out what they are.
That's just it. They don't exactly match. It's why I suspect they have incorporated some sort of algorithm that takes an average, or does some other sample filtering to create the graphs we see for our use. Either that or they just don't choose to show us all the data, but make it available for those in a real lab who have an interest in seeing exactly what's involved.

_________________
Mask: ResMed AirFit™ F20 Mask with Headgear + 2 Replacement Cushions
Additional Comments: Pressure: APAP 10.4 | 11.8 | Also Quattro FX FF, Simplus FF

User avatar
alterego61
Posts: 83
Joined: Wed Aug 26, 2009 10:11 pm
Location: Ontario, Canada

Re: Reverse-engineering Oximetry for ResScan 3.10. Can we do it?

Post by alterego61 » Wed Apr 28, 2010 11:01 am

DreamDiver wrote: Two different mask pressures, Exp pressure, RR, Vt, MV -- I wonder what some of these mean. Does anyone have a clue?
alterego61 wrote: Have you compared them to the same charts in ResScan? It should be easy from that to figure out what they are.
DreamDiver wrote:That's just it. They don't exactly match. It's why I suspect they have incorporated some sort of algorithm that takes an average, or does some other sample filtering to create the graphs we see for our use. Either that or they just don't choose to show us all the data, but make it available for those in a real lab who have an interest in seeing exactly what's involved.
Oops, sorry DD, I didn't read your post closely enough.

A quick web search yields: Vt = Tidal Volume, RR = Respiratory Rate, MV = Minute Volume, Exp Pressure = Expiratory Pressure

I'm not sure about the two mask pressures

_________________
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: APAP 5-7, EPR 1, ClimateLine Hose, ClimateControl Auto 27C/80F, ResScan 3.10 / Win7 64, 16GB SanDisk Ultra Class 4 (15MB/s) SD Card

User avatar
DreamDiver
Posts: 3082
Joined: Thu Oct 04, 2007 11:19 am

Re: Reverse-engineering Oximetry for ResScan 3.10. Can we do it?

Post by DreamDiver » Wed Apr 28, 2010 11:15 am

alterego61 wrote:A quick web search yields: Vt = Tidal Volume, RR = Respiratory Rate, MV = Minute Volume, Exp Pressure = Expiratory Pressure

I'm not sure about the two mask pressures
Doh! I should have looked closer. Thanks alterego61.
So that means they've elected not to show Tidal Volume, Resp Rate or Expiratory Pressure for the S9 Autoset in ResScan 3.10, even though they're recording the data. I wonder why they did that?

You'll notice the S9 data in ResScan has AHI - a graph of data that does not show up here. Perhaps I missed an edf file with the data...

_________________
Mask: ResMed AirFit™ F20 Mask with Headgear + 2 Replacement Cushions
Additional Comments: Pressure: APAP 10.4 | 11.8 | Also Quattro FX FF, Simplus FF

User avatar
dsm
Posts: 6996
Joined: Mon Jun 20, 2005 6:53 am
Location: Near the coast.

Re: Reverse-engineering Oximetry for ResScan 3.10. Can we do it?

Post by dsm » Wed Apr 28, 2010 4:13 pm

DD

Interesting info.

Will try to get back & look more into it & also see if I can extract a data file from a Nonin 3012 unit.

DSM
xPAP and Quattro std mask (plus a pad-a-cheek anti-leak strap)

User avatar
dsm
Posts: 6996
Joined: Mon Jun 20, 2005 6:53 am
Location: Near the coast.

Re: Reverse-engineering Oximetry for ResScan 3.10. Can we do it?

Post by dsm » Wed Apr 28, 2010 4:20 pm

alterego61 wrote:
dsm wrote:I have the ResScan SpO2 units & could look at collecting the file from one.
I am sure we can format the data into a file format that ResScan recognizes.

The SpO2 units are the 3012 Nonin xPod/iPod units.

DSM
Hi DSM, thanks for the feedback. If I read you correctly, you have the oximeter model that the s9 is likely to require (Nonin 3010), but not the s9 oximetry interface - is that right?

I have Nonin models 3011, 3012 & 3212 but can't see a 3010 listed anywhere ? was wondering where that info came from ?.

I finally discovered a couple of months back that the Reslink uses the 3012 (& by default the 3212 as well). The 3010 sort of implies
a lot lower sampling rate. The 3011 does 3 bytes per second while the 3012 delivers 255 bytes of data per second. The 3010 thus
by deduction looks like an older model that samples at a lot lower rate. I would have guessed that the S9 used the 3012.

DSM
xPAP and Quattro std mask (plus a pad-a-cheek anti-leak strap)

User avatar
DreamDiver
Posts: 3082
Joined: Thu Oct 04, 2007 11:19 am

Re: Reverse-engineering Oximetry for ResScan 3.10. Can we do it?

Post by DreamDiver » Thu Apr 29, 2010 3:02 pm

Given that the Contec firmware does things at 1hz rather than 3hz in the Nonin model, as suggested by dsm, I'm not sure we would be able to rig up software to interface with ResScan 3.10. At least, I'm pretty sure this is a level of complexity that is beyond the scope of my current capabilities. The fact that there is an entire pane just for oximetry suggests the data may need to be in a very specific format in order for information to show properly in that pane. However, at least it is nice to be able to take the data from the S9 and pair it with contec oximetry using EDFBrowser.

_________________
Mask: ResMed AirFit™ F20 Mask with Headgear + 2 Replacement Cushions
Additional Comments: Pressure: APAP 10.4 | 11.8 | Also Quattro FX FF, Simplus FF

User avatar
alterego61
Posts: 83
Joined: Wed Aug 26, 2009 10:11 pm
Location: Ontario, Canada

Re: Reverse-engineering Oximetry for ResScan 3.10. Can we do it?

Post by alterego61 » Thu Apr 29, 2010 7:16 pm

DreamDiver wrote:
alterego61 wrote:A quick web search yields: Vt = Tidal Volume, RR = Respiratory Rate, MV = Minute Volume, Exp Pressure = Expiratory Pressure

I'm not sure about the two mask pressures
Doh! I should have looked closer. Thanks alterego61.
So that means they've elected not to show Tidal Volume, Resp Rate or Expiratory Pressure for the S9 Autoset in ResScan 3.10, even though they're recording the data. I wonder why they did that?

You'll notice the S9 data in ResScan has AHI - a graph of data that does not show up here. Perhaps I missed an edf file with the data...
I don't have the files with me here, but the EVE file contains the event data - perhaps it is calculated from that?

_________________
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: APAP 5-7, EPR 1, ClimateLine Hose, ClimateControl Auto 27C/80F, ResScan 3.10 / Win7 64, 16GB SanDisk Ultra Class 4 (15MB/s) SD Card