inputs
stringlengths 25
211
| labels
stringlengths 62
1.22k
| db_id
stringclasses 1
value | is_impossible
bool 1
class | id
stringlengths 24
24
|
---|---|---|---|---|
what are the four most common specimen test performed in this year? | select t1.spec_type_desc from ( select microbiologyevents.spec_type_desc, dense_rank() over ( order by count(*) desc ) as c1 from microbiologyevents where datetime(microbiologyevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') group by microbiologyevents.spec_type_desc ) as t1 where t1.c1 <= 4 | mimic_iii | false | a13026a9a399bd3a48adb637 |
what were the three most common specimen tests performed since 2101? | select t1.spec_type_desc from ( select microbiologyevents.spec_type_desc, dense_rank() over ( order by count(*) desc ) as c1 from microbiologyevents where strftime('%y',microbiologyevents.charttime) >= '2101' group by microbiologyevents.spec_type_desc ) as t1 where t1.c1 <= 3 | mimic_iii | false | 1611db426bd161d98dd4e68f |
what's the four most commonly ordered specimen test during a year before? | select t1.spec_type_desc from ( select microbiologyevents.spec_type_desc, dense_rank() over ( order by count(*) desc ) as c1 from microbiologyevents where datetime(microbiologyevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') group by microbiologyevents.spec_type_desc ) as t1 where t1.c1 <= 4 | mimic_iii | false | 08072ba237ad024b36040e39 |
what was the four most commonly carried out specimen tests until 2103? | select t1.spec_type_desc from ( select microbiologyevents.spec_type_desc, dense_rank() over ( order by count(*) desc ) as c1 from microbiologyevents where strftime('%y',microbiologyevents.charttime) <= '2103' group by microbiologyevents.spec_type_desc ) as t1 where t1.c1 <= 4 | mimic_iii | false | 6a2547d748546d8d53309663 |
what are the top three most frequently used specimen tests given to patients in the same hospital visit after being diagnosed with poison-medicinal agt nos? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'poison-medicinal agt nos' ) ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | 7f2822fd1beefe09c33feb3b |
since 2105 what are the four most common specimen test given to patients in the same month after being diagnosed with candidias urogenital nec? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'candidias urogenital nec' ) and strftime('%y',diagnoses_icd.charttime) >= '2105' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 7ac3d568889b96c099a9b3bc |
what were the top three most frequent specimen test for patients during the same month after the diagnosis of react-indwell urin cath until 2100? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'react-indwell urin cath' ) and strftime('%y',diagnoses_icd.charttime) <= '2100' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.charttime) <= '2100' ) 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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | fa96f0d18087c015fb3b6dcd |
what were the three most frequently given specimen tests for patients who have previously been diagnosed with cardiac dysrhythmias nec within 2 months,? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'cardiac dysrhythmias nec' ) ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | 3b7b8666e01010a941e74a97 |
in 2105, what are the top four most frequent specimen tests ordered for patients within 2 months after the diagnosis of mitral valve disorder. | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'mitral valve disorder' ) and strftime('%y',diagnoses_icd.charttime) = '2105' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 89003e4466321af20ee058ef |
what are the top five most frequent specimen tests that patients took within 2 months after being diagnosed with meconium dur del aff nb in this year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'meconium dur del aff nb' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | c0fef2f54f457a21959be65e |
what were the three specimen tests that were most frequently given to patients that were previously diagnosed with constrictiv pericarditis within the same hospital visit the last year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'constrictiv pericarditis' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | 8c0ce4abf0a3bff19c081b27 |
list the top four most frequent specimen test that were given to patients within 2 months after they were diagnosed with hypothermia until 1 year ago. | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'hypothermia' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 426d51289922a235075c05cb |
what are the three most commonly ordered specimen tests for patients who had been diagnosed with hemorrhage complic proc before within the same month until 2104? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'hemorrhage complic proc' ) and strftime('%y',diagnoses_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | bcc740138ed4b795b81cc2f8 |
since 4 years ago, what are the top three most frequent specimen tests ordered for patients within 2 months after the diagnosis of exam-clincal trial? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'exam-clincal trial' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-4 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | 47101a14f9d31ec0f5d15e97 |
what was the three most frequent specimen tests that patients had within the same month after being diagnosed with abnormal glucose nec until 2101? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'abnormal glucose nec' ) and strftime('%y',diagnoses_icd.charttime) <= '2101' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | a2ccf95e50c87aeb39129f38 |
what are the three most commonly ordered specimen tests for patients who previously had been diagnosed with polyphagia within the same month in 2103? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'polyphagia' ) and strftime('%y',diagnoses_icd.charttime) = '2103' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | 7fe3b7b75723545143de96b2 |
what were the top five most frequent specimen tests that followed within the same month for patients who were diagnosed with unc behav neo meninges? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'unc behav neo meninges' ) ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 54749ca9140f36ee2e6a2098 |
what was the four most frequent specimen tests that patients had during the same month after they had been diagnosed with cerv spondyl w myelopath? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'cerv spondyl w myelopath' ) ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 61bd03fb993c068f080a5fb6 |
during this year what were the top four most frequent specimen tests ordered for patients in the same hospital visit after being diagnosed with respirator depend status? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'respirator depend status' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 86530170ba52a8b9872317a3 |
this year, what were the top three most frequent specimen tests given to patients within 2 months after being diagnosed with adv eff medicinal nos. | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'adv eff medicinal nos' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | b82c37871a30e85d03094e33 |
in 2105 what was the five most frequent specimen tests given to patients in the same month after the diagnosis of immunotherapy encounter? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'immunotherapy encounter' ) and strftime('%y',diagnoses_icd.charttime) = '2105' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 73be0ec251cfb6026e2babcb |
what were the top four most frequent specimen tests given to patients within 2 months after the diagnosis of aspergillosis in this year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'aspergillosis' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | c407ebb28609a9c3037bc03b |
what are the four most frequently given specimen test for patients that were previously diagnosed with sleep disturbance nos within 2 months, in this year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'sleep disturbance nos' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 24ef180a025fa1cb47d4d5a7 |
what are the three most frequent specimen tests patients had within the same hospital visit after being diagnosed with resp prob after brth nec until 4 years ago? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'resp prob after brth nec' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-4 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.charttime) <= datetime(current_time,'-4 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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | a47cadcff4b4c196389df79e |
what are the four most frequently ordered specimen tests for patients that have been diagnosed with colostomy status previously within the same month until 2104? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'colostomy status' ) and strftime('%y',diagnoses_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 7592660bff7358ce993e2749 |
in 2105, what is the list of the five most frequent specimen tests ordered for patients in the same hospital visit after being diagnosed with loc osteoarth nos-l/leg? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'loc osteoarth nos-l/leg' ) and strftime('%y',diagnoses_icd.charttime) = '2105' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 911ca97dabe4edd801ae7a48 |
what were the three most common specimen test ordered for patients diagnosed with erythematous cond nec previously within the same hospital visit since 2103? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'erythematous cond nec' ) and strftime('%y',diagnoses_icd.charttime) >= '2103' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | 42abef40d7b2f18d0211c3eb |
what are the five most commonly ordered specimen tests for patients who had previously been diagnosed with generalizd hyperhidrosis during the same month, since 1 year ago? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'generalizd hyperhidrosis' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 045e42ea966eb4197faae556 |
since 2 years ago, what were the top four most frequent specimen tests ordered for patients during the same hospital encounter after the diagnosis of hematoma complic proc? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'hematoma complic proc' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | b162448ddc839b6518a79d77 |
what are the top four most frequent specimen tests ordered for patients during the same month after they have been diagnosed with excessive cold nec? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'excessive cold nec' ) ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 1d39b45961cbf0fb3b43b54d |
what are the four most frequently ordered specimen tests ordered for patients who were previously diagnosed with adv eff blood agent nec within 2 months, in 2105? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'adv eff blood agent nec' ) and strftime('%y',diagnoses_icd.charttime) = '2105' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 2d84abb8d40c05161c28dfbe |
what are the three most frequent specimen tests patients were given within the same month after being diagnosed with bmi 33.0-33.9,adult until 2104? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'bmi 33.0-33.9,adult' ) and strftime('%y',diagnoses_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | 216eb11208779fd520775fff |
during the previous year, what were the top five most frequent specimen tests given to a patient during the same hospital visit after the diagnosis of unilat inguinal hernia? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'unilat inguinal hernia' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | f9023fc425d0c56f3ae5e684 |
until 2 years ago, what were the top five most frequent specimen tests ordered for patients during the same month after they were diagnosed with angio stm/dudn w hmrhg? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'angio stm/dudn w hmrhg' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 7e2f398c609b287dd204d235 |
what were the three most frequently given specimen test for patients who were previously diagnosed with dermatitis nos within 2 months, during this year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'dermatitis nos' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | bf587ee9821e80f19fbee24b |
what are the three most frequently ordered specimen tests for patients who have been diagnosed with cholelith w cholecys nec before within 2 months, until 2104? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'cholelith w cholecys nec' ) and strftime('%y',diagnoses_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | 736a5f9548b7a5fe7a7f472e |
until 2 years ago what are the top five most frequent specimen tests given to patients within 2 months after being diagnosed with hx-sulfonamides allergy? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'hx-sulfonamides allergy' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 922b0b158538ad713d9e069d |
what are the three most commonly ordered specimen test for patients who are previously diagnosed with tracheostomy - mech comp within 2 months, this year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'tracheostomy - mech comp' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | 712923853eda1900513b0a36 |
what were the three most common specimen tests for patients who had been diagnosed with other esophagitis previously within 2 months, until 4 years ago? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'other esophagitis' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-4 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | 53c3c701159494b4ced1e52b |
for patients who were until 2104 diagnosed with ac alcohol intox-contin, what were the top five most common specimen tests that followed during the same hospital visit? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'ac alcohol intox-contin' ) and strftime('%y',diagnoses_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 8fd37a283bbfc3a769fc1f51 |
what were the three most commonly ordered specimen tests for patients who were diagnosed with poison-antipsychotic nec before within 2 months last year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'poison-antipsychotic nec' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | c13ad858be664e1902354324 |
what were the five most frequently ordered specimen tests for patients who were previously diagnosed with adv eff antibiotics nec since 2 years ago in the same hospital encounter? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'adv eff antibiotics nec' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 67b10bf4df1ee39057f78e7f |
what are the five most frequent specimen tests that patients had within 2 months after they had been diagnosed with abdom aortic aneurysm until 2100? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'abdom aortic aneurysm' ) and strftime('%y',diagnoses_icd.charttime) <= '2100' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | a3d9f3220fe65b44956e482b |
what are the top four most frequent specimen tests that patients were given within the same hospital visit after being diagnosed with pneumococcal septicemia? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'pneumococcal septicemia' ) ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | d20222eb4618f8d40269be80 |
what are the top five most common specimen tests that follow during the same hospital encounter for patients who have been diagnosed with parox atrial tachycardia in 2100? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'parox atrial tachycardia' ) and strftime('%y',diagnoses_icd.charttime) = '2100' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 8708b83491de4d569f050f31 |
what are the four most commonly ordered specimen tests for patients who have been diagnosed with nb intraven hem,grade i previously within 2 months until 2104? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'nb intraven hem,grade i' ) and strftime('%y',diagnoses_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 099c63c96097229780dd0497 |
until 1 year ago, what are the top three most common specimen tests given to patients within 2 months after diagnosis of hx-malig skin melanoma? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'hx-malig skin melanoma' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | 6d807171bcc405bcb5898dde |
since 6 years ago, what are the top four most frequent specimen tests ordered for patients during the same hospital visit after diagnosis of bladder/urethra inj-clos? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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-clos' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-6 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.charttime) >= datetime(current_time,'-6 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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 3e728e6025c0ffaffa2314d9 |
what are the four most frequent specimen tests that patients had within the same month after having been diagnosed with 29-30 comp wks gestation until 2104? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = '29-30 comp wks gestation' ) and strftime('%y',diagnoses_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 1b49b4f93c68f69b157a7d4d |
what are the top four most frequent specimen tests a patient had within 2 months after being diagnosed with ped cycl acc-ped cyclist since 2105? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'ped cycl acc-ped cyclist' ) and strftime('%y',diagnoses_icd.charttime) >= '2105' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | d707c5e92740442b751098cb |
until 2103 what was the top five most frequent specimen tests given to patients within 2 months after diagnosis of status amput below knee? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'status amput below knee' ) and strftime('%y',diagnoses_icd.charttime) <= '2103' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 9586a7b1d251bf2c0156d1a0 |
for patients who were diagnosed in 2102 with dermatophytosis of body, what were the top five most frequent specimen tests that followed within 2 months? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'dermatophytosis of body' ) and strftime('%y',diagnoses_icd.charttime) = '2102' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.charttime) = '2102' ) 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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 3a6db789094c04b3dc209495 |
what are the three most frequently given specimen tests for patients who had previously been diagnosed with dmii wo cmp uncntrld within 2 months, since 2105? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 wo cmp uncntrld' ) and strftime('%y',diagnoses_icd.charttime) >= '2105' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | c98bae953f654258255efe05 |
what was the three most frequently ordered specimen tests ordered for patients who were previously diagnosed with pancreatic disorder nec in the same hospital encounter since 2104? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'pancreatic disorder nec' ) and strftime('%y',diagnoses_icd.charttime) >= '2104' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | 72ddeea887a1361499ef76be |
during this year what were the three most frequent specimen test given to the patients in the same hospital encounter after being diagnosed with mrsa elsewhere/nos? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'mrsa elsewhere/nos' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | 74ea8e5cf070a4c21f280263 |
what was the top five most common specimen tests that followed within 2 months for those who had been diagnosed with mitral/aortic val insuff this year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'mitral/aortic val insuff' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 7146a836ce6071d4b80c31f7 |
since 2101, what were the top four most frequent specimen tests given to patients within 2 months following the diagnosis of angiopathy in other dis? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'angiopathy in other dis' ) and strftime('%y',diagnoses_icd.charttime) >= '2101' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.charttime) >= '2101' ) 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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | cbbb812d43588fca84f160a9 |
in 2103, what are the five most frequent specimen tests given to patients within 2 months after being diagnosed with hearing loss nos? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'hearing loss nos' ) and strftime('%y',diagnoses_icd.charttime) = '2103' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 41d5cf3b1d8edddb4f3db202 |
what are the four most frequently ordered specimen test for patients who were diagnosed with fx facial bone nec-close previously within the same month, since 3 years ago? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'fx facial bone nec-close' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-3 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 52951ef490961542529bf341 |
what are the three most frequently ordered specimen tests for patients that were previously diagnosed with other esophagitis within 2 months until 2 years ago? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'other esophagitis' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | f5b35c69f9a93a71a4f0cf25 |
what are the five most frequently ordered specimen tests for patients that had previously been diagnosed with react-oth vasc dev/graft during the same month since 2101? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'react-oth vasc dev/graft' ) and strftime('%y',diagnoses_icd.charttime) >= '2101' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | a6ff13205b0756d773542302 |
what are the four most common specimen tests for patients who had previously been diagnosed with food/vomit pneumonitis within 2 months, during the previous year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'food/vomit pneumonitis' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 58a84be0f2cc4abdd0201c46 |
what are the five most frequent specimen tests that patients took within 2 months after being diagnosed with asphyxiation/strangulat the last year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'asphyxiation/strangulat' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 5682eb8786d7f834fb644a81 |
what are the three most frequently ordered specimen tests for patients who were diagnosed with hx tia/stroke w/o resid before in the last year during the same month? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'hx tia/stroke w/o resid' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | b5654b939b3e58ffa7844e81 |
what were the five most frequently ordered specimen tests ordered for patients who had previously been diagnosed with cirrhosis of liver nos in the same hospital encounter, during a year before? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'cirrhosis of liver nos' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | bda5e89ffecdba267b648c27 |
what are the five most commonly taken specimen tests until 3 years ago for patients who were previously diagnosed with deliver-single liveborn during the same month? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'deliver-single liveborn' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-3 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | c122b97cb14b8315296afead |
what are the four most commonly ordered specimen tests for patients who were previously diagnosed with gen cnv epil w/o intr ep within 2 months in a year before? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'gen cnv epil w/o intr ep' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | a9c53d66e5aa00a97a87c97a |
since 2105 what were the top four most frequent specimen tests given to patients within the same hospital visit after being diagnosed with sirs, nos? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'sirs, nos' ) and strftime('%y',diagnoses_icd.charttime) >= '2105' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 37a4093e5b9a31683baab0c7 |
what are the three most commonly ordered specimen test for a patient who was previously diagnosed with mal neo upper lobe lung during the same month during the last year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'mal neo upper lobe lung' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | ac9abc195e0eb88153ec66e2 |
list the top four most frequent specimen test that were given to patients within 2 months after they were diagnosed with syst lupus erythematosus until 3 years ago. | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'syst lupus erythematosus' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-3 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.charttime) <= datetime(current_time,'-3 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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 77826d98693d353075903663 |
what were the four most frequently given specimen tests for patients who have previously been diagnosed with mal neo lymph intra-abd within 2 months, in this year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'mal neo lymph intra-abd' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 5b5e46927e18520517c93a21 |
what are the top three most frequent specimen tests that patients took during the same hospital encounter after being diagnosed with hot substance accid nec since 4 years ago? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'hot substance accid nec' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-4 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.charttime) >= datetime(current_time,'-4 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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | e1c3623966f7cfd9b216499c |
what were the three most commonly ordered specimen tests for patients who were diagnosed with dieulafoy les,stom&duod before within the same month since 2100? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'dieulafoy les,stom&duod' ) and strftime('%y',diagnoses_icd.charttime) >= '2100' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.charttime) >= '2100' ) 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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | f4d82d92df86def687c174d8 |
during the last year, what were the top four most frequent specimen tests given to a patient in the same month after the diagnosis of mal neo pyloric antrum? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'mal neo pyloric antrum' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | c5885ace0ef95c0f8b02fb01 |
what were the four most frequently ordered microbiology tests for patients that received ins drug-elut coronry st before during the same hospital encounter, during the last year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'ins drug-elut coronry st' ) and datetime(procedures_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | bce965bccd2c971f153d8da5 |
since 2100, what were the top three most frequent microbiological tests ordered for patients during the same month after lap abd rep-diaphr hern? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'lap abd rep-diaphr hern' ) and strftime('%y',procedures_icd.charttime) >= '2100' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.charttime) >= '2100' ) 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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | e6145848507412c92d5ee36f |
what are the four most commonly given microbiological tests for patients who had previously received exc/dest hrt lesion open during the same month until 1 year ago? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'exc/dest hrt lesion open' ) and datetime(procedures_icd.charttime) <= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 4c75b08619158202293407a4 |
what are the five most frequently given microbiology tests for patients who have received other skin & subq i & d previously within the same month since 3 years ago? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'other skin & subq i & d' ) and datetime(procedures_icd.charttime) >= datetime(current_time,'-3 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 3fc0a04219e2d428b276cf59 |
what are the five most commonly given microbiology tests for patients who have previously had their unilat ing hern rep nos done within 2 months until 2104? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'unilat ing hern rep nos' ) and strftime('%y',procedures_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | ba85af28111743003ba6db1f |
what are the top four most frequent microbiology tests that the patients had within 2 months after they had a hypothermia procedure? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'hypothermia' ) ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | b2024c91f729c52e3077a531 |
what was the top four most frequent microbiology tests ordered for patients within 2 months after receiving a fus/refus 2-3 vertebrae until 4 years ago? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'fus/refus 2-3 vertebrae' ) and datetime(procedures_icd.charttime) <= datetime(current_time,'-4 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | a3ef8d30d494d8ca8dc45ccb |
what are the five most frequent microbiology tests that followed within 2 months for those who received left heart cardiac cath in the last year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'left heart cardiac cath' ) and datetime(procedures_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | b6fd12c9f2d9c6891d6bbf33 |
what were the top four frequent microbiology tests that patients had in the same month after they had had a ven cath renal dialysis procedure until 3 years ago? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'ven cath renal dialysis' ) and datetime(procedures_icd.charttime) <= datetime(current_time,'-3 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | 9727079cf8261c4ca590aa1a |
what is the top five most frequent microbiology tests that followed in the same month for patients who received packed cell transfusion during the previous year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'packed cell transfusion' ) and datetime(procedures_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | fadab60b99622a3d7d27fc68 |
what is the top three most commonly performed microbiology test that the patients until 1 year ago had within the same month after receiving a 1 int mam-cor art bypass treatment? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = '1 int mam-cor art bypass' ) and datetime(procedures_icd.charttime) <= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | d216c2d7bb21ff6388f23022 |
what were the three most frequently ordered microbiology tests for patients that had previous fiber-optic bronchoscopy during the same month in 2104? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'fiber-optic bronchoscopy' ) and strftime('%y',procedures_icd.charttime) = '2104' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | 65d059b2e17d8b296c60ccb7 |
what are the five most common microbiology tests for patients that received lt heart angiocardiogram previously within 2 months? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'lt heart angiocardiogram' ) ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | d33f453a7e5c255eeb580e4b |
what are the top five most frequent microbiology tests that patients were given within 2 months after receiving endovasc embol hd/nk ves until 3 years ago? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'endovasc embol hd/nk ves' ) and datetime(procedures_icd.charttime) <= datetime(current_time,'-3 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.charttime) <= datetime(current_time,'-3 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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 407bd9214e4b3f04c5824ad9 |
what are the three most frequently ordered microbiology tests for patients who have had destruct chest wall les before in the same month last year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 datetime(procedures_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | c48f6eac49e4aa35a7b9dbd9 |
since 4 years ago, what is the top four most frequent microbiology tests given to patients in the same hospital encounter within the same patient after receiving percu abdominal drainage? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'percu abdominal drainage' ) and datetime(procedures_icd.charttime) >= datetime(current_time,'-4 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.charttime) >= datetime(current_time,'-4 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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | cd28cd4e32a55eab9161de09 |
what are the five most commonly given microbiology tests for patients that had previously received spinal struct repair nec within 2 months? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'spinal struct repair nec' ) ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 2f0bd352c3664e138419e51e |
what were the top three most frequently ordered microbiology tests for patients within 2 months after receiving percu endosc gastrostomy until 2100? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'percu endosc gastrostomy' ) and strftime('%y',procedures_icd.charttime) <= '2100' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | 831adca678574e048339a272 |
since 1 year ago what are the top five most frequent microbiological tests given to patients within 2 months after inject/infuse nec? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'inject/infuse nec' ) and datetime(procedures_icd.charttime) >= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | a9d671afdf6c57e089397c95 |
what are the four most frequent microbiological tests that patients took in the same month after receiving ot cerv fusion post/post until 3 years ago? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'ot cerv fusion post/post' ) and datetime(procedures_icd.charttime) <= datetime(current_time,'-3 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | bcd798f86b672510751aba9c |
what are the five most commonly ordered microbiology tests for patients that had already received packed cell transfusion during the same hospital visit the last year? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'packed cell transfusion' ) and datetime(procedures_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 0c3a815f8f0ce80cc7b28f64 |
what were the four most frequently ordered microbiology tests for patients who had previously received immobiliz/wound attn nec within 2 months, until 1 year ago? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'immobiliz/wound attn nec' ) and datetime(procedures_icd.charttime) <= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | e75e0a044135f1adac872f28 |
what were the top three most common microbiological tests that followed within the same month for patients who were given left heart cardiac cath? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'left heart cardiac cath' ) ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | d1a556cd000f1819cbdaa29a |
what were the top three most frequent microbiology tests that followed in the same month for those who had insert intercostal cath until 2 years ago? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'insert intercostal cath' ) and datetime(procedures_icd.charttime) <= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 3 | mimic_iii | false | bd544791cc4381582f600add |
what are the five most commonly given microbiology tests for patients who previously received flexible sigmoidoscopy during the same month until 2104? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'flexible sigmoidoscopy' ) and strftime('%y',procedures_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where strftime('%y',microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 5 | mimic_iii | false | 5fc0183f604def3c3315f026 |
last year what were the four most frequent microbiological tests given to patients in the same hospital encounter after receiving ins drug-elut coronry st? | select t3.spec_type_desc from ( select t2.spec_type_desc, 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 = 'ins drug-elut coronry st' ) and datetime(procedures_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, microbiologyevents.spec_type_desc, microbiologyevents.charttime, admissions.hadm_id from microbiologyevents join admissions on microbiologyevents.hadm_id = admissions.hadm_id where datetime(microbiologyevents.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.spec_type_desc ) as t3 where t3.c1 <= 4 | mimic_iii | false | df14fa5b4cef6e311dd1cc71 |