Web service for viewing Respironics data

General Discussion on any topic relating to CPAP and/or Sleep Apnea.
cpapdork
Posts: 103
Joined: Sat Nov 27, 2010 7:57 am
Contact:

Web service for viewing Respironics data

Post by cpapdork » Tue Dec 28, 2010 1:56 am

In case anyone finds it useful, I wanted to let you know I've created and shared a simple web application for viewing PR CPAP data. This information was first discussed in another topic (viewtopic.php?f=1&t=55722) but I thought many of you wouldn't find it buried in the bottom of a technical topic.

You can go here to try out the "RP System One Data Viewer" http://www.hoolehan.com/onkor/

Please note this isn't a commercial application. I'm just a computer nerd who had a bit too much free time over my Christmas vacation. However, I am aware of potential privacy concerns, so please read the statement on the Viewer page before submitting any of your own data.

I've only tested with my machine, so if you have any feedback on how it works with your own datafiles, please give!

Lastly, I don't have Encore or Encore Viewer nor have ever seen any screenshots of it. So if anyone can provide some information about Encore graphs, I'd appreciate if you could help me determine the scale of and units of the Y axis of my graphs.

I hope you find this helpful!
Image

User avatar
robysue
Posts: 7520
Joined: Sat Sep 18, 2010 2:30 pm
Location: Buffalo, NY
Contact:

Re: Web service for viewing Respironics data

Post by robysue » Tue Dec 28, 2010 3:24 am

Cpapdork,

You have a neat piece of work here. I've been up way too late myself tonight unable to sleep. I'll look at some of my old graphs in ResScan and let you know what the units on those graphs were in tomorrow, but I believe they measure the estimated airflow into the patient's nose/upper airway measured in L/min. I can say the numbers on your applet's y-axis for the .005 files that I uploaded tonight look just like the numbers I've seen for the same shaped and sized waves I've seen in ResScan before. I have Encore Viewer installed, but not Encore Pro. I hope to get Pro installed one of these days or weeks. When I do, I'll be happy to compare what you're graphs show to theirs to help you with the debugging process.

Couple of suggestions for potential improvements in a possibly long term future:

Refinements in the scales: Can the vertical axis have horizontal lines added at y= 25 and 75? Or unlabeled lines at y= multiples of 10? Could a tick mark be added for time values for the start of each minute on the t-axis in the zoomed-in axis?

And any way an option could be added to allow a user to adjust the time from GMT to the user's local time?

I know that lots of posters gave you a quizzical why bother on the other thread. But I appreciate the work you've done here. You asked to see a screen shot of how Encore Viewer presents it's data. Encore Viewer is nice in that it gives you a pretty scatter gram of all events for the entire night in one small graph full of tick marks that can be digested instantly for number of events and rough distribution as you can see here:

Image

As you can see, the time axis is labeled in a really oddball way and there's no way to tell how long the events lasted. And if you wind up having a bunch of events on top of each other, it's difficult to tell how many events are in the cluster. Also, Encore Viewer (the patient software) doesn't let you see the wave form data. In Encore Pro (the clinical version of the software), the wave form data gives you information about about both the length of the events and how many events stack up on top of each other in nasty clusters.

_________________
Machine: DreamStation BiPAP® Auto Machine
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Additional Comments: PR System DreamStation and Humidifier. Max IPAP = 9, Min EPAP=4, Rise time setting = 3, minPS = 3, maxPS=5

User avatar
M.D.Hosehead
Posts: 742
Joined: Thu Jun 24, 2010 7:16 pm
Location: Kansas

Re: Web service for viewing Respironics data

Post by M.D.Hosehead » Tue Dec 28, 2010 4:34 am

GOOD JOB, cpapdork! This answers a major need for (at least some) EV 2.0 users. I'll try uploading some .005 files later today.

And robysue,
any way an option could be added to allow a user to adjust the time from GMT to the user's local time?
cpapdork's readouts are labeled in clock time. Obviously, that information is in the .005 file, assuming you have set the GMT offset in the machine--and Respironics took extra trouble to cripple that in the $100 "consumer" version of their software. Grr
there's no way to tell how long the events lasted
Look at the right-hand panel on cpapdork's Data Viewer and there's the info. You don't even have to hunt for it.
Also, Encore Viewer (the patient software) doesn't let you see the wave form data.
Here's where Data Viewer grabbed the gold ring. Zoom in far enough and BEHOLD the waveform is there. No need for Encore Pro.

Fabulous! Thanks, cpapdork!

_________________
Mask: Forma Full Face CPAP Mask with Headgear
Additional Comments: MaxIPAP 15; MinEPAP 10; Also use Optilife nasal pillow mask with tape

User avatar
howkim
Posts: 482
Joined: Fri Mar 06, 2009 8:36 am
Location: South Florida

Re: Web service for viewing Respironics data

Post by howkim » Tue Dec 28, 2010 6:45 am

