OK, we finally have a successful mechanism to import, store, extract and synchronize Zeo brainwaves and sleep stage classifications (gathered real-time), CMS50E heart rate and spO2 (gathered post-sleep) and now data from the ResMed S9 AutosSet (post-sleep also). The CMS50E data we, in theory, could capture in real-time as well, but we will leave it a post-sleep import for now. If we need to do something with it in real-time we'll do it.
Here's an example chart of such synchronized data:
So, in our database we have:
Zeo (real time)
Delta, Theta, Alpha, Beta 1, Beta 2, Beta 3, Gamma, Sleep Stage,
Mask Pres, Therapy Pres, Exp Press, Leak, RR, Vt, MV, Snore Index, FFL Index, Flow_HD, Mask Pres_HD
Next, I'll come up with a way to summarize various measures from these time series on a nightly basis, as I think I want to analyze and optimize on a nightly basis... what happened the day(s) before, what happened during the night and how will I feel the next day.
As a part of this, I will also create my own "Sleep Stage" metrics, probably not following the medical standards, but something more meaningful. Sleep is not "binary mutually exclusive states" (Wake, Light, Deep, REM) but as can be seen in the brainwaves, a continuous shifting between various forms of sleep.