Friday, August 17, 2012

Looking at the same data in Encore and SleepyHead

I've been gathering detailed data about my PAP therapy, my insomnia, and the all important "how do I feel?" data since April 2010. I've been looking at my PAP data in both Encore and in SleepyHead. All my SleepyHead data is now in SH 0.9-2. And I thought it might be useful to folks if I showed how both software packages show the same set of data.

For this exercise, I've chosen the night of July 1, 2012. Note that bedtime was 2:52 AM on July 2. This was the night when I broke my left pinky when I was out on my nightly walk/jog, so pain was an issue: At the ER, all the doc did was pull the broken and dislocated finger straight, buddy taped it to the ring finger, took x-rays, and informed me that I needed to see a hand specialist the next day because the finger likely needed to be pinned. Because of the pain, I took a sonata that night. Undoubtedly those things adversely affected my sleep that night because this was a night where my snoring was much worse than it normally is and the AHI is a bit higher than it typically is.

Here's the night's data in Encore:

ev-data



And here's the same night in SH:

sh-data



AHI and the other indices

If you look at the index numbers, you'll see that the only difference between the AHI, OAI, CAI, HI, FLI, and REI numbers are that SH rounds to two decimals and Encore rounds to one decimal. If you round the SH numbers to one decimal, you get the Encore numbers.

But clearly that's not the case for the VSI numbers. Encore reports a VSI = 63.8 and SH's VSnore Index = 7.43. Of course, the SH VSnore index only includes VS1s. But even if we take the VS2s into account, it's still impossible to immediately reconcile the Encore VSI with SH data. Clicking on the events tab for this night reveals that SH says there were 48 VS1s and 57 VS2s recorded during the night. That's a total of 105 snores altogether. And if we compute a snore index in the usual way, we'd expect:
snore index = (105 snores)/(6.45833333 hours) = 16.258
Interestingly, our computed snore index is about 1/4 the size of Encore's VSI. But it's not clear at all how Encore is computing the VSI. Digging deeper into the snore data, I can show that on this particular night:
(Sum of the VS2 parentheses numbers)/(usage time) = Encore VSI
I have no idea if this is the real definition of the Encore VSI or just an interesting coincidence. And I don't want to get too side tracked by the snore data---that's another post I intend to write later.


Leak data

Notice that Encore reports the average total leak, but I've chosen "median" for the middle computations in SH. However, SH computes the "averages" for each of the items listed in the left sidebar even if you've set the default to "median". To see these "averages", all I have to do is hover my mouse over the name and the "average" will appear in a pop-up box.