CPAPdork,

Just for giggles and grins, I looked at the website. I tried to view your sample data and, after the screen wound itself up, got a blank white screen. What format is the image in? I may not have the correct software to view it. If I don't, others may not either.

_________________
Machine: PR System One REMStar 60 Series Auto CPAP Machine
Additional Comments: Encore Basic Software; Pressure >7
Howkim

I am not a mushroom.

User avatar
janeysmom
Posts: 50
Joined: Wed Jan 13, 2010 1:06 pm

Re: Web service for viewing Respironics data

Post by janeysmom » Tue Dec 28, 2010 5:32 pm

Thanks Cpapdork. I went ahead and tried your website and was able to get the data to come up on the website. I am however still a little confused on what I am looking at.

I understand the x axis represents the time, however unsure what the y axis should represent because the number range is between 100 and -100. I am having a hard figuring whether it should show apneas or is it leaks or AHI or what? Also, I noticed that one .005 file appeared to be scatter plot while the others I looked at were line graphs.

Thank you so much for working on this because the Encore Pro software doesn't work on my laptop as I have a 64 bit OS system. And like many others I would love to be able to read and understand my data.

Katie
User since January 2010

User avatar
Hawthorne
Posts: 3972
Joined: Tue Oct 19, 2004 4:46 am
Location: London Ontario -Canada

Re: Web service for viewing Respironics data

Post by Hawthorne » Tue Dec 28, 2010 7:02 pm

I'm getting just a blank white screen as well, after it appears to load.

Any suggestions?

_________________
Machine: DreamStation Auto CPAP Machine
Mask: AirFit™ P10 Nasal Pillow CPAP Mask with Headgear
Humidifier: DreamStation Heated Humidifier
Additional Comments:  Backups- FX Nano masks. Backup machine- Airmini auto travel cpap

cpapdork
Posts: 103
Joined: Sat Nov 27, 2010 7:57 am
Contact:

Re: Web service for viewing Respironics data

Post by cpapdork » Wed Dec 29, 2010 2:12 am

Thanks robysue and hosehead for the input. The screenshots you supplied, robysue, help a lot. They definitely indicate there's a lot more data (perhaps in the 003 and 001 files) that can be potentially captured.

Sorry for the white screen some are getting. I'm afraid I haven't tested this is in browsers other than Firefox and Chrome. If you're using another, such as Internet Explorer, there might be problems. I'll try to get a copy of IE somewhere and take a look.

The application is entirely javascript and html, so there's plenty of room for error with different browsers I'm afraid. If you can tell me what browser you're using, it would help a great deal.
Image

User avatar
Hawthorne
Posts: 3972
Joined: Tue Oct 19, 2004 4:46 am
Location: London Ontario -Canada

Re: Web service for viewing Respironics data

Post by Hawthorne » Wed Dec 29, 2010 5:18 am

I use Internet Explorer 8.

_________________
Machine: DreamStation Auto CPAP Machine
Mask: AirFit™ P10 Nasal Pillow CPAP Mask with Headgear
Humidifier: DreamStation Heated Humidifier
Additional Comments:  Backups- FX Nano masks. Backup machine- Airmini auto travel cpap

cpapdork
Posts: 103
Joined: Sat Nov 27, 2010 7:57 am
Contact:

Re: Web service for viewing Respironics data

Post by cpapdork » Wed Dec 29, 2010 7:28 am

I made some changes to deal with IE. However, I think IE struggles with displaying that many datapoints, so you may have trouble viewing the main graph. The speed of your computer might make a difference though.

Seems like firefox and chrome can load the page even on pretty low-end computers.
Image

User avatar
Hawthorne
Posts: 3972
Joined: Tue Oct 19, 2004 4:46 am
Location: London Ontario -Canada

Re: Web service for viewing Respironics data

Post by Hawthorne » Wed Dec 29, 2010 8:18 am

Now it says it is causing my browser to run slowly and a warning that the browser may become unresponsive if I continue.

I get a choice of continue or ending it. I chose to end it.

I'd like to see this but it does not seem likely with Internet Explorer.

_________________
Machine: DreamStation Auto CPAP Machine
Mask: AirFit™ P10 Nasal Pillow CPAP Mask with Headgear
Humidifier: DreamStation Heated Humidifier
Additional Comments:  Backups- FX Nano masks. Backup machine- Airmini auto travel cpap

cpapdork
Posts: 103
Joined: Sat Nov 27, 2010 7:57 am
Contact:

Re: Web service for viewing Respironics data

Post by cpapdork » Wed Dec 29, 2010 8:58 am

Hawthorne wrote:I'd like to see this but it does not seem likely with Internet Explorer.
You may be right. IE does not currently natively support the HTML5 canvas object. It has to be emulated with some extra javascript, which makes it rather slow.

IE 9, when it comes out, will support HTML5 canvas and so should be able to run this better.
Image

