inputs
stringlengths
25
211
labels
stringlengths
62
1.22k
db_id
stringclasses
1 value
is_impossible
bool
1 class
id
stringlengths
24
24
what was the four most frequently ordered lab test since 2 years ago for patients 30s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 30 and 39 ) and datetime(labevents.charttime) >= datetime(current_time,'-2 year') group by labevents.itemid ) as t1 where t1.c1 <= 4 )
mimic_iii
false
eb1b4c86ca60962b45c7e100
what were the top five most frequently performed lab tests among patients aged 40s since 3 years ago?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 40 and 49 ) and datetime(labevents.charttime) >= datetime(current_time,'-3 year') group by labevents.itemid ) as t1 where t1.c1 <= 5 )
mimic_iii
false
598ed37b87d69f6418df5f23
what are the four most frequently taken tests until 2 years ago for patients with age 50s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 50 and 59 ) and datetime(labevents.charttime) <= datetime(current_time,'-2 year') group by labevents.itemid ) as t1 where t1.c1 <= 4 )
mimic_iii
false
ecbd233d98ff60a0220d2cfb
what were the four most frequently ordered lab tests until 2 years ago for patients of age 60 or above?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age >= 60 ) and datetime(labevents.charttime) <= datetime(current_time,'-2 year') group by labevents.itemid ) as t1 where t1.c1 <= 4 )
mimic_iii
false
025a05ddbf580e4647631c5d
what were the three most common lab tests performed since 2 years ago for patients aged 60 or above?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age >= 60 ) and datetime(labevents.charttime) >= datetime(current_time,'-2 year') group by labevents.itemid ) as t1 where t1.c1 <= 3 )
mimic_iii
false
30633d283ca875414d60fc90
what are the four most common lab tests for patients of age 50s a year before?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 50 and 59 ) and datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') group by labevents.itemid ) as t1 where t1.c1 <= 4 )
mimic_iii
false
6bef05f432c3aac023e6871c
what are the five most frequently taken lab tests for patients of age 30s.
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 30 and 39 ) group by labevents.itemid ) as t1 where t1.c1 <= 5 )
mimic_iii
false
6733ea80876330b121a2e352
during a year before what is the four most commonly taken lab test for patients 60 or above?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age >= 60 ) and datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') group by labevents.itemid ) as t1 where t1.c1 <= 4 )
mimic_iii
false
4a65e70ccb30778dfa7877ef
what are the four most commonly done lab tests for patients with age 20s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 20 and 29 ) group by labevents.itemid ) as t1 where t1.c1 <= 4 )
mimic_iii
false
5cec81202a3f508b8c5eaf8f
until 3 years ago, what were the five most commonly taken lab tests for patients of age 60 or above?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age >= 60 ) and datetime(labevents.charttime) <= datetime(current_time,'-3 year') group by labevents.itemid ) as t1 where t1.c1 <= 5 )
mimic_iii
false
1659cead23d7620cd5dff08f
among the patients of age 60 or above during this year, what were the top five most frequent laboratory tests?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age >= 60 ) and datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') group by labevents.itemid ) as t1 where t1.c1 <= 5 )
mimic_iii
false
2b91fac07479c6771841102e
what are the five most frequently taken lab tests since 2101 for patients who are 60 or above?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age >= 60 ) and strftime('%y',labevents.charttime) >= '2101' group by labevents.itemid ) as t1 where t1.c1 <= 5 )
mimic_iii
false
b85b0fca08305c33f9e998d1
what were the four most frequently taken lab tests until 1 year ago for patients with age 30s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 30 and 39 ) and datetime(labevents.charttime) <= datetime(current_time,'-1 year') group by labevents.itemid ) as t1 where t1.c1 <= 4 )
mimic_iii
false
16a9c4c807909d8964618e47
since 2101, what are the three most frequently taken lab tests for patients of age 50s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 50 and 59 ) and strftime('%y',labevents.charttime) >= '2101' group by labevents.itemid ) as t1 where t1.c1 <= 3 )
mimic_iii
false
088a7c407bfba9f459344279
what was the three most frequently taken test since 6 years ago for patients with age 20s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 20 and 29 ) and datetime(labevents.charttime) >= datetime(current_time,'-6 year') group by labevents.itemid ) as t1 where t1.c1 <= 3 )
mimic_iii
false
4c0605619634d178bd7c10ac
retrieve the top four most commonly performed laboratory tests of patients 40s this year.
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 40 and 49 ) and datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') group by labevents.itemid ) as t1 where t1.c1 <= 4 )
mimic_iii
false
ed0cda5a86e85b1028ed7c11
what are the five most commonly ordered tests in 2101 for patients aged 30s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 30 and 39 ) and strftime('%y',labevents.charttime) = '2101' group by labevents.itemid ) as t1 where t1.c1 <= 5 )
mimic_iii
false
b45b7d8ede277ccab790e0ff
what were the five most frequently taken lab tests since 2100 in patients of age 40s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 40 and 49 ) and strftime('%y',labevents.charttime) >= '2100' group by labevents.itemid ) as t1 where t1.c1 <= 5 )
mimic_iii
false
d48b429936fed3a37e713ba0
what are the top three most frequently performed lab tests among the patients 50s since 2100?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 50 and 59 ) and strftime('%y',labevents.charttime) >= '2100' group by labevents.itemid ) as t1 where t1.c1 <= 3 )
mimic_iii
false
0657570106b739ee12acc5ed
in a year before, what is the three most frequently taken lab test for patients of 30s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 30 and 39 ) and datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') group by labevents.itemid ) as t1 where t1.c1 <= 3 )
mimic_iii
false
3e177a0c0440a080154fe69f
in this year, what is the five most commonly taken test for patients aged 20s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 20 and 29 ) and datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') group by labevents.itemid ) as t1 where t1.c1 <= 5 )
mimic_iii
false
307c8d315852feef1c498bc0
what was the four most frequently taken lab tests since 5 years ago for patients in the age of 40s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 40 and 49 ) and datetime(labevents.charttime) >= datetime(current_time,'-5 year') group by labevents.itemid ) as t1 where t1.c1 <= 4 )
mimic_iii
false
ad812170efb6b50fb34afb71
among patients of age 30s until 2 years ago, what were the top four most frequent lab tests?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 30 and 39 ) and datetime(labevents.charttime) <= datetime(current_time,'-2 year') group by labevents.itemid ) as t1 where t1.c1 <= 4 )
mimic_iii
false
6b7f133d043e1468325671d3
what was the three most commonly taken laboratory tests during a year before for patients of the age 50s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 50 and 59 ) and datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') group by labevents.itemid ) as t1 where t1.c1 <= 3 )
mimic_iii
false
e9396142e9718a7e187b33af
this year what are the three most commonly ordered lab tests for patients with age 20s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 20 and 29 ) and datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') group by labevents.itemid ) as t1 where t1.c1 <= 3 )
mimic_iii
false
82ff5c3ebb2391373cf0fcc9
what were the five most commonly taken laboratory tests in a year before for patients aged 30s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 30 and 39 ) and datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') group by labevents.itemid ) as t1 where t1.c1 <= 5 )
mimic_iii
false
a151935a1a5284ab383b3575
what are the four most common lab tests among the patients aged 20s in 2103?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 20 and 29 ) and strftime('%y',labevents.charttime) = '2103' group by labevents.itemid ) as t1 where t1.c1 <= 4 )
mimic_iii
false
8df6f2e48d91d2d260b8d284
what were the five most frequent lab tests ordered since 2104 for patients in the age of 60 or above?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age >= 60 ) and strftime('%y',labevents.charttime) >= '2104' group by labevents.itemid ) as t1 where t1.c1 <= 5 )
mimic_iii
false
d07a3fd2e1d25ecd40c23f9d
what were the top five most frequently performed lab tests for the patients with age 50s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 50 and 59 ) group by labevents.itemid ) as t1 where t1.c1 <= 5 )
mimic_iii
false
903caa06d0c652d01ff618f5
what are the three most frequently ordered laboratory tests until 2103 for patients with age 20s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 20 and 29 ) and strftime('%y',labevents.charttime) <= '2103' group by labevents.itemid ) as t1 where t1.c1 <= 3 )
mimic_iii
false
62db4e8377178a64d45724c5
what are the top four most frequent lab tests among the patients that are 40s during a year before?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 40 and 49 ) and datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') group by labevents.itemid ) as t1 where t1.c1 <= 4 )
mimic_iii
false
f2dfe0553dce53f06ccaf9e7
what were the three most frequently taken lab tests last year for patients 60 or above?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age >= 60 ) and datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') group by labevents.itemid ) as t1 where t1.c1 <= 3 )
mimic_iii
false
bf0d65b119ee9d35d88fef45
what are the four most frequent laboratory tests among patients of age 40s in 2101?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 40 and 49 ) and strftime('%y',labevents.charttime) = '2101' group by labevents.itemid ) as t1 where t1.c1 <= 4 )
mimic_iii
false
875958d5be4c35dbe9d57716
what is the three most commonly taken test for patients aged 20s?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 20 and 29 ) group by labevents.itemid ) as t1 where t1.c1 <= 3 )
mimic_iii
false
31722adf6d9b081577fafa99
what are the three most commonly ordered lab tests for patients who had been diagnosed with hypovolemia before in the same hospital encounter, since 2 years ago?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'hypovolemia' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) >= datetime(current_time,'-2 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
44458564ac832ae4fb3693ce
since 2101, what are the top four most frequently ordered laboratory tests for patients during the same month after they have been diagnosed with ac dvt/emb distl low ext?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'ac dvt/emb distl low ext' ) and strftime('%y',diagnoses_icd.charttime) >= '2101' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) >= '2101' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
0d5f526c13a957ded6b1eeb8
what were the top four frequently performed lab tests for a patient during the same hospital encounter after being diagnosed with fem pelvic periton adhes until 2103?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'fem pelvic periton adhes' ) and strftime('%y',diagnoses_icd.charttime) <= '2103' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) <= '2103' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
b598129756171c5cb196478c
in this year, what were the four most often ordered lab tests for patients who had previously been diagnosed with fx c1 vertebra-closed during the same hospital encounter?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'fx c1 vertebra-closed' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
78e0c0ab5771d8d729003077
for patients who have been diagnosed with anemia in chr kidney dis this year what are the top three most common lab tests that followed within 2 months?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'anemia in chr kidney dis' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
7f5b47fef50c97fc8b1a94c8
what are the four most frequent laboratory tests patients had in the same hospital visit after they were diagnosed with cl skul base fx-coma nos until 2 years ago?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'cl skul base fx-coma nos' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) <= datetime(current_time,'-2 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
46e491f1cd258a3555b49bc6
what was the three most frequently ordered laboratory tests for patients who had already been diagnosed with ac alcoholic hepatitis during the same month, since 2103?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'ac alcoholic hepatitis' ) and strftime('%y',diagnoses_icd.charttime) >= '2103' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) >= '2103' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
407ce22706649b8cfdf89d36
list the four most frequent lab tests that were given to patients within 2 months after they were diagnosed with cellulitis of leg since 4 years ago.
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'cellulitis of leg' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-4 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) >= datetime(current_time,'-4 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
b573d7ba74761a5902e150e9
what were the four most common laboratory tests that patients had in the same hospital encounter after having been diagnosed with pure hyperglyceridemia in 2103?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'pure hyperglyceridemia' ) and strftime('%y',diagnoses_icd.charttime) = '2103' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) = '2103' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
bac9c37359c835cdfa7b6c38
what are the five most frequently given tests for patients who were previously diagnosed with irritable bowel syndrome in the same hospital encounter?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'irritable bowel syndrome' ) ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
eb5599e8bb6f641a4b9e7ee0
what were the top three most common laboratory tests that were ordered to patients within the same month after being diagnosed with lack norm physio dev nos?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'lack norm physio dev nos' ) ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
2b3531e5e4a63370c130925a
until 2102, what are the top five most commonly ordered lab tests for patients in the same month after being diagnosed with spinal stenosis nos?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'spinal stenosis nos' ) and strftime('%y',diagnoses_icd.charttime) <= '2102' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) <= '2102' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
9f7116f6567b41e9b5dcecb7
what are the four most common laboratory tests that patients had within 2 months after a diagnosis of ventricular shunt status until 1 year ago?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'ventricular shunt status' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) <= datetime(current_time,'-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
0a0e0a903ed6d9f4ae921911
since 2104, what are the top four most frequently given lab tests to patients in the same month after they were diagnosed with atherosclerosis nec?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'atherosclerosis nec' ) and strftime('%y',diagnoses_icd.charttime) >= '2104' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) >= '2104' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
8f38d63d476d66bb2114e244
what are the five most frequently ordered lab tests for patients that have already been diagnosed with esoph varice oth dis nos within 2 months,?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'esoph varice oth dis nos' ) ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
cd23f633845803657b3bf212
what were the top four most frequently ordered lab tests for patients in the same hospital encounter after the diagnosis of polyp of corpus uteri?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'polyp of corpus uteri' ) ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
f8180e4ab7ad64065901cc8d
what are the three most common lab tests a patient had during the same month after being diagnosed with calculus of ureter until 2 years ago?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'calculus of ureter' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) <= datetime(current_time,'-2 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
2e91eb604dd67161bc733850
since 2 years ago what are the top five most frequent lab tests ordered for patients within 2 months after the diagnosis of swelling of limb?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'swelling of limb' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) >= datetime(current_time,'-2 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
44f25ddd632f345ea82fcfec
what were the five most frequently ordered laboratory tests for patients who had previously been diagnosed with depress psychosis-unspec within 2 months, since 2100?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'depress psychosis-unspec' ) and strftime('%y',diagnoses_icd.charttime) >= '2100' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) >= '2100' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
2544832237761173613b555a
what were the three most common lab tests that patients were given in the same hospital encounter after being diagnosed with dmii circ nt st uncntrld in 2101?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'dmii circ nt st uncntrld' ) and strftime('%y',diagnoses_icd.charttime) = '2101' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) = '2101' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
4da0a62a3c733d0987e750e0
since 3 years ago, what are the three most frequently ordered lab tests for patients during the same hospital encounter after they are diagnosed with injury iliac artery?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'injury iliac artery' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-3 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) >= datetime(current_time,'-3 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
37455111db588ecb72a97e03
what are the three most commonly ordered laboratory tests for patients who have already been diagnosed with shock nos within the same month, until 1 year ago?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'shock nos' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) <= datetime(current_time,'-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
2ba39a51d7f7d475115bb3c4
what are the five most commonly given lab tests for patients who have been diagnosed with acq cardiac septl defect before in the same hospital visit, since 2 years ago?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'acq cardiac septl defect' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) >= datetime(current_time,'-2 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
fa93609133dc82ac8fa247ff
what are the five most frequent lab tests patients have taken within the same month after being diagnosed with senile dementia uncomp?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'senile dementia uncomp' ) ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
ba84d8ff63afaca14f436bb9
until 3 years ago, what are the top four most frequently performed laboratory tests given to patients in the same month after being diagnosed with obstruction of bile duct?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'obstruction of bile duct' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-3 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) <= datetime(current_time,'-3 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
2258f08234bef437b3281d4b
until 2 years ago what are the top five most common lab tests ordered for patients in the same hospital encounter after being diagnosed with generalizd hyperhidrosis?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'generalizd hyperhidrosis' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) <= datetime(current_time,'-2 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
7481dbd7ddf3f506a1b972bb
since 2103, what are the three most frequent lab tests given to patients within 2 months after they are diagnosed with malign neopl prostate?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'malign neopl prostate' ) and strftime('%y',diagnoses_icd.charttime) >= '2103' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) >= '2103' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
4e6453783f012348a08d6fce
what were the four most commonly ordered lab tests for patients who were previously diagnosed with delirium tremens within 2 months, since 2105?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'delirium tremens' ) and strftime('%y',diagnoses_icd.charttime) >= '2105' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) >= '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
d274aaeaebb3bf290111c9e9
during the previous year, what were the top three most frequently ordered lab tests for patients during the same month after the diagnosis of accid in resident instit?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'accid in resident instit' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
b7e33216574f3b18d935bfb0
what are the three most common laboratory tests that patients have in the same hospital encounter after being diagnosed with second malig neo ovary since 2104?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'second malig neo ovary' ) and strftime('%y',diagnoses_icd.charttime) >= '2104' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) >= '2104' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
97215a962a4929be12464e89
what are the four most commonly given lab tests last year for patients who were previously diagnosed with hx of kidney malignancy in the same hospital visit?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'hx of kidney malignancy' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
742c4bc0686a163e9b72c5e1
what are the five most frequent lab tests that were performed in the same hospital encounter after being diagnosed with aspergillosis since 1 year ago?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'aspergillosis' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) >= datetime(current_time,'-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
ed8a27d77a27fc9fe049b8ab
what were the top three frequent laboratory tests that patients had during the same hospital visit after they were diagnosed with perinatal infection nec?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'perinatal infection nec' ) ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
d7d26fc8f175f698d706181a
until 2104, what are the top five most frequent lab tests ordered for patients in the same month after being diagnosed with tachycardia nos?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'tachycardia nos' ) and strftime('%y',diagnoses_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) <= '2104' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
4c9d4c22a1aff292fd2250e8
what were the four most frequently ordered laboratory tests for patients who had been diagnosed with dmii circ uncntrld previously in the same month,?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'dmii circ uncntrld' ) ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
f98be92506c2817ab4142c67
what was the top three most frequent lab tests that patients had within the same hospital visit after having been diagnosed with long-term use of aspirin until 1 year ago?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'long-term use of aspirin' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) <= datetime(current_time,'-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
fdf1872f7522553a958b6af3
list the top four most frequent lab tests that were given to patients in the same month after they were diagnosed with meth resis staph carrier until 3 years ago.
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'meth resis staph carrier' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-3 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) <= datetime(current_time,'-3 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
85756944eb508f53b65f6d44
what are the three most commonly ordered laboratory tests for patients who were previously diagnosed with crbl emblsm w infrct within the same month, during this year?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'crbl emblsm w infrct' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
eecfaba8f42a00f66bf4139e
what are the three most commonly ordered lab tests ordered for patients who have previously been diagnosed with acc poison-heroin during the same month, since 1 year ago?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'acc poison-heroin' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) >= datetime(current_time,'-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
3defff2e3f78742ec0b928c3
what are the three most commonly performed lab tests for patients who have been diagnosed with hypercalcemia previously within the same hospital visit, during the last year?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'hypercalcemia' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
1eb3ecf87b01049f949dfa1e
during a year before what are the top three most frequently ordered lab tests for patients during the same hospital visit after being diagnosed with concussion w coma nos?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'concussion w coma nos' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
6af253fa5a3763da234e8aba
what are the three most commonly ordered lab tests for patients who had previously been diagnosed with acquired absence kidney within 2 months, in this year?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'acquired absence kidney' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
f28fe2381c58eba7cd0b26d5
what are the top four most frequently done lab tests until 2104 given to patients within 2 months after being diagnosed with anemia-other chronic dis?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'anemia-other chronic dis' ) and strftime('%y',diagnoses_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) <= '2104' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
323f467def788c2d33965bcd
what were the five most commonly given laboratory tests for patients who were previously diagnosed with malign neopl thyroid during the same hospital visit, in 2105?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'malign neopl thyroid' ) and strftime('%y',diagnoses_icd.charttime) = '2105' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) = '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
84348eea99692b68dc2792fc
until 1 year ago, what was the top five most frequent laboratory tests ordered for patients during the same hospital encounter after the diagnosis of no family able to care?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'no family able to care' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) <= datetime(current_time,'-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
b76735df0059dcc929869b59
what are the five most frequently ordered laboratory tests for patients who have been diagnosed with left bb block nec previously during the same hospital visit, since 1 year ago?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'left bb block nec' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) >= datetime(current_time,'-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
3afcce34e0045efae1d4166f
what are the five most frequent laboratory tests ordered for patients in 2105 in the same hospital visit after being diagnosed with psychosis nos?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'psychosis nos' ) and strftime('%y',diagnoses_icd.charttime) = '2105' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) = '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
523711cf1e1b3fd8000c99bc
until 3 years ago, what are the top three most frequent lab tests given to patients within the same month after the diagnosis of anemia-other chronic dis.
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'anemia-other chronic dis' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-3 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) <= datetime(current_time,'-3 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
6265bc09315d038da5401dae
what were the five most frequently provided tests for patients who had previously been diagnosed with cerv spondyl w myelopath during the same hospital encounter, until 1 year ago?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'cerv spondyl w myelopath' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) <= datetime(current_time,'-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
aa0540aa4cb50e3a7ac22b23
since 2105, what are the top four most frequent lab tests ordered for patients within 2 months after the diagnosis of physical restrain status.
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'physical restrain status' ) and strftime('%y',diagnoses_icd.charttime) >= '2105' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) >= '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
6a7e250f4a4dcf9ec8c1e6ba
what are the five most common laboratory tests that a patient had during the same hospital visit after being diagnosed with jt contracture-jt nec in 2105?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'jt contracture-jt nec' ) and strftime('%y',diagnoses_icd.charttime) = '2105' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) = '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
757b013081e1dd67f7442a73
what are the five most frequently conducted lab tests for patients who have already been diagnosed with secondary malig neo bone within 2 months, during this year?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'secondary malig neo bone' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
10d540ab4446b14783db88a9
what are the three most frequently given laboratory tests in 2105 for patients who were previously diagnosed with thoracic aortic aneurysm in the same month?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'thoracic aortic aneurysm' ) and strftime('%y',diagnoses_icd.charttime) = '2105' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) = '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
70dd0ebb2e677af0aecd70ab
what are the three most frequently administered laboratory tests for patients who were previously diagnosed with hx of leukemia nos in the same hospital visit, in 2105?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'hx of leukemia nos' ) and strftime('%y',diagnoses_icd.charttime) = '2105' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) = '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
04b2d62307acb6acfbe38123
since 1 year ago, what is the top four most frequent laboratory tests ordered for patients during the same hospital encounter after the diagnosis of bladder/urethra inj-open?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'bladder/urethra inj-open' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) >= datetime(current_time,'-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
78df6d5cb303037d08c20e83
what were the three most commonly performed lab tests for patients who had previously been diagnosed with spleen injury nos-open in the same hospital visit, a year before?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'spleen injury nos-open' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
957911d4d0c3eb4774e477f0
what are the five most frequent laboratory tests ordered for patients in 2103 during the same hospital encounter after being diagnosed with traffic acc nos-pers nos?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'traffic acc nos-pers nos' ) and strftime('%y',diagnoses_icd.charttime) = '2103' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) = '2103' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
4394490623a611f19fe81af0
what were the top three most common laboratory tests that were ordered to patients during the same month after being diagnosed with nodular lymphoma inguin?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'nodular lymphoma inguin' ) ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
1da331d06b78f485708d272e
what are the three most commonly ordered laboratory tests for patients who were previously diagnosed with abdmnal pain oth spcf st in the same month, this year?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'abdmnal pain oth spcf st' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
3c170660d8b1579cb1d3c98b
what were the four most common lab tests that patients were given in the same month after being diagnosed with speech disturbance nec since 2 years ago?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'speech disturbance nec' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) >= datetime(current_time,'-2 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
4c52064f60536f43de00ac33
what are the three most frequent lab tests that patients had within the same hospital visit after receiving refus lmb/lmbsac pst/pst in 2100?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, procedures_icd.charttime, admissions.hadm_id from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'refus lmb/lmbsac pst/pst' ) and strftime('%y',procedures_icd.charttime) = '2100' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) = '2100' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
22f10008c50abfe340403bc0
what are the five most common lab tests for the patients who received a circumcision before in the same hospital encounter until 2 years ago?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, procedures_icd.charttime, admissions.hadm_id from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'circumcision' ) and datetime(procedures_icd.charttime) <= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime, admissions.hadm_id from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) <= datetime(current_time,'-2 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id group by t2.itemid ) as t3 where t3.c1 <= 5 )
mimic_iii
false
896ea259b4a5f20fe3bb55ba
what were the top three common lab tests that patients had within 2 months after having a aortocor bypas-1 cor art procedure during the last year?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, procedures_icd.charttime from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'aortocor bypas-1 cor art' ) and datetime(procedures_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.itemid ) as t3 where t3.c1 <= 3 )
mimic_iii
false
5797058b1077e3b031bd19ff
what are the four most frequently given laboratory tests for patients who have previously received destruct chest wall les within the same month until 2104?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, procedures_icd.charttime from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'destruct chest wall les' ) and strftime('%y',procedures_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where strftime('%y',labevents.charttime) <= '2104' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
ad63dcc300a18125a3c681ac
what is the top four most common lab tests that followed during the same month for patients who received rt heart angiocardiogram this year?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, procedures_icd.charttime from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'rt heart angiocardiogram' ) and datetime(procedures_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month') group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
65d11e53aee6994d5e6b46a6
what were the top four most frequent laboratory tests that followed within 2 months for patients who took ins drug-elut coronry st since 2 years ago?
select d_labitems.label from d_labitems where d_labitems.itemid in ( select t3.itemid from ( select t2.itemid, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, procedures_icd.charttime from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'ins drug-elut coronry st' ) and datetime(procedures_icd.charttime) >= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, labevents.itemid, labevents.charttime from labevents join admissions on labevents.hadm_id = admissions.hadm_id where datetime(labevents.charttime) >= datetime(current_time,'-2 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.itemid ) as t3 where t3.c1 <= 4 )
mimic_iii
false
c3897efb6e04b96f69debac1