mimic-code icon indicating copy to clipboard operation
mimic-code copied to clipboard

Too many new ventilations in ventdurations

Open mghassem opened this issue 10 years ago • 3 comments

There are a lot of new ventilations added by the new ventdurations script (https://github.com/MIT-LCP/mimic-code/blob/master/etc/ventilation-durations.sql).

In a prior version of the script (https://github.com/MIT-LCP/mimic-code/blob/d23d5de5b768cb9ea7dd2fd13a6da85eb35e5e1c/etc/ventilation-durations.sql), we had this:

mimic=# select count(distinct icustay_id) mimic-# FROM ventdurations v mimic-# WHERE v.duration_hours > 0; count

26866

In the new version, we have a lot more:

mimic=# select count(distinct icustay_id) mimic-# FROM ventdurations_new v mimic-# WHERE v.duration_hours > 0; count

50353

mghassem avatar Dec 01 '16 13:12 mghassem

So this issue primarily occurred because we added non-invasive ventilation and/or oxygen as a flag for extubation (i.e. if a patient is on oxygen, they have been extubated/are no longer on mechanical ventilation, this was done in commit https://github.com/MIT-LCP/mimic-code/commit/7abf1d1a125c4adea60f014d3c5dd6134685780d). However, the first instance of NIV/oxygen delivery resulted in a "0th" mechanical ventilation event, and this was treated as a valid duration even if the patient was never eventually ventilated. That's fixed now, but I'll leave this open for a bit as I'm going to do some edge case testing on the query.

alistairewj avatar Dec 15 '16 19:12 alistairewj

The updates seem to have taken this down to a reasonable range:

mimic=# select count(distinct icustay_id) mimic-# FROM ventdurations v mimic-# WHERE v.duration_hours > 0; count

27707

mghassem avatar Dec 22 '16 18:12 mghassem

Made another update to improve the precision, particularly around spontaneous breathing trials and extubations. Not much of a change in the total number of patients:

select count(distinct icustay_id) from ventdurations;

 count 
-------
 26796
(1 row)

... but you should see a reduction in the number of on/off occurrences, i.e. there should be a lower number of longer duration ventilation events.

alistairewj avatar Feb 24 '17 00:02 alistairewj