User avatar
M.D.Hosehead
Posts: 742
Joined: Thu Jun 24, 2010 7:16 pm
Location: Kansas

Re: Web service for viewing Respironics data

Post by M.D.Hosehead » Wed Dec 29, 2010 2:30 pm

I had no trouble getting a report using Firefox and Mac.

One wrinkle--and it's not something cpapdork can fix--is that PRS1 sometimes makes several .005 files in one night. If I turn the machine off and on again, for a p-break for example, of course, the PRS1 starts a new .005 file when I turn the machine on again.

But sometimes, the machine starts a new .005 for no apparent reason. Some of these are only a few minutes' duration. And some of the .005 files only contain a flat line. (A FLAT LINE Should I be worried?)

EV 2.0 pastes these together to give a report for the whole night. But working manually, you have to hunt for the particular .005 file that contains the information you are looking for.

Also, (I don't know whether this can be fixed) some of the events flagged in the EV 2.0 report aren't marked with a red line in the waveform. Last night, there were three red lines and all 3 "Events" were reported by Data Viewer 0.3. But the EV 2.0 report says I had 8 CA's, one OA, and 2 hypopneas. All of them are in the waveform if I hunt for them, but they don't have a red line, and they weren't reported by Data Viewer 0.3.

It certainly doesn't help that the vertical time marker lines in the EV 2.0 reports fall at odd clock times, e.g. last night I turned the machine on at 23:19, so the vertical markers fall at 00:19, 01:19, 02:19, ... I have to interpolate that a particular flag occurs at about 01:05, so that I can hunt for it in the waveform, (where it will be found at approximately 07:05 GMT.) $100 for crippled software really frosts me.

One thing easy to fix is: the legend on the report says all times are GMT. However, though the time scale on the waveform is indeed GMT, the "Dataset Range," "Current View," "Current Selection" and "Events" are in local time. That confused me until I figured it out. It would help if the legend spelled that out.

cpapdork still rates a big thankyou from me, for making the waveform available.

_________________
Mask: Forma Full Face CPAP Mask with Headgear
Additional Comments: MaxIPAP 15; MinEPAP 10; Also use Optilife nasal pillow mask with tape

cpapdork
Posts: 103
Joined: Sat Nov 27, 2010 7:57 am
Contact:

Re: Web service for viewing Respironics data

Post by cpapdork » Thu Dec 30, 2010 5:56 am

Glad it's helpful to you hosehead. You're welcome!

I think i'd eventually like to support uploading a zip file of 005 files and then show a directory of times/dates that can be browsed. I didn't know there were cases that multiple 005 files could be created... Since there are, I guess this feature would be helpful.

Regarding the "Event" detection -- First, a disclaimer: as I don't want to get in trouble with anyone, I specifically don't make any mention of detecting apneas or any other clinical condition. Second, i don't know yet how (if it is even possible) to retrieve "Event" data from the PR files.

However, it was clear from the waveforms that "quiet" areas were visible. I came up with an algorithm to detect some of them, which is as follow:
1) First I take a root mean square (RMS) of the samples with a block size of 10 samples (2 seconds)
2) I detect blocks with RMS values < .04
3) Any consecutive sequence of 7 or more such blocks are marked as an event

Thus, events must be at least 14 seconds and have a precision of 2 seconds.

ALL of those calculations were just pulled out of thin air because I have no idea how an apnea or any other event is actually calculated.

I would love to hear if anyone knows how any of these events might be calculated.
Image

cufamtx
Posts: 4
Joined: Sun Nov 14, 2010 5:30 pm

Re: Web service for viewing Respironics data

Post by cufamtx » Fri Dec 31, 2010 6:48 pm

I sent a couple of files today. I'll keep sending them if it helps.

Thanks for making the waveform data available. Little shocked to see a 24 second event. I can't even hold my breath that long when awake.

Deborah

_________________
Mask

User avatar
M.D.Hosehead
Posts: 742
Joined: Thu Jun 24, 2010 7:16 pm
Location: Kansas

Re: Web service for viewing Respironics data

Post by M.D.Hosehead » Fri Dec 31, 2010 7:47 pm

3) Any consecutive sequence of 7 or more such blocks are marked as an event
If I'm following correctly, you have the ability to change your algorithm to mark 5 consecutive blocks (10 seconds) as an "event".

I believe that would coincide with the PRS1 algorithm. Thus, your app would report the location in clock time of every event flagged on the EV 2.0 printout. That would make it easy to go right to place on the waveform I want to examine. I suppose you may have to adjust the RMS threshold, too.

The point is I could then see whether EV 2.0 flagged an artifact, or conversely, missed an event.

This is getting good!

_________________
Mask: Forma Full Face CPAP Mask with Headgear
Additional Comments: MaxIPAP 15; MinEPAP 10; Also use Optilife nasal pillow mask with tape