time interval used in kdigo-uo.sql
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 3.4k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
To calculate urine ouput over 3 periods, that is:
-- three sums:
-- 1) over a 6 hour period
-- 2) over a 12 hour period
-- 3) over a 24 hour period
The code in mimic-code/concepts/organfailure/kdigo-uo.sql is:
, sum(case when iosum.charttime <= io.charttime + interval '5' hour
then iosum.VALUE
else null end) as UrineOutput_6hr
, sum(case when iosum.charttime <= io.charttime + interval '11' hour
then iosum.VALUE
else null end) as UrineOutput_12hr
, sum(iosum.VALUE) as UrineOutput_24hr
....
and iosum.charttime <= (io.charttime + interval '23' hour)
....
The 3 intervals used were 5/11/23 hrs. And later in kdigo-stages-48hr.sql and kdigo-stages-7days.sql:
..
min(uo.urineoutput_6hr / uo.weight / 6.0)::numeric as uo6
...
, min(uo.urineoutput_12hr / uo.weight / 12.0)::numeric as uo12
...
, min(uo.urineoutput_24hr / uo.weight / 24.0)::numeric as uo24
...
so, shouldn't the above intervals be 6/12/24 hrs?
And in the comments from kdigo-stages-48hr.sql and kdigo-stages-7days.sql:
-- For urine output: the highest UO in hours 0-48 is used
Aren't we using the lowest UO as seen from the code above min()?
Correct me if I am missing something here, thanks.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with mimic-code/concepts/organfailure/kdigo-uo.sql, then compare the interval calculations with kdigo-stages-48hr.sql and kdigo-stages-7days.sql. Check how the documented 6-, 12-, and 24-hour windows relate to the 5/11/23-hour bounds and whether min() matches the comments about the highest urine output. Done means the SQL behavior and its comments consistently express the intended KDIGO calculation.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100