Hello Guest, Welcome to Apnea Board !
As a guest, you are limited to certain areas of the board and there are some features you can't use.
To post a message, you must create a free account using a valid email address.

or Create an Account


New Posts   Today's Posts

Importing SpO2 data so that AirSense thinks that it recorded it?
#1
Importing SpO2 data so that AirSense thinks that it recorded it?
Edited to say that AFTER I posted this I saw bollar's thread, which makes all of this moot -- it appears that OSCAR doesn't know how to read SAD files yet, as there are only about 3 people who can afford the setup, LOL. But maybe this is a good idea for the purposes of faking things?

http://www.apneaboard.com/forums/Thread-...d-Oximeter


Ok, like every software idea that comes from the "a little knowledge is a dangerous thing" corner, this is either laughably stupid, or kind of clever. This is specifically a question for whomever are the resident OSCAR experts on the file/data structure of ResMed SD cards and/or pulse-oximetry data.

I know that the Air10 has a plug-in port for a pulse oximeter -- actually I think there's a controller module that plugs into the port behind the door in front of where the filter goes, and then a pulse oximeter plugs into that. And I know that the controller and the pulse-ox are designed for institutional use (patient after patient in a hospital, and DMEs renting them out to different patients for short periods of time, etc.) and are hardened for that use and quite expensive.

I'm speculating that when you plug in the (expensive) ResMed controller/pulse-ox and use it, the machine writes the data out to the SD card? So you end up with the pulse-ox data being additional channels in the data stream? Looking at a day's DATALOG files

Code:
% ls -ltR ./DATALOG/20210712
total 6816
-rwxrwxrwx  1 cathy  staff        8 Jul 13 06:32 20210713_004725_PLD.crc
-rwxrwxrwx  1 cathy  staff   273630 Jul 13 06:32 20210713_004725_PLD.edf
-rwxrwxrwx  1 cathy  staff        8 Jul 13 06:32 20210713_004725_SAD.crc
-rwxrwxrwx  1 cathy  staff    84514 Jul 13 06:32 20210713_004725_SAD.edf
-rwxrwxrwx  1 cathy  staff        8 Jul 13 06:32 20210713_004724_BRP.crc
-rwxrwxrwx  1 cathy  staff  3106970 Jul 13 06:32 20210713_004724_BRP.edf
-rwxrwxrwx  1 cathy  staff        8 Jul 13 05:41 20210713_004715_EVE.crc
-rwxrwxrwx  1 cathy  staff     1168 Jul 13 05:41 20210713_004715_EVE.edf


it looks like the *_SAD.edf is the intended place to put that data?

Quote:% more 20210713_004725_SAD.edf

0       X X X X DCBD C580                                                               Startdate 13-JUL-2021 X X X SRN=23191671673  MID=36  VID=9                      13.07.2100.47.261024    EDF                                         345     60.00   3   Pulse.1s        SpO2.1s         Crc16                                                                                                                                                                                                                                                           bpm     %               18.00   0.00    -32768  300.00  100.00  32767   18      0       -32768  300     100     32767                                                                                                                                                                                                                                                   60      60      1                                                                                

So here's my question... Does OSCAR know how to take data loaded in from the Oxymetry Wizard (coming from all of the various and sundry formats that OSCAR supports) and write it back out into ResMed's *_SAD.edf file?

Where I'm going -- is it possible to create a new data directory which is a copy of my ResMed machine card, and transplant all of the *_SAD.edf files with files that contain the data from my (cheap) Contec pulse-ox, write that directory tree out to a new SD card, which I take with me to my sleep doctor, and then they can see my pulse-ox data in the (inferior to OSCAR) ResMed tool that they use?

I'm also wondering if the *_SAD.crc files are Cyclic Redundancy Check files on the *_SAD.edf files, and so if that's not also doctored up then it will be obvious that the data is not the original. Meaning that if the ResMed tool is all snooty about the CRC, that would raise the level of difficulty some more.
Post Reply Post Reply
#2
RE: Importing SpO2 data so that AirSense thinks that it recorded it?
(07-16-2021, 10:54 AM)cathyf Wrote: So here's my question... Does OSCAR know how to take data loaded in from the Oxymetry Wizard (coming from all of the various and sundry formats that OSCAR supports) and write it back out into ResMed's *_SAD.edf file?

No.

Quote:Where I'm going -- is it possible to create a new data directory which is a copy of my ResMed machine card, and transplant all of the *_SAD.edf files with files that contain the data from my (cheap) Contec pulse-ox, write that directory tree out to a new SD card, which I take with me to my sleep doctor, and then they can see my pulse-ox data in the (inferior to OSCAR) ResMed tool that they use?

While you could write files in EDF format, there would be nasty time synchronization problems to resolve, if it were even possible. And, or course, SAD files are used only for ResMed machines and creating this for any other manufacturer's machine would not be useful.

