inputs
stringlengths 25
211
| labels
stringlengths 62
1.22k
| db_id
stringclasses 1
value | is_impossible
bool 1
class | id
stringlengths 24
24
|
---|---|---|---|---|
a year before, what are four most frequent medications prescribed in the same hospital visit to the male patients of age 60 or above after they have been diagnosed with pneumocystosis? | select t3.drug from ( select t2.drug, 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 = 'pneumocystosis' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age >= 60 and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | 7a9fd76b457fddf9ce2bed13 |
what were the three most frequent drugs prescribed within the same month to the male patients of age 30s after they had been diagnosed with chr airway obstruct nec, until 2103. | select t3.drug from ( select t2.drug, 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 = 'chr airway obstruct nec' ) and strftime('%y',diagnoses_icd.charttime) <= '2103' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 30 and 39 and strftime('%y',prescriptions.startdate) <= '2103' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t1.charttime,'start of month') = datetime(t2.startdate,'start of month') group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | 3be14f886372cc96c1879304 |
the last year, what were the three most frequent medications prescribed within 2 months to the female patients with age 60 or above after being diagnosed with septic shock? | select t3.drug from ( select t2.drug, 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 = 'septic shock' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age >= 60 and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | 69dc0f0cdb517a75e18b7d79 |
what are the three most commonly prescribed medications that were prescribed to the male patients in the 40s during the same hospital visit after they were diagnosed with chr diastolic hrt fail since 2101? | select t3.drug from ( select t2.drug, 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 = 'chr diastolic hrt fail' ) and strftime('%y',diagnoses_icd.charttime) >= '2101' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 40 and 49 and strftime('%y',prescriptions.startdate) >= '2101' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | 768530eff82fd74086f9b0b3 |
what are the three most frequent drugs prescribed to the female patients 30s after they have been diagnosed with hypertension nos until 1 year ago in the same hospital visit? | select t3.drug from ( select t2.drug, 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 = 'hypertension nos' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 30 and 39 and datetime(prescriptions.startdate) <= datetime(current_time,'-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | 3d76ecf7a0517d85c837f324 |
during the previous year, what was the five most common medications prescribed to male patients 20s during the same month after they had been diagnosed with dmii wo cmp nt st uncntr? | select t3.drug from ( select t2.drug, 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 nt st uncntr' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 20 and 29 and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t1.charttime,'start of month') = datetime(t2.startdate,'start of month') group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | cc816ab7b34d08895d22b45c |
what are the three most common drugs that are prescribed to male patients 30s in the same month after they are diagnosed with mental disor nec oth dis until 1 year ago? | select t3.drug from ( select t2.drug, 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 = 'mental disor nec oth dis' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 30 and 39 and datetime(prescriptions.startdate) <= datetime(current_time,'-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t1.charttime,'start of month') = datetime(t2.startdate,'start of month') group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | 1f0bc42f5caebff61fbfe956 |
since 1 year ago, for male patients aged 30s, what are the three most frequent drugs prescribed within 2 months after they have been diagnosed with pneumonia, organism nos? | select t3.drug from ( select t2.drug, 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 = 'pneumonia, organism nos' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 30 and 39 and datetime(prescriptions.startdate) >= datetime(current_time,'-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | eff2d64dfcf660763bb88fca |
what are the five most frequent drugs which were prescribed until 2104 to the male patients of the 60 or above after they were diagnosed with atrial fibrillation within 2 months? | select t3.drug from ( select t2.drug, 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 = 'atrial fibrillation' ) and strftime('%y',diagnoses_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age >= 60 and strftime('%y',prescriptions.startdate) <= '2104' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | dd2aa9961013379a4bcbde7f |
what are the three most frequent drugs that were prescribed to female patients of the 50s within 2 months after having been diagnosed with drug-induced delirium? | select t3.drug from ( select t2.drug, 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 = 'drug-induced delirium' ) ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 50 and 59 ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | 26e6fd59da20ee3b8a32fae6 |
what was the five most frequent drugs that were prescribed to the male patients aged in the 30s within 2 months after they had been diagnosed with accidental op laceration until 2104? | select t3.drug from ( select t2.drug, 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 = 'accidental op laceration' ) and strftime('%y',diagnoses_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 30 and 39 and strftime('%y',prescriptions.startdate) <= '2104' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | cba11721305b0bb799c77ab5 |
the previous year, what is the three most frequent drugs prescribed during the same month to female patients of age 50s after having been diagnosed with thrombocytopenia nos? | select t3.drug from ( select t2.drug, 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 = 'thrombocytopenia nos' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 50 and 59 and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t1.charttime,'start of month') = datetime(t2.startdate,'start of month') group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | 92e6c3d4b8084e9726fbd744 |
what was the five most frequent drugs that were prescribed within 2 months to a female patient of age 30s after they had been diagnosed with hypertension nos, during this year? | select t3.drug from ( select t2.drug, 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 = 'hypertension nos' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 30 and 39 and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-0 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | 0a3e3d114185882e6fff9a93 |
what are the five most frequently prescribed drugs that were prescribed during the same hospital visit to the male patients 30s after they have been diagnosed with acute kidney failure nos, last year? | select t3.drug from ( select t2.drug, 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 = 'acute kidney failure nos' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 30 and 39 and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | 44f24694c3e460b912c9da40 |
what are the five most frequently prescribed drugs for female patients of the 30s within 2 months after they have been diagnosed with alcoh dep nec/nos-unspec during the previous year? | select t3.drug from ( select t2.drug, 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 = 'alcoh dep nec/nos-unspec' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 30 and 39 and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | cbcb0097134de6b1d63396b6 |
until 2103, what are the three most frequent medications prescribed within 2 months to female patients of age 60 or above after they have been diagnosed with adv eff antineoplastic? | select t3.drug from ( select t2.drug, 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 antineoplastic' ) and strftime('%y',diagnoses_icd.charttime) <= '2103' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age >= 60 and strftime('%y',prescriptions.startdate) <= '2103' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | 0b5b2fc853a5400976086537 |
until 2104, what is the five most frequent drug prescribed within 2 months to the male patients of age 20s after they have been diagnosed with hypothyroidism nos? | select t3.drug from ( select t2.drug, 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 = 'hypothyroidism nos' ) and strftime('%y',diagnoses_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 20 and 29 and strftime('%y',prescriptions.startdate) <= '2104' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | cc821554a576d782f8171e45 |
in 2102 what was the four most frequent medications prescribed during the same month to the male patients with age 50s after they were diagnosed with late effect acute polio? | select t3.drug from ( select t2.drug, 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 = 'late effect acute polio' ) and strftime('%y',diagnoses_icd.charttime) = '2102' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 50 and 59 and strftime('%y',prescriptions.startdate) = '2102' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t1.charttime,'start of month') = datetime(t2.startdate,'start of month') group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | 510327a96b43d8782d763fe1 |
what are the four most frequent drugs prescribed to the female patients 30s within 2 months after they have been diagnosed with acute respiratry failure since 2104? | select t3.drug from ( select t2.drug, 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 = 'acute respiratry failure' ) and strftime('%y',diagnoses_icd.charttime) >= '2104' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 30 and 39 and strftime('%y',prescriptions.startdate) >= '2104' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | 10a0f1163c481ee2de690170 |
what was the four most frequent medicines that were prescribed in the same hospital visit to the male patients aged 20s after they had been diagnosed with acute kidney failure nos in 2104? | select t3.drug from ( select t2.drug, 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 = 'acute kidney failure nos' ) and strftime('%y',diagnoses_icd.charttime) = '2104' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 20 and 29 and strftime('%y',prescriptions.startdate) = '2104' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | 63293073577fe66295cdc937 |
what were the five most frequent medications prescribed to male patients 30s after they were diagnosed with accidental op laceration within 2 months? | select t3.drug from ( select t2.drug, 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 = 'accidental op laceration' ) ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 30 and 39 ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | f5f381da11faf12e0e3c16a0 |
what are the four most frequent drugs that were prescribed to female patients of 50s in the same hospital encounter after they have been diagnosed with cholangitis during a year before? | select t3.drug from ( select t2.drug, 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 = 'cholangitis' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 50 and 59 and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | 2371d998ba1ee4731446a335 |
what were the four most frequent drugs prescribed to the female patients of the 30s in the same hospital encounter after they had been diagnosed with acute kidney failure nos? | select t3.drug from ( select t2.drug, 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 = 'acute kidney failure nos' ) ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 30 and 39 ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | 98e0d1089714367f9e82d75a |
what are the four most frequent drugs that were prescribed within the same month to the male patients with age 30s after they have been diagnosed with crnry athrscl natve vssl, since 6 years ago. | select t3.drug from ( select t2.drug, 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 = 'crnry athrscl natve vssl' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-6 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 30 and 39 and datetime(prescriptions.startdate) >= datetime(current_time,'-6 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t1.charttime,'start of month') = datetime(t2.startdate,'start of month') group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | 70cf056bb79925823c4c2179 |
what are the five most frequently prescribed drugs that were prescribed to male patients 50s within the same month after being diagnosed with fx facial bone nec-close until 1 year ago? | select t3.drug from ( select t2.drug, 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,'-1 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 50 and 59 and datetime(prescriptions.startdate) <= datetime(current_time,'-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t1.charttime,'start of month') = datetime(t2.startdate,'start of month') group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | bb6b62579f1fc1045bc03b4d |
what is the three most frequently prescribed drugs that were prescribed within the same month to the male patients with age 40s after they have been diagnosed with atrial fibrillation,? | select t3.drug from ( select t2.drug, 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 = 'atrial fibrillation' ) ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 40 and 49 ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t1.charttime,'start of month') = datetime(t2.startdate,'start of month') group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | c557b5c94783a50e69cf0178 |
what were the three most frequent drugs that were prescribed to male patients 30s during the same hospital visit after having been diagnosed with nonrupt cerebral aneurym since 2104? | select t3.drug from ( select t2.drug, 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 = 'nonrupt cerebral aneurym' ) and strftime('%y',diagnoses_icd.charttime) >= '2104' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 30 and 39 and strftime('%y',prescriptions.startdate) >= '2104' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | ab650b3d3be69ecaf91f4c19 |
what are the five most frequent drugs prescribed within 2 months to the male patients with age 60 or above after they have been diagnosed with atrial flutter, in 2100? | select t3.drug from ( select t2.drug, 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 = 'atrial flutter' ) and strftime('%y',diagnoses_icd.charttime) = '2100' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age >= 60 and strftime('%y',prescriptions.startdate) = '2100' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | 7e48425339845d7dfbd1ee7e |
since 6 years ago, what are the four most frequent drugs prescribed within 2 months to the female patients aged 20s after they have been diagnosed with single lb in-hosp w/o cs? | select t3.drug from ( select t2.drug, 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 = 'single lb in-hosp w/o cs' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-6 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 20 and 29 and datetime(prescriptions.startdate) >= datetime(current_time,'-6 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | 80c5ad5cf18104e504626a57 |
what are the drugs prescribed to the male patients aged 60 or above four most frequently within 2 months after they have been diagnosed with hypertension nos during this year? | select t3.drug from ( select t2.drug, 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 = 'hypertension nos' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age >= 60 and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-0 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | ee141ccea20b08ea910adf52 |
what are the five most frequent drugs which are prescribed to female patients in 20s within the same month after they have been diagnosed with hypertension nos since 2104? | select t3.drug from ( select t2.drug, 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 = 'hypertension nos' ) and strftime('%y',diagnoses_icd.charttime) >= '2104' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 20 and 29 and strftime('%y',prescriptions.startdate) >= '2104' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t1.charttime,'start of month') = datetime(t2.startdate,'start of month') group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | 0e075c17b22dbdcc8b38d3e3 |
what were the five most frequent drugs prescribed to female patients of age 40s during the same month after they had been diagnosed with venous insufficiency nos in 2105? | select t3.drug from ( select t2.drug, 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 = 'venous insufficiency nos' ) and strftime('%y',diagnoses_icd.charttime) = '2105' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 40 and 49 and strftime('%y',prescriptions.startdate) = '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t1.charttime,'start of month') = datetime(t2.startdate,'start of month') group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | e3497d13e8afe82f2ec137df |
what were the four most frequently prescribed drugs to the male patients of age 20s after they were diagnosed with crnry athrscl natve vssl within 2 months since 5 years ago? | select t3.drug from ( select t2.drug, 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 = 'crnry athrscl natve vssl' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-5 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 20 and 29 and datetime(prescriptions.startdate) >= datetime(current_time,'-5 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | c8bfea2ac957bcdf17576e17 |
what were the three most frequent drugs that were prescribed within 2 months to the male patients aged 20s after having been diagnosed with esophageal reflux, in 2105. | select t3.drug from ( select t2.drug, 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 = 'esophageal reflux' ) and strftime('%y',diagnoses_icd.charttime) = '2105' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 20 and 29 and strftime('%y',prescriptions.startdate) = '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | 94289332fbbd5951393f88c6 |
what are the five most frequent drugs that were prescribed within 2 months to the female patients aged 30s after they have been diagnosed with 35-36 comp wks gestation, since 3 years ago? | select t3.drug from ( select t2.drug, 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 = '35-36 comp wks gestation' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-3 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 30 and 39 and datetime(prescriptions.startdate) >= datetime(current_time,'-3 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | 872a625da7e6bcc797bac901 |
what were the four most frequently prescribed drugs that were prescribed to the male patients 40s within the same hospital visit after they had been diagnosed with severe sepsis until 2103? | select t3.drug from ( select t2.drug, 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 = 'severe sepsis' ) and strftime('%y',diagnoses_icd.charttime) <= '2103' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 40 and 49 and strftime('%y',prescriptions.startdate) <= '2103' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | 1399f3f6ff521bf176f190a5 |
what are the top four medications that were prescribed to female patients of the 30s in the same hospital encounter after they have been diagnosed this year with hypertension nos? | select t3.drug from ( select t2.drug, 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 = 'hypertension nos' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 30 and 39 and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-0 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | 56e4f855ccaaa211c9216118 |
what were the top four commonly prescribed drugs that male patients aged 20s were prescribed within the same hospital visit after having been diagnosed with long-term use anticoagul since 3 years ago? | select t3.drug from ( select t2.drug, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'long-term use anticoagul' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-3 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 20 and 29 and datetime(prescriptions.startdate) >= datetime(current_time,'-3 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | 675480e0573607c6770cb14a |
since 2100, what are the three most frequently prescribed drugs to female patients aged 30s within the same hospital visit after they have been diagnosed with atrial fibrillation? | select t3.drug from ( select t2.drug, 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 = 'atrial fibrillation' ) and strftime('%y',diagnoses_icd.charttime) >= '2100' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 30 and 39 and strftime('%y',prescriptions.startdate) >= '2100' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | 7fd5d581b8c9bea06ccb4023 |
until 4 years ago, what are the five most frequent medications prescribed within 2 months to the male patients aged 30s after having been diagnosed with ac posthemorrhag anemia? | select t3.drug from ( select t2.drug, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'ac posthemorrhag anemia' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-4 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 30 and 39 and datetime(prescriptions.startdate) <= datetime(current_time,'-4 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | beb1357dd5e7032a6fd1a278 |
what are the three most frequent drugs that since 6 years ago were prescribed to male patients 40s within 2 months after they had been diagnosed with gastrointest hemorr nos? | select t3.drug from ( select t2.drug, 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 = 'gastrointest hemorr nos' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-6 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 40 and 49 and datetime(prescriptions.startdate) >= datetime(current_time,'-6 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | b7225fe74211cc546eada60c |
what are the four most commonly prescribed drugs that were prescribed to male patients in their 50s in the same hospital encounter after they were diagnosed with tobacco use disorder in 2105? | select t3.drug from ( select t2.drug, 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 = 'tobacco use disorder' ) and strftime('%y',diagnoses_icd.charttime) = '2105' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 50 and 59 and strftime('%y',prescriptions.startdate) = '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | d9b4838d415b0e05b174f448 |
what were the five most frequent drugs that were prescribed during the same month to the female patients with age 50s after they have been diagnosed with adv eff anticoagulants, the last year? | select t3.drug from ( select t2.drug, 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 anticoagulants' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 50 and 59 and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t1.charttime,'start of month') = datetime(t2.startdate,'start of month') group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | a5363aeede9e06ea70e28425 |
during this year what were the three most frequently prescribed drugs prescribed to male patients 20s after they were diagnosed with single lb in-hosp w/o cs during the same hospital visit? | select t3.drug from ( select t2.drug, 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 = 'single lb in-hosp w/o cs' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 20 and 29 and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-0 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | bf7baf92097dae9ef3fd3f81 |
what's the three most frequent drugs that were prescribed in the same hospital encounter to the male patients of age 20s after they have been diagnosed with atrial fibrillation until 2 years ago? | select t3.drug from ( select t2.drug, 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 = 'atrial fibrillation' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 20 and 29 and datetime(prescriptions.startdate) <= datetime(current_time,'-2 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | de38005db5354a39d0cafdfe |
what are the three most frequently prescribed drugs that were prescribed to female patients aged 30s after being diagnosed with obstructive sleep apnea within the same month? | select t3.drug from ( select t2.drug, 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 = 'obstructive sleep apnea' ) ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 30 and 39 ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t1.charttime,'start of month') = datetime(t2.startdate,'start of month') group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | 54e4e1bd9f2e850e59eefe19 |
what was the five most frequent drugs that were prescribed in the same hospital visit to the female patient of age 20s after they had been diagnosed with tobacco use disorder this year? | select t3.drug from ( select t2.drug, 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 = 'tobacco use disorder' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 20 and 29 and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-0 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | 2049e60c1c109de3272da0f7 |
what is the three most frequent drugs that were prescribed for the female patients with the age of 30s within 2 months after having been diagnosed with surg compl-heart in this year? | select t3.drug from ( select t2.drug, 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 = 'surg compl-heart' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 30 and 39 and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-0 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | 726abcb50866aa80374a9b87 |
what were the four most frequent drugs prescribed to the female patients aged 60 or above in the same hospital encounter after they had been diagnosed with hx-prostatic malignancy since 3 years ago? | select t3.drug from ( select t2.drug, dense_rank() over ( order by count(*) desc ) as c1 from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'hx-prostatic malignancy' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-3 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age >= 60 and datetime(prescriptions.startdate) >= datetime(current_time,'-3 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | 10f1926932a6584890e324a2 |
what are the four most frequent drugs that were prescribed to male patients in their 30s during the same month after they had been diagnosed with chf nos during the last year? | select t3.drug from ( select t2.drug, 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 = 'chf nos' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 30 and 39 and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t1.charttime,'start of month') = datetime(t2.startdate,'start of month') group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | 49bf406f3c036abbb4ba8d86 |
what were the four most frequent drugs that were prescribed to male patients of the age 30s in the same month after they had been diagnosed with nb obsrv suspct infect since 6 years ago? | select t3.drug from ( select t2.drug, 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 obsrv suspct infect' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-6 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 30 and 39 and datetime(prescriptions.startdate) >= datetime(current_time,'-6 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t1.charttime,'start of month') = datetime(t2.startdate,'start of month') group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | 99cd6011d5d0a6b28e2e9163 |
what were the four most frequent drugs prescribed within 2 months to the male patients with age 20s after they had been diagnosed with nb obsrv suspct infect, until 2104? | select t3.drug from ( select t2.drug, 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 obsrv suspct infect' ) and strftime('%y',diagnoses_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 20 and 29 and strftime('%y',prescriptions.startdate) <= '2104' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | 7f395b139f7a5b4a66999e94 |
what is the three most frequent drugs that were prescribed within 2 months to a female patient 20s after they have been diagnosed with hyp kid nos w cr kid v, since 4 years ago? | select t3.drug from ( select t2.drug, 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 = 'hyp kid nos w cr kid v' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-4 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 20 and 29 and datetime(prescriptions.startdate) >= datetime(current_time,'-4 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | dc1affa87e08ec90d6c3a0a9 |
since 4 years ago, what were the four most frequent drugs prescribed within 2 months to the female patients aged 50s after they had been diagnosed with alcoh dep nec/nos-contin? | select t3.drug from ( select t2.drug, 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 = 'alcoh dep nec/nos-contin' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-4 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 50 and 59 and datetime(prescriptions.startdate) >= datetime(current_time,'-4 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | 9c34180ffe50c7b0f1732185 |
what are the three most frequent drugs that were prescribed in the same month to the female patients 40s after having been diagnosed with chr airway obstruct nec since 1 year ago? | select t3.drug from ( select t2.drug, 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 = 'chr airway obstruct nec' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-1 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 40 and 49 and datetime(prescriptions.startdate) >= datetime(current_time,'-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t1.charttime,'start of month') = datetime(t2.startdate,'start of month') group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | 8ce82e67eb265017a17ebe7d |
what were the five most common medications prescribed to male patients in the 30s during the same hospital visit after they had been diagnosed with hyperlipidemia nec/nos in 2105? | select t3.drug from ( select t2.drug, 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 = 'hyperlipidemia nec/nos' ) and strftime('%y',diagnoses_icd.charttime) = '2105' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 30 and 39 and strftime('%y',prescriptions.startdate) = '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | cc3c6009d2a0073e2eb43da4 |
what was the three most frequent drugs that were prescribed in the same hospital encounter to a male patient of age 50s after having been diagnosed with mitral valve disorder, in 2105? | select t3.drug from ( select t2.drug, 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 = 'mitral valve disorder' ) and strftime('%y',diagnoses_icd.charttime) = '2105' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age between 50 and 59 and strftime('%y',prescriptions.startdate) = '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 3 | mimic_iii | false | aea8d5bf04b010f3f2f38d91 |
since 2105 what are the five most frequent medications prescribed during the same hospital visit to female patients of age 50s after they have been diagnosed with tobacco use disorder? | select t3.drug from ( select t2.drug, 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 = 'tobacco use disorder' ) and strftime('%y',diagnoses_icd.charttime) >= '2105' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 50 and 59 and strftime('%y',prescriptions.startdate) >= '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | 750829533b522740b13f0954 |
what were the four most frequent drugs that were prescribed to male patients in the 60 or above in the same hospital visit after being diagnosed with status-post ptca since 2105? | select t3.drug from ( select t2.drug, 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 = 'status-post ptca' ) and strftime('%y',diagnoses_icd.charttime) >= '2105' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age >= 60 and strftime('%y',prescriptions.startdate) >= '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and t1.hadm_id = t2.hadm_id group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | f681af2571e5062c568e386a |
what are the four most frequent drugs that were prescribed to male patients in their 60 or above within 2 months after they had been diagnosed with dmii wo cmp nt st uncntr until 2102? | select t3.drug from ( select t2.drug, 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 nt st uncntr' ) and strftime('%y',diagnoses_icd.charttime) <= '2102' ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'm' ) and admissions.age >= 60 and strftime('%y',prescriptions.startdate) <= '2102' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t2.startdate) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month') group by t2.drug ) as t3 where t3.c1 <= 4 | mimic_iii | false | fb61f234cf4b1f2960b8b489 |
this year what were the five most frequent medications prescribed within the same month to the female patients of age 50s after having been diagnosed with need prphyl vc vrl hepat? | select t3.drug from ( select t2.drug, 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 = 'need prphyl vc vrl hepat' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 join ( select admissions.subject_id, prescriptions.drug, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where admissions.subject_id in ( select patients.subject_id from patients where patients.gender = 'f' ) and admissions.age between 50 and 59 and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-0 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.startdate and datetime(t1.charttime,'start of month') = datetime(t2.startdate,'start of month') group by t2.drug ) as t3 where t3.c1 <= 5 | mimic_iii | false | b53a4156724de1327f292caa |
what were the three most frequent lab tests? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents group by labevents.itemid ) as t1 where t1.c1 <= 3 ) | mimic_iii | false | c05b5614b7f11bd498d4b576 |
what lab tests were the three most frequently ordered in the last year? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') group by labevents.itemid ) as t1 where t1.c1 <= 3 ) | mimic_iii | false | be8117350452c7d4dda11104 |
what is the five most frequently taken laboratory tests since 2104? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where strftime('%y',labevents.charttime) >= '2104' group by labevents.itemid ) as t1 where t1.c1 <= 5 ) | mimic_iii | false | 3c8503648f596301e9547470 |
what is the five most frequently taken in lab tests until 2102? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where strftime('%y',labevents.charttime) <= '2102' group by labevents.itemid ) as t1 where t1.c1 <= 5 ) | mimic_iii | false | a4cf97a0712e5ca9646b512f |
what were the five most frequently performed laboratory tests in 2104? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where strftime('%y',labevents.charttime) = '2104' group by labevents.itemid ) as t1 where t1.c1 <= 5 ) | mimic_iii | false | ac2e34ca4549938a96d1b0a2 |
what was the five most frequently ordered laboratory tests this year? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') group by labevents.itemid ) as t1 where t1.c1 <= 5 ) | mimic_iii | false | cc2795cfed08e6f06e125623 |
what was the three most frequently tested lab test until 2 years ago? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where datetime(labevents.charttime) <= datetime(current_time,'-2 year') group by labevents.itemid ) as t1 where t1.c1 <= 3 ) | mimic_iii | false | 600d69fe90675894f536493f |
what are the three most common lab tests that happened until 2100? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where strftime('%y',labevents.charttime) <= '2100' group by labevents.itemid ) as t1 where t1.c1 <= 3 ) | mimic_iii | false | 6011cd9134d3dfc729538001 |
what were the four most common lab tests given the previous year? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') group by labevents.itemid ) as t1 where t1.c1 <= 4 ) | mimic_iii | false | 8637ec4d6189448e90d79d37 |
what are the five most frequent laboratory tests taken during the previous year? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') group by labevents.itemid ) as t1 where t1.c1 <= 5 ) | mimic_iii | false | ae62ab0ceb682f065c3b6c46 |
what is the three most frequently ordered lab test until 2101? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where strftime('%y',labevents.charttime) <= '2101' group by labevents.itemid ) as t1 where t1.c1 <= 3 ) | mimic_iii | false | b61ec638416332b5ac970671 |
what were the top three most common lab tests in 2103? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where strftime('%y',labevents.charttime) = '2103' group by labevents.itemid ) as t1 where t1.c1 <= 3 ) | mimic_iii | false | 1be9cbd3ca3defbbd27369fb |
what's the four most frequently ordered lab test this year? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') group by labevents.itemid ) as t1 where t1.c1 <= 4 ) | mimic_iii | false | 9d3d87337f06f2cf89a329c3 |
what tests are three most often given in the laboratory since 1 year ago? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where datetime(labevents.charttime) >= datetime(current_time,'-1 year') group by labevents.itemid ) as t1 where t1.c1 <= 3 ) | mimic_iii | false | 5b042be27d9d57a25d9756cc |
what are the three lab tests that are given most frequently this year? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') group by labevents.itemid ) as t1 where t1.c1 <= 3 ) | mimic_iii | false | 527ce797ad1a042b3b3f8cf3 |
what tests are the four most frequently ordered lab tests in this year? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') group by labevents.itemid ) as t1 where t1.c1 <= 4 ) | mimic_iii | false | 592cfbd1f3422747592352e0 |
what are the five most frequent laboratory tests until 2 years ago? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where datetime(labevents.charttime) <= datetime(current_time,'-2 year') group by labevents.itemid ) as t1 where t1.c1 <= 5 ) | mimic_iii | false | 4caacf7a673bd88fc80450a0 |
what is the three most common lab test that are done until 2 years ago? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where datetime(labevents.charttime) <= datetime(current_time,'-2 year') group by labevents.itemid ) as t1 where t1.c1 <= 3 ) | mimic_iii | false | 9001b46576d31f9fe2e882aa |
what were the top three most frequent laboratory tests since 3 years ago? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where datetime(labevents.charttime) >= datetime(current_time,'-3 year') group by labevents.itemid ) as t1 where t1.c1 <= 3 ) | mimic_iii | false | 3b8908facc6819d0439b8a6d |
what's the five most frequently taken lab test until 2100? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where strftime('%y',labevents.charttime) <= '2100' group by labevents.itemid ) as t1 where t1.c1 <= 5 ) | mimic_iii | false | a1972bfb34f8fc765fd5c98a |
what is the three most common lab test performed? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents group by labevents.itemid ) as t1 where t1.c1 <= 3 ) | mimic_iii | false | 0150af6a5e4b8fa5dd3a3646 |
what are the top four most common lab tests until 2100? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where strftime('%y',labevents.charttime) <= '2100' group by labevents.itemid ) as t1 where t1.c1 <= 4 ) | mimic_iii | false | 6a61f94706fc8fc27e5a74e7 |
since 5 years ago what were the five most common lab tests? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where datetime(labevents.charttime) >= datetime(current_time,'-5 year') group by labevents.itemid ) as t1 where t1.c1 <= 5 ) | mimic_iii | false | 1b680d0d40bcbf28257fc9d3 |
what lab tests are the five most commonly ordered until 2100? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where strftime('%y',labevents.charttime) <= '2100' group by labevents.itemid ) as t1 where t1.c1 <= 5 ) | mimic_iii | false | 2b258ab4168e63e611f2746a |
what are the lab tests that are the five most frequently given the previous year? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') group by labevents.itemid ) as t1 where t1.c1 <= 5 ) | mimic_iii | false | b58ec4075d322da31406c20e |
tell me the lab tests until 2101 that were five most common? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where strftime('%y',labevents.charttime) <= '2101' group by labevents.itemid ) as t1 where t1.c1 <= 5 ) | mimic_iii | false | 2d4033d36981df0b79e0d3f7 |
what are the top five most common laboratory tests performed in this year? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') group by labevents.itemid ) as t1 where t1.c1 <= 5 ) | mimic_iii | false | c2cf4b94205390ca9e773e2f |
until 2102 what were the four most common lab tests? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where strftime('%y',labevents.charttime) <= '2102' group by labevents.itemid ) as t1 where t1.c1 <= 4 ) | mimic_iii | false | e42b27136df5944c0ef80b5a |
what were the three most common lab tests given since 2105? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where strftime('%y',labevents.charttime) >= '2105' group by labevents.itemid ) as t1 where t1.c1 <= 3 ) | mimic_iii | false | a07cb5d5b02fdd79e58121cd |
what tests are five most often given in the laboratory since 2103? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where strftime('%y',labevents.charttime) >= '2103' group by labevents.itemid ) as t1 where t1.c1 <= 5 ) | mimic_iii | false | bd693af09bd03a71f037d1b1 |
what is the four most common lab testing done since 5 years ago? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where datetime(labevents.charttime) >= datetime(current_time,'-5 year') group by labevents.itemid ) as t1 where t1.c1 <= 4 ) | mimic_iii | false | 0bec2d11f7c0c4e6b54d9572 |
what was the five most commonly taken laboratory test until 4 years ago for a patient aged 30s? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 30 and 39 ) and datetime(labevents.charttime) <= datetime(current_time,'-4 year') group by labevents.itemid ) as t1 where t1.c1 <= 5 ) | mimic_iii | false | 0770dcfe943796fb0684fae9 |
what is the four most frequently ordered lab tests until 1 year ago in patients of age 20s? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 20 and 29 ) and datetime(labevents.charttime) <= datetime(current_time,'-1 year') group by labevents.itemid ) as t1 where t1.c1 <= 4 ) | mimic_iii | false | 7b06fab6f72b28b57a1a2f89 |
what are the three most common lab tests for the patients of age 50s since 2102? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 50 and 59 ) and strftime('%y',labevents.charttime) >= '2102' group by labevents.itemid ) as t1 where t1.c1 <= 3 ) | mimic_iii | false | 00eb42cb7cc35bc376e152ed |
what were the four most common laboratory tests for patients of age 20s? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 20 and 29 ) group by labevents.itemid ) as t1 where t1.c1 <= 4 ) | mimic_iii | false | aa49e14342f37bce432dcaee |
what is the three most frequently ordered lab test until 4 years ago for patients in the age of 30s? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 30 and 39 ) and datetime(labevents.charttime) <= datetime(current_time,'-4 year') group by labevents.itemid ) as t1 where t1.c1 <= 3 ) | mimic_iii | false | 08726c2f6f61ea692978b6c8 |
what were the top three most common lab tests for the patients with age 30s since 2100? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 30 and 39 ) and strftime('%y',labevents.charttime) >= '2100' group by labevents.itemid ) as t1 where t1.c1 <= 3 ) | mimic_iii | false | 599b915b388b28e0409db71c |
among the patients of age 40s in 2101, what are the top four most frequent lab tests? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 40 and 49 ) and strftime('%y',labevents.charttime) = '2101' group by labevents.itemid ) as t1 where t1.c1 <= 4 ) | mimic_iii | false | e05ef5d99e1797b33bfe6dd1 |
what was the three most frequently taken lab test until 2 years ago for patients with an age 40s? | select d_labitems.label from d_labitems where d_labitems.itemid in ( select t1.itemid from ( select labevents.itemid, dense_rank() over ( order by count(*) desc ) as c1 from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.age between 40 and 49 ) and datetime(labevents.charttime) <= datetime(current_time,'-2 year') group by labevents.itemid ) as t1 where t1.c1 <= 3 ) | mimic_iii | false | 839b78205cad487e788b7110 |