the number of patients is far different from two search ways
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
- Put an X between the brackets on this line if you have done all of the following:
- Checked the online documentation: https://mimic.physionet.org/about/mimic/
- Checked that your issue isn't already addressed: https://github.com/MIT-LCP/mimic-code/issues?utf8=%E2%9C%93&q=
Description
Description of the issue, including:
- what you have tried
- references to similar issues
- queries demonstrating your question (if applicable)
I tried to count the number of patients who used furosemide,and the result is made in two ways totally different.
1.the code is
SELECT DISTINCT icustay_id FROM "mimiciii"."prescriptions" WHERE "drug" ILIKE '%furose%'AND "route" ILIKE '%iv%'
and the number is 20056
2.the code is
SELECT * FROM "mimiciii"."d_items" WHERE "label" ILIKE '%furo%' OR "label" ILIKE '%lasix%'
the items are 4219,3439,4888,6120,7780,30123,228340,221794,90023
then
WITH t1 AS (
SELECT mv.icustay_id,
min(mv.starttime) AS charttime
FROM mimiciii.inputevents_mv mv
WHERE ((mv.itemid = ANY (ARRAY[228340, 221794])) AND (mv.amount > (0)::double precision))
GROUP BY mv.icustay_id
), t2 AS (
SELECT cv.icustay_id,
min(cv.charttime) AS charttime
FROM mimiciii.inputevents_cv cv
WHERE ((cv.itemid = 30123) AND (cv.amount > (0)::double precision))
GROUP BY cv.icustay_id
), t3 AS (
SELECT ce.icustay_id,
min(ce.charttime) AS charttime
FROM mimiciii.chartevents ce
WHERE ((ce.itemid = ANY (ARRAY[4219, 3439, 4888, 6120, 7780, 30123])) AND (ce.valuenum > (0)::double precision))
GROUP BY ce.icustay_id
)
SELECT t1.icustay_id
FROM t1
UNION
SELECT t2.icustay_id
FROM t2
UNION
SELECT t3.icustay_id
FROM t3
and the result is 8704
I don't know why? Could you help me?
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
Compare the prescriptions query with the item IDs used in inputevents_mv, inputevents_cv, and chartevents, including their route, amount, valuenum, and timing filters. Start by checking the relevant MIMIC-III table and item definitions; done means explaining why the two patient counts differ and identifying which query matches the intended definition of furosemide use.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100