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

OSCAR Overview Chart AHI Bars are Wrong Size?
#1
OSCAR Overview Chart AHI Bars are Wrong Size?
Recently, I've occasionally had trouble falling asleep until I take off my machine (then I sleep fine, though I wake up less oxygenated).  When I check the next day, I usually find that the whole time I was trying to fall asleep was just a long string of CAs and hypopneas, with a crazy-high AHI. But on the Overview page, the AHI bars don't match up -- the short day might be AHI 20 (over 15-20 minutes) while the next day might be 4 (over 5 hours).  But the 4 bar is taller than the 20 bar.

Why is that?

           
Post Reply Post Reply
#2
RE: OSCAR Overview Chart AHI Bars are Wrong Size?
Wow, THAT looks wrong. Somebody who knows the graphing code will need to check that one out.
Post Reply Post Reply
#3
RE: OSCAR Overview Chart AHI Bars are Wrong Size?
Actually, I had an idea that might explain it.  I have an SPO2 monitor that I use, and those sessions are always 6-8 hours, even when I give up on CPAP after 15 minutes or whatever.  So perhaps the bar-graph is showing the AHI divided by the total length of data for the day.  On a day when CPAP and SPO2 sessions are the same, it's a wash.  But when CPAP is shorter than SPO2, perhaps the AHI is being divided by the SPO2 session time, giving an unexpectedly low value.
Post Reply Post Reply
#4
RE: OSCAR Overview Chart AHI Bars are Wrong Size?
That's a real possibility!

Take a look at those days, and scroll down to the bottom in the left panel. It will show you the sessions from each device you used that day, along with its duration.

I think the daily graph will also extend from earliest to latest timestamp on that day.

Do those confirm your theory?
Post Reply Post Reply
#5
RE: OSCAR Overview Chart AHI Bars are Wrong Size?
I figured I'd take a look at this today, so I pulled the latest code and built it.  Loaded a new profile from my CPAP machine (only) and the summary bars look good.  Then I loaded SPO2 data from some of the short-session, high-AHI days (SPO2 session much longer than CPAP session), and the summary bars still look fine.

Looking at gSessionTimesChart.cpp:1263 gAHIChart::populate(), I think I see where the problem might be.  This routine calculates hours as an overall value (not using the hours(machineType) method of Days) and then divides the various event counts by the total hours.  I think populate() at 1267 should pass MT_CPAP to hours().

However, since I don't currently have a bad display to try to fix, it's possible that the problem has been fixed somewhere else.

I'll keep an eye on it, and if I see the error turn up again, I'll try the above and report whether it helps.

Regards,
sw
Post Reply Post Reply
#6
RE: OSCAR Overview Chart AHI Bars are Wrong Size?
I think you are right. I've made a note of it, and I will try to find a way to test it.
I want to verify the kinds of codes included in calcitems.
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
#7
RE: OSCAR Overview Chart AHI Bars are Wrong Size?
Thanks for digging into this, that was a huge help! Looking at the code, I'm pretty sure you're right. I'm going to see if I can come up with a test case to reproduce it and test the fix.
Post Reply Post Reply
#8
RE: OSCAR Overview Chart AHI Bars are Wrong Size?
(03-29-2020, 02:52 PM)pholynyk Wrote: I think you are right. I've made a note of it, and I will try to find a way to test it.
I want to verify the kinds of codes included in calcitems.

This is in the constructor of gAHIChart (in the header file). I'm going to work on a test case, since I have lots of test data to play with, and I can slice PRS1 data down into short sessions, so I should be able to come up with a test case.
Post Reply Post Reply
#9
RE: OSCAR Overview Chart AHI Bars are Wrong Size?
@spacewrench you were exactly right! Nearly every other call in that file to day->hours() uses day->hours(m_machtype) which uses the type passed to the constructor (MT_CPAP).

What I noticed in reproducing this with a test case is that the usage chart was similarly wrong: it would show 8 hours of usage for a night with 1 hour of CPAP and 8 hours of oximetry. I'm about to merge a fix for both.

(After I fix another issue I found on the welcome screen.)
Post Reply Post Reply
#10
RE: OSCAR Overview Chart AHI Bars are Wrong Size?
What's that they say?  "An old clock is right twice a day"?  Something like that, anyway :-)
Post Reply Post Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Time listed: Wrong end time? How to fix? Plmnb 5 202 03-08-2024, 08:57 AM
Last Post: Crimson Nape
  Wrong Equipment Displayed During Oscar startup Aknakon 4 496 01-18-2024, 07:32 PM
Last Post: Crimson Nape
  Adding charts to Overview? bstabens 1 412 11-24-2023, 08:32 AM
Last Post: pholynyk
  CPAP Usage Record with a Wrong Value? hisaotsu 3 452 10-10-2023, 10:42 AM
Last Post: Gideon
  OSCAR Overview Pressure Plot not showing real Max sopherFellow 15 2,241 09-09-2023, 07:04 PM
Last Post: edfreeman
  Chart Organization in Oscar 1.5 theMezz 5 596 09-05-2023, 09:02 AM
Last Post: theMezz
  [Feature Request] EPR mode in overview pressure graph tossinandturnin 8 853 07-24-2023, 06:24 AM
Last Post: tossinandturnin


New Posts   Today's Posts


About Apnea Board

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