Quote:I'm also wondering if the *_SAD.crc files are Cyclic Redundancy Check files on the *_SAD.edf files, and so if that's not also doctored up then it will be obvious that the data is not the original. Meaning that if the ResMed tool is all snooty about the CRC, that would raise the level of difficulty some more.

Yes, the ResMed tool (ResScan) is very "snooty" about the CRC data being right. It will refuse to read the data card if the CRC values are not correct.

Also, as a general guideline, we don't want to create pseudo SD data cards.
Useful links
Download OSCAR (current version is 1.5.1)
Best way to organize charts
How to attach charts to your post

Apnea Board Monitors are members who help oversee the smooth functioning of the Board. They are also members of the Advisory Committee which helps shape Apnea Board's rules & policies. Membership in the Advisory Members group does not imply medical expertise or qualification for advising Sleep Apnea patients concerning their treatment.
Post Reply Post Reply
#3
RE: Importing SpO2 data so that AirSense thinks that it recorded it?
Aside from those points, OSCAR really does know how to read and display the SAD files. It's just that, for historical reasons unknown to the current developers,, the three items that the OP mentioned were left out when the other oximetry devices were added to SleepyHead.
Apnea Board Monitors are members who help oversee the smooth functioning of the Board. They are also members of the Advisory Committee which helps shape Apnea Board's rules & policies. Membership in the Advisory Members group does not imply medical expertise or qualification for advising Sleep Apnea patients concerning their treatment.
Post Reply Post Reply
#4
RE: Importing SpO2 data so that AirSense thinks that it recorded it?
Hi, am reading SPO2 and Pulse data from a cheap bluetooth oximeter via an ESP32 (THX @Andreas Spiess). It would be easy to generate synced SPO2 files for the OXI-wizard. But i am looking for a more elegant solution and try to find a way to autoimport this data into Oscar together with the CPAP-Sessiondata. Since i have an Resmed Airsense device the SAD.EDF files could be a good way.

After reading this thread i had a look at the resmed_loader.cpp. I am not good at reading code. But as far as i can see the SPO2 and Pulse values should be imported just the same way as the other data (Line 3116/3122).
1. Question: Has this function been added meanwhile?

Fortunatly the EDF-fileformat is pretty well documented and quiet easy to understand. Nevertheless i was not able to import any tweaked values into Oscar.
2. Question: Perhaps someone with a Resmed Oximeter addon would be so kind to send me a dataset of a short session via PM.  

3. Question: Are there any devices able to autoimport SPO2/Puls data into Oscar at startup (via CPAP-Importer)?


Thank you for this wonderful community. This forum has been a great source for information!
Post Reply Post Reply
#5
RE: Importing SpO2 data so that AirSense thinks that it recorded it?
There have been no changes since the previous posts.

Every CPAP machine has it's own data formats that OSCAR needs to import. Only ResMed machines can include oximetry data (in the SAD files). There is nothing automated about SpO2 data import except for the SAD files on a ResMed data card, if the machine had the ResMed oximeter. That attachment is very expensive.

To create such a file for a ResMed machine, you would have to replicate ResMed's SAD format completely, including CPAP machine identification in the header, before you imported the CPAP data. Changes also might be required to other files that report what features the CPAP machine has. You would have a difficult time synchronization problem as oximeters aren't going to have exactly right timestamps to match sessions reported by the CPAP machine.

Also, you will find that oximetry data on ResMed machines isn't reported separately in the oximetry statistics. (We will fix that in the future.)

Operationally, it would probably be easier to create files in one of the other oximetry formats and import as that.

We do not encourage modifications to the SD card as we do not want to create any doubt that your SD card is as originally created by your CPAP machine.
Useful links
Download OSCAR (current version is 1.5.1)
Best way to organize charts
How to attach charts to your post

Apnea Board Monitors are members who help oversee the smooth functioning of the Board. They are also members of the Advisory Committee which helps shape Apnea Board's rules & policies. Membership in the Advisory Members group does not imply medical expertise or qualification for advising Sleep Apnea patients concerning their treatment.
Post Reply Post Reply
#6
RE: Importing SpO2 data so that AirSense thinks that it recorded it?
(01-29-2022, 03:08 PM)GuyScharf Wrote: We do not encourage modifications to the SD card as we do not want to create any doubt that your SD card is as originally created by your CPAP machine.

This is an excellent point -- we absolutely do not want to get into some nasty place where The Borg accuses us of using OSCAR to commit insurance fraud! Cards should be read-only...

I have also noodled around with the idea of trying to hook up something that is essentially a wiretap in between the machine and the data card, where I would read the data being written in real time, and keep a bootleg copy on a second device. One result would be that we could know exactly how far the clock is off.