On this night, the median leak rate just happens to be pretty close to the average leak rate. (That's a mathematical coincidence.) Sleepy Head computes the average leak rate as 18.03 L/min, which rounds to Encore's 18.0 L/min average leak rate. I find that usually the SH average leak rate and the Encore average leak rates are typically pretty close.

The leak line in Encore looks much flatter than the one shown in SH. That's because of the scale of the vertical axis in each graph: My leak data on this night is trapped in an 8 L/min range (from a low of 15 L/min to a high of 23 L/min). On the SH graph, the total range for the graph is from 10 L/min to 30 L/min. So the leak data fill up just over a third of the available space in the vertical direction. But the vertical range for the Encore graph is from 0 L/min to 140 L/min, and my data takes up only 1/16 of that range. Hence the bumps look much smaller in Encore than they do in SH. And for newbies: This night's leak line is a really nice leak line.


Pressure data

The 90% pressure data is problematic: Ever since I switched to SH 0.8.8, I've noticed that SH almost always gives me integer values for the 90% pressure data, but it reports it to two decimals. In other words, rounding the SH 90% pressure data to one decimal doesn't change it. The difference between Encore's 90% IPAP = 7.9 and SH's 90% IPAP = 8.00 doesn't seem big enough to worry about.

But Encore's 90% EPAP = 5.5 and SH's 90% EPAP = 6.0 differ by 0.5 cm and my max EPAP = 6cm, so that's a pretty large discrepancy. And for the 90% EPAP, large discrepancies between Encore and SH seem to be common in my data. So which software should I believe for the 90%b EPAP number?

It's worth pointing out that JediMark, the author of Sleepy Head, knows that there are some problems with how he is computing 90% and 95% numbers. But it's also useful to point out that Encore's 90% numbers do not always make sense eirther.

For this night's data I can get a rough idea of which is more likely the correct number by doing a bit of basic arithmetic: I used the machine for 6:27:31, which is close enough to 6:30 for approximations. And 10% of one hour is 6 minutes. So 10% of 6.5 hours is 6*6.5 = 39 minutes. So the question becomes: Can we find about 40 minutes or so of time with the EPAP pressure at around 6 cm? If so, then the 90% EPAP = 6. And in eyeballing the pressure curve, it's clear the EPAP = 6 for at least 30 minutes between 3:00 and 4:30 and it's also clear that the EPAP = 6 for at least 30 minutes between 7:00 and 8:00. Hence, it's clear that EPAP = 6 for at least an hour, which indicates that the 90% EPAP really should be reported as 6cm instead of 5.5cm.

Thursday, August 2, 2012

Data available on the ResMed S9's LCD

The ResMed S9 AutoSet and S9 Elite have a wealth of efficacy data available right on the machine's LCD. The available on-screen data runs rings around the woefully inadequate data provided by the PR System One's LCD. (Note that if you are willing to download the System One data into Sleepy Head or Encore, all the bells and whistles of full efficacy data are there. It's just the System One's on-board data that sucks.)

But many newbie users of the Resmed S9 are not shown how to access the LCD's efficacy data by the DME that sets up their machine.

So---if you are using a Resmed S9 Elite or a resmed S9 AutoSet and you want to know how to get to the LCD's efficacy data and what that efficacy data tells you about the quality of your therapy, this post should answer your questions.

Step-by-step instructions on how to get to the Sleep Quality Report on your S9's LCD

  1. Press the info button on the S9 to get into the Short Sleep Quality Report. You should see your Usage for the night, an icon indicating Mask Fit for the night, and the AHI for the night. Note that Mr. Red Frowny Face shows up if your excess leak rate is AT or ABOVE 24 L/min for at least 30% of the night. If you only see the Usage data, your DME has locked you out of the full Sleep Report Data. Take the machine back to theDME and demand that they change the setting for Sleep Quality from Usage to On. Or learn how to get into the clinical menu and set Sleep Quality to On yourself.
  2. If you want more detailed information, you can go from the short Sleep Quality Report to the more detailed Long Sleep Quality Report by holding both the info and the double check buttons down at the same time for three seconds or so. You may notice a brief flash.
  3.  Use the large round knob to scroll down ONE icon on the left hand list of icons. You should now see the top of the detailed Sleep Quality menu. And then CLICK the round button to select the detailed Sleep Quality menu. This will now let you scroll all the way through the detailed Sleep Quality menu to see the AHI, AI, and CAI, which are at the bottom of this menu. It will also allow you to change the data period from 1 Day to 1 Week to 1 Month to 3 Months to get an idea of the averages of the data over longer time frames than over night.


Information on what data is available on the S9's LCD in the Long Sleep Quality Report

 

The S9's software detects four types of respiratory events: Obstructive apneas, central apneas, unknown apneas, and hypopneas. The unknown apneas are events that the S9's algorithm detects as apneas, but cannot tell whether the apnea is obstructive or central with enough certainty to classify them.

The AHI number is the Apnea/Hypopnea Index for the reporting period, which on the S9 LCD is typically the overnight number. For overnight (one day) data, the AHI is computed by the S9 as follows: It takes the number of all detectable events (obstructive apneas, central apneas, unknown apneas, and hypopneas detected) and divides that number by the time the machine was running. In other words, the AHI is the average number of apneas and hypopneas that occurred each hour the machine was on. The LCD display number on the S9 is simply truncated at one decimal place without any rounding as near as I can tell. I believe that for longer reporting periods (such as five days), ResScan simply averages the nightly AHI numbers to compute the one in the report. But I don't know for sure.

The AI number is the Apnea Index for the reporting period. It only counts the obstructive, central, and unknown apneas. In other words, the S9 computes this number by dividing the number of detected apneas (includes obstructive, central, and unknown apneas) by the time the machine was running. In other words, the AI is the average number of apneas that occurred each hour the machine was on. Again, the S9's LCD display number seems to simply be truncated at one decimal place instead of being rounded to one decimal place.

An example might help.  Suppose that on a given night the S9 detects 15 total events---let's say there are 9 obstructive apneas, 2 central apneas, and 4 hypopneas---and that the machine was run for a total of 6.6 hours.

The S9's LCD's overnight AHI, AI, and CAI numbers are computed as follows:
AHI = 15/6.6 = 2.272727 = 2.2 (due to truncating the decimal)
AI = 11/6.6 = 1.666667 = 1.6 (due to truncating the decimal)
CAI = 2/6.6 = 0.303030 = 0.3 (due to truncating the decimal)
    Note that we can use the LCD's overnight data to estimate the number of apneas, central apneas, obstructive apneas, and hypopneas by doing some quick multiplication of the LCD's overnight indices by the usage number. Here's a typical example:

    Let's suppose you look at the detailed Sleep Quality Data one morning and this is what you see:
    Usage: 7.3
    Pressure: 12.4
    Leak: 9.6
    AHI: 1.8
    AI: 1.4
    CAI: 0.3
    The Usage number indicates you used the machine 7.3 hours overnight.

    The Pressure number is the 95% pressure level. For example, if the LCD says the Pressure = 12.4, that means that your pressure was AT or BELOW 12.4 cmH2O for 95% of the night. It also means that your pressure was AT or ABOVE 12.4 cmH2O for 5% of the night.   Note: If you are using an S9 Elite or if you are using an S9 AutoSet in CPAP mode, the Pressure number will just be your Pressure setting and it will remain the same every day.

    The Leak number is the 95% excess leak rate in Liters per minute (L/min). Since the LCD says the Leak = 9.6, that means that your unintentional leak rate was AT or BELOW 9.6 L/min for 95% of the night. It also means that your unintentional leak rate was AT or ABOVE 9.6 L/min for 5% of the night.

    And how long is 5% of the night? Well, 5% of one hour = 3 minutes. So you can multiply the Usage time by 3 minutes to get an idea of how long your leaks were above the reported leak rate: In our example, leaks were ABOVE 9.6 L/min for a total of no more than 7.3 * 3 = 21.9 minutes and the Pressure was above 12.4 for a total of no more than 7.3 * 3 - 21.9 minutes.

    Since the usage was about 7.3 hours, we can also estimate the number of events you had and what type they were from the LCD's AHI, AI and CAI numbers as follows:

    Total number of apneas and hypopneas:
    AHI x Usage = (1.8 events per hour) x (7.3 hours) = approx. 13.14 events = 14 events (round UP since there's a fraction)

    Total number of apneas (all types):
    AI x Usage = (1.4 apneas per hour) x (7.3 hours) = approx. 10.22 apneas = 11 apneas (round UP since there's a fraction)

    Total number of central apneas:
    CAI x Usage = (0.3 CAs per hour) x (7.3 hours) = aprox. 2.19 central apneas = 3 central apneas (round UP since there's a fraction)

    Estimated Total number of obstructive apneas:
    First, an estimate of the OAI is simply OAI = AI - CAI. Note that if your S9 detects any Apneas of Unknown type, that will throw this calculation off, but it's still a good estimate. So here we go:
    OAI = AI - CAI = 1.4 - 0.3 = 1.1 and
    OAI x Usage = (1.1 OAs per hour) x (7.3 hours) = 8.03 obstructive apneas = 8 apneas (since we truncate to one decimal and because 8 + 3 = 11 apneas)

    Total number of hypopneas:
    First, an estimate of the HI is simply HI = AHI - AI. So here we go:
    HI = AHI - AI = 1.8 - 1.4 = 0.4
    HI x Usage = (0.4 Hypopneas per hour) x (7.3 hours) = 2.93 hypopneas = 3 hypopneas (Which make since because 11 apneas + 3 hypopneas = 14 events.)

    Of course, to get more detailed information about when the events happened and how long each of the apneas lasted, you will need to download the data into ResScan (or Sleepy Head) and look at the graphs for the night.