I am working on invasive ventilation records in PROCEDUREEVENTS_MV.
I found a few records where there are overlapping times. I already checked that those records has cancelreason = 0
and statusdescription in ('FinishedRunning', 'Stopped', 'Paused')
.
Do you have any suggestions / guidelines on how I should clean them up?
From my understanding, I have two options: take the last record stored or merge them.
For instance (PostgreSQL),
select hadm_id, icustay_id, itemid, label, starttime, endtime,
value, valueuom, storetime, cancelreason, statusdescription
from procedureevents_mv join d_items using (itemid)
where hadm_id = 103885 and itemid = 225792 and cancelreason = 0
order by storetime;
returns
hadm_id icustay_id itemid label starttime endtime value valueuom storetime cancelreason statusdescription
103885 286523 225792 Invasive Ventilation 2174-02-24 14:05:00 2174-02-24 18:09:00 244.0 min 2174-02-24 14:08:00 0 FinishedRunning
103885 286523 225792 Invasive Ventilation 2174-02-24 10:03:00 2174-02-24 18:07:00 484.0 min 2174-02-25 17:51:00 0 FinishedRunning