I suspect that when the software starts a new sleep session it creates all of the time-stamped files and then as the data is collected and logged it gets appended to its file. So if you were watching all night with a device that connected to a time server, and you saw a file named "20141217_021110_BRP.edf" and the first line had the string "17.12.1402.11.101024" embedded in it, then you would know the exact time that the file appeared and voila! could calculate the difference and get the time drift.

The point about using a cell phone or wristband to collect some data is that those are devices which not only have clocks, but ARE clocks, so they are all about knowing what time it is! If we could just get the @#$! cpap machines to set their clocks it would make things so much easier!
Post Reply Post Reply
#7
RE: Importing SpO2 data so that AirSense thinks that it recorded it?
(01-29-2022, 03:08 PM)GuyScharf Wrote: Also, you will find that oximetry data on ResMed machines isn't reported separately in the oximetry statistics. (We will fix that in the future.)

Operationally, it would probably be easier to create files in one of the other oximetry formats and import as that.

Thank you for your reply,
 
Please allow a follow-up question to clarify your answer:
Right now, the SPO-values are already being imported into Oscar via the SAD.EDF-files, but there is no way to see any sign of this imported data within Oscar(or its exports)? Correct?

Meanwhile i have followed your advice and build a first sketch for the ESP32 to generate SPO2-files. It reads the SPO2 and BPM-data via Bluetooth from the Oximeter, syncs time via Wifi and NetworkTimeServers and uploads the data to my PC via FTP into a resmed-styled folderstructure.

I could even sync the data with the Resmed-sessions by reading timestamps from the EDF-files to get rid of values outside of the Resmed-sessions – but I don’t need that function.

Thank you for your help and for your effort in developing Oscar!
Post Reply Post Reply
#8
RE: Importing SpO2 data so that AirSense thinks that it recorded it?
(02-05-2022, 06:58 PM)BobbyB Wrote: Right now, the SPO-values are already being imported into Oscar via the SAD.EDF-files, but there is no way to see any sign of this imported data within Oscar(or its exports)? Correct?

Not quite correct. SpO2 values from the ResMed oximetry attachment are reported in SAD EDF files. That import mechanism is used only for the ResMed oximetry device, not for any others. So it is actually unusual for pulse-ox data to be imported through SAD EDF files because the device is so expensive. Other oximetry devices report in their own format, some of which OSCAR will import.

I believe that SAD data is visible in the graphs even though it does not show up as oximetry data in the left panel of the Daily page or on the Overview or Statistics pages.
Useful links
Download OSCAR (current version is 1.5.1)
Best way to organize charts
How to attach charts to your post

Apnea Board Monitors are members who help oversee the smooth functioning of the Board. They are also members of the Advisory Committee which helps shape Apnea Board's rules & policies. Membership in the Advisory Members group does not imply medical expertise or qualification for advising Sleep Apnea patients concerning their treatment.
Post Reply Post Reply
#9
RE: Importing SpO2 data so that AirSense thinks that it recorded it?
(01-29-2022, 03:08 PM)GuyScharf Wrote: We do not encourage modifications to the SD card as we do not want to create any doubt that your SD card is as originally created by your CPAP machine.
This would in effect say the data came from a source other than where it actually came from.  At no time ever will OSCAR do this!  


Feel free to show your doctor your OSCAR files, give him the opportunity to give you an overnight, or several  nights O2 Sat test.
Post Reply Post Reply
#10
RE: Importing SpO2 data so that AirSense thinks that it recorded it?
(02-05-2022, 07:29 PM)GuyScharf Wrote: I believe that SAD data is visible in the graphs even though it does not show up as oximetry data in the left panel of the Daily page or on the Overview or Statistics pages.

I think 1.3.1 fixed its absence in the Overview. I don’t know about the other two pages.
Post Reply Post Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Oscar crashes when importing Wellue O2 ring data Armorwolf 22 572 11-29-2024, 03:08 PM
Last Post: Crimson Nape
Question Spo2 data format Squid3083 12 3,379 11-27-2024, 06:14 AM
Last Post: aradhana
  Export Wellue SpO2 data herenthere 0 72 11-25-2024, 07:37 PM
Last Post: herenthere
  Importing large lump of data into OSCAR PaulaO2 2 343 11-20-2024, 05:51 AM
Last Post: srlevine1
  Oscar "No Supported Data Found" Resmed Airsense 11 cpapmj 8 1,226 11-06-2024, 10:02 PM
Last Post: Rosew
Question Importing blood oxymetry data from Samsung Health Scarmen 7 2,845 10-27-2024, 01:36 PM
Last Post: LoudSnorer
  Importing data from 2 SD cards problem dabrat76 5 384 09-23-2024, 06:50 PM
Last Post: edfreeman


New Posts   Today's Posts


About Apnea Board

Apnea Board is an educational web site designed to empower Sleep Apnea patients.