MIT-LCP / MIT-LCP/mimic-code

paused vasopressor durations

Open
#1,808 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
3.4k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Prerequisites
Description

Hi,

in lines 264 to 271 in https://github.com/MIT-LCP/mimic-code/blob/main/mimic-iii/concepts/durations/vasopressor_durations.sql, vasopressor administrations from inputevents_mv are grouped based on their linkorderid, and the minimum and maximum starttime and endtime, respectively, are calculated for each group. This makes sense if the starttime of an entry equals the endtime of the previous entry, but not if there is a gap between. According to https://github.com/MIT-LCP/mimic-code/issues/47, this should never be the case after removing "Rewritten" entries, but I found at least one counterexample, namely linkorderid = 8781494:

select
    icustay_id, linkorderid, starttime, endtime, statusdescription, itemid
  FROM inputevents_mv
  where linkorderid = 8781494
  order by starttime

In the result, there is a ~6h gap between 2167-08-05 21:16:00 and 2167-08-06 04:01:00. To my understanding, such gaps should not be included in the final vasopressor durations.

Note: The status of the entry before the gap is "Paused". I did not investigate whether "Paused" entries always lead to gaps, but can do that if it helps.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with mimic-iii/concepts/durations/vasopressor_durations.sql, especially lines 264–271, and inspect the linked issue #47. Run the provided inputevents_mv query for linkorderid 8781494, then investigate how Paused entries and gaps affect the grouped duration. Done means the duration logic reflects the expected treatment of gaps and the counterexample is covered by validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.