MIT-LCP / MIT-LCP/mimic-code

Central line/arterial line durations have overlapping rows

Open
#371 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Recently added some preliminary queries to get presence of central line (ref #312) / arterial line.

Ideally each row would contain the start time and end time of a line, and rows would not overlap. At the moment however, the rows are overlapping.

select
  cl1.*
from arterial_line_durations cl1
where icustay_id in
(
  select
  cl1.icustay_id
  -- , cl1.starttime, cl1.endtime
  -- , cl2.starttime as starttime2, cl2.endtime as endtime2
from arterial_line_durations cl1
left join arterial_line_durations cl2
  on cl1.icustay_id = cl2.icustay_id
  and cl1.starttime > cl2.starttime
  and cl1.endtime < cl2.endtime
where cl2.icustay_id is not null
)
order by cl1.icustay_id, cl1.starttime;
icustay_id starttime endtime duration_hours
200063 2141-03-12 16:30:00 2141-03-17 14:45:00 118.25
200063 2141-03-12 16:32:00 2141-03-13 20:00:00 27.4666666666667
200063 2141-03-17 12:30:00 2141-03-21 22:27:00 105.95

Similar query for a-lines.

select
  cl1.*
from central_line_durations cl1
where icustay_id in
(
  select
  cl1.icustay_id
  -- , cl1.starttime, cl1.endtime
  -- , cl2.starttime as starttime2, cl2.endtime as endtime2
from central_line_durations cl1
left join central_line_durations cl2
  on cl1.icustay_id = cl2.icustay_id
  and cl1.starttime > cl2.starttime
  and cl1.endtime < cl2.endtime
where cl2.icustay_id is not null
)
order by cl1.icustay_id, cl1.starttime;

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 concepts/durations/central-line-durations.sql and concepts/durations/arterial-line-durations.sql, then use the overlap-detection queries and the example rows in this issue to inspect their outputs. Done means each line-duration result has a start and end time without overlapping rows for the same ICU stay.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.