We use cookies and other tools to enhance your experience on our website and to analyze our web traffic.
For more information about these cookies and the data collected, please refer to our Privacy Policy.

XML annotations do not match AHI

2 posts
Was this reply useful? Learn more...
 
[-]
raphaelvallat +0 points · 6 months ago

Hi,

This is somewhat related to this post.

I am not able to re-calculate the AHI reported in ccshs-trec-harmonized-0.7.0.csv from the XML annotation files. For example, night ccshs-trec-1800001 has 17 Hypopnea and 1 Central Apnea in the XML file, i.e. a total of 18 events. The total sleep time (ttldursp_f1) is 490 minutes. The AHI should be 60 * 18 / 490 = 2.20 events / hour. However,the AHI values are much lower in ccshs-trec-harmonized-0.7.0.csv, regardless of the definition: 0.24 for ahi_hp3u, 0.24 for ahi_hp3r_aasm15 and 0.12 for ahi_hp4r.

I looked at the entire CCSHS dataset and you can see that on average the manually-recalculated AHI is 2 events / hour higher than ahi_hp3r_aasm15:

I also looked at the MESA and SHHS dataset and have found the same issue, even when excluding events that were scored during wake periods. For example, in MESA the recalculated AHI is on average 10 events / hour higher than the AHI in the main CSV file.

Am I missing something? Is there any additional filtering of the XML events required to get closer to the true AHI?

Thanks for your help, Raphael

446 posts
bio
Was this reply useful? Learn more...
 
[-]
mrueschman +0 points · 6 months ago

Thanks for inquiring and sorry for the confusion. I looked up that CCSHS subject in our source data and found a variable called rdi0p (not shared on the site), which has a value of 2.2. That matches the 18 event total you found and computed from the XML annotation file.

Is there any additional filtering of the XML events required to get closer to the true AHI?

Yes, this is exactly it. The XML annotation files in the studies you referenced do not give you information (per event) about linked oxygen desaturations and/or arousals. Most of the main AHI variables require hypopneas to be linked to an oxygen desaturation (e.g., >= 3% or >= 4%) or an arousal, however the scoring rules in many of these studies allowed for hypopneas to be scored without an associated desaturation/arousal. Hence, the XML event count ends up being "inflated" since many of those hypopnea events ultimately will not be counted in the numerators of the main AHI variables.

Regrettably, the Compumedics Profusion software did not output these additional details (e.g., linked to X% desat; linked to arousal) in the EDF/XML conversion process. We have recognized this limitation before. It would be up to users to try and link the respiratory events to the desaturation/arousal events if they wanted to pinpoint exactly what events in the XML were included in different AHI metrics.

2 posts
Was this reply useful? Learn more...
 
[-]
raphaelvallat +0 points · 6 months ago

Thank you for your quick reply and explanation. That makes sense. Following your message, I was actually able to get much better agreement in the CCSHS dataset by linking hypopnea events with SpO2 desat and/or arousals. This approach doesn't work as well in the SHHS dataset (and MESA to some extent) unfortunately — most likely because of the known issues of the XML annotations — but it still gives better overall agreement.