Question: how many drugs is patient 26777 ordered until 109 months ago?

count the number of drugs patient 26777 were prescribed until 109 month ago.

Question: select count(*) from prescriptions where prescriptions.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 26777 ) and datetime(prescriptions.startdate) <= datetime(current_time,'-109 month')

count the number of drugs patient {patient_id} were prescribed [time_filter_global1].

count the number of drugs patient {patient_id} were prescribed [time_filter_global1:rel-month-until].

Answer: 0


Question: how many drugs have been given to patient 54386 until 09/2104?

count the number of drugs patient 54386 were prescribed until 09/2104.

Question: select count(*) from prescriptions where prescriptions.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 54386 ) and strftime('%Y-%m',prescriptions.startdate) <= '2104-09'

count the number of drugs patient {patient_id} were prescribed [time_filter_global1].

count the number of drugs patient {patient_id} were prescribed [time_filter_global1:abs-month-until].

Answer: 29


Question: calculate how many times patient 41132 has been prescribed diltiazem extended-release in 2101.

count the number of times that patient 41132 were prescribed diltiazem extended-release in 2101.

Question: select count(*) from prescriptions where prescriptions.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 41132 ) and prescriptions.drug = 'diltiazem extended-release' and strftime('%Y',prescriptions.startdate) = '2101'

count the number of times that patient {patient_id} were prescribed {drug_name} [time_filter_global1].

count the number of times that patient {patient_id} were prescribed {drug_name} [time_filter_global1:abs-year-in].

Answer: 1


Question: calculate the number of times that furosemide was prescribed to patient 27038 since 81 months ago.

count the number of times that patient 27038 were prescribed furosemide since 81 month ago.

Question: select count(*) from prescriptions where prescriptions.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 27038 ) and prescriptions.drug = 'furosemide' and datetime(prescriptions.startdate) >= datetime(current_time,'-81 month')

count the number of times that patient {patient_id} were prescribed {drug_name} [time_filter_global1].

count the number of times that patient {patient_id} were prescribed {drug_name} [time_filter_global1:rel-month-since].

Answer: 1


Question: how many times is nitroglycerin prescribed to patient 54825 since 3 years ago?

count the number of times that patient 54825 were prescribed nitroglycerin since 3 year ago.

Question: select count(*) from prescriptions where prescriptions.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 54825 ) and prescriptions.drug = 'nitroglycerin' and datetime(prescriptions.startdate) >= datetime(current_time,'-3 year')

count the number of times that patient {patient_id} were prescribed {drug_name} [time_filter_global1].

count the number of times that patient {patient_id} were prescribed {drug_name} [time_filter_global1:rel-year-since].

Answer: 2


Question: how many times has patient 52898 been prescribed for ns in this month?

count the number of times that patient 52898 were prescribed ns this month.

Question: select count(*) from prescriptions where prescriptions.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 52898 ) and prescriptions.drug = 'ns' and datetime(prescriptions.startdate,'start of month') = datetime(current_time,'start of month','-0 month')

count the number of times that patient {patient_id} were prescribed {drug_name} [time_filter_global1].

count the number of times that patient {patient_id} were prescribed {drug_name} [time_filter_global1:rel-month-this].

Answer: 0


Question: the number of times patient 28447 has received a hematocrit test during this year.

count the number of times that patient 28447 received a hematocrit lab test this year.

Question: select count(*) from labevents where labevents.itemid in ( select d_labitems.itemid from d_labitems where d_labitems.label = 'hematocrit' ) and labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 28447 ) and datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year')

count the number of times that patient {patient_id} received a {lab_name} lab test [time_filter_global1].

count the number of times that patient {patient_id} received a {lab_name} lab test [time_filter_global1:rel-year-this].

Answer: 0


Question: how many times until 69 months ago did patient 64538 get a creatine kinase (ck) test?

count the number of times that patient 64538 received a creatine kinase (ck) lab test until 69 month ago.

Question: select count(*) from labevents where labevents.itemid in ( select d_labitems.itemid from d_labitems where d_labitems.label = 'creatine kinase (ck)' ) and labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 64538 ) and datetime(labevents.charttime) <= datetime(current_time,'-69 month')

count the number of times that patient {patient_id} received a {lab_name} lab test [time_filter_global1].

count the number of times that patient {patient_id} received a {lab_name} lab test [time_filter_global1:rel-month-until].

Answer: 0


Question: how many times does patient 85895 receive a ph test the last month?

count the number of times that patient 85895 received a ph lab test last month.

Question: select count(*) from labevents where labevents.itemid in ( select d_labitems.itemid from d_labitems where d_labitems.label = 'ph' ) and labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 85895 ) and datetime(labevents.charttime,'start of month') = datetime(current_time,'start of month','-1 month')

count the number of times that patient {patient_id} received a {lab_name} lab test [time_filter_global1].

count the number of times that patient {patient_id} received a {lab_name} lab test [time_filter_global1:rel-month-last].

Answer: 0


Question: how many times does patient 10855 get a creatine kinase, mb isoenzyme test in 12/this year?

count the number of times that patient 10855 received a creatine kinase, mb isoenzyme lab test in 12/this year.

Question: select count(*) from labevents where labevents.itemid in ( select d_labitems.itemid from d_labitems where d_labitems.label = 'creatine kinase, mb isoenzyme' ) and labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 10855 ) and datetime(labevents.charttime,'start of year') = datetime(current_time,'start of year','-0 year') and strftime('%m',labevents.charttime) = '12'

count the number of times that patient {patient_id} received a {lab_name} lab test [time_filter_global1].

count the number of times that patient {patient_id} received a {lab_name} lab test [time_filter_global1:mix-month-this_year].

Answer: 0


Question: count the number of times patient 18677 received sodium bicarb on the first intensive care unit visit.

count the number of times that patient 18677 had a sodium bicarb intake on the first icu visit.

Question: select count(*) from inputevents_cv where inputevents_cv.icustay_id in ( select icustays.icustay_id from icustays where icustays.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 18677 ) and icustays.outtime is not null order by icustays.intime asc limit 1 ) and inputevents_cv.itemid in ( select d_items.itemid from d_items where d_items.label = 'sodium bicarb' and d_items.linksto = 'inputevents_cv' )

count the number of times that patient {patient_id} had a {intake_name} intake [time_filter_global1].

count the number of times that patient {patient_id} had a {intake_name} intake [time_filter_global1:rel-icu-first].

Answer: 1


Question: what is the number of times patient 14035 had a d10w intake?

count the number of times that patient 14035 had a d10w intake.

Question: select count(*) from inputevents_cv where inputevents_cv.icustay_id in ( select icustays.icustay_id from icustays where icustays.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 14035 ) ) and inputevents_cv.itemid in ( select d_items.itemid from d_items where d_items.label = 'd10w' and d_items.linksto = 'inputevents_cv' )

count the number of times that patient {patient_id} had a {intake_name} intake [time_filter_global1].

count the number of times that patient {patient_id} had a {intake_name} intake [time_filter_global1:null].

Answer: 3


Question: how many times has patient 17638 got a rescue flush intake in 06/2105?

count the number of times that patient 17638 had a rescue flush intake in 06/2105.

Question: select count(*) from inputevents_cv where inputevents_cv.icustay_id in ( select icustays.icustay_id from icustays where icustays.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 17638 ) ) and inputevents_cv.itemid in ( select d_items.itemid from d_items where d_items.label = 'rescue flush' and d_items.linksto = 'inputevents_cv' ) and strftime('%Y-%m',inputevents_cv.charttime) = '2105-06'

count the number of times that patient {patient_id} had a {intake_name} intake [time_filter_global1].

count the number of times that patient {patient_id} had a {intake_name} intake [time_filter_global1:abs-month-in].

Answer: 1


Question: how many times does patient 20165 receive a nutren pulmonary intake until 1729 days ago?

count the number of times that patient 20165 had a nutren pulmonary intake until 1729 day ago.

Question: select count(*) from inputevents_cv where inputevents_cv.icustay_id in ( select icustays.icustay_id from icustays where icustays.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 20165 ) ) and inputevents_cv.itemid in ( select d_items.itemid from d_items where d_items.label = 'nutren pulmonary' and d_items.linksto = 'inputevents_cv' ) and datetime(inputevents_cv.charttime) <= datetime(current_time,'-1729 day')

count the number of times that patient {patient_id} had a {intake_name} intake [time_filter_global1].

count the number of times that patient {patient_id} had a {intake_name} intake [time_filter_global1:rel-day-until].

Answer: 0


Question: how many times does patient 27463 get a e 24 fs po intake since 08/2103?

count the number of times that patient 27463 had a e 24 fs po intake since 08/2103.

Question: select count(*) from inputevents_cv where inputevents_cv.icustay_id in ( select icustays.icustay_id from icustays where icustays.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 27463 ) ) and inputevents_cv.itemid in ( select d_items.itemid from d_items where d_items.label = 'e 24 fs po' and d_items.linksto = 'inputevents_cv' ) and strftime('%Y-%m',inputevents_cv.charttime) >= '2103-08'

count the number of times that patient {patient_id} had a {intake_name} intake [time_filter_global1].

count the number of times that patient {patient_id} had a {intake_name} intake [time_filter_global1:abs-month-since].

Answer: 2


Question: count the number of times that patient 63849 had jackson pratt #1 in 12/2103.

count the number of times that patient 63849 had a jackson pratt #1 output in 12/2103.

Question: select count(*) from outputevents where outputevents.icustay_id in ( select icustays.icustay_id from icustays where icustays.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 63849 ) ) and outputevents.itemid in ( select d_items.itemid from d_items where d_items.label = 'jackson pratt #1' and d_items.linksto = 'outputevents' ) and strftime('%Y-%m',outputevents.charttime) = '2103-12'

count the number of times that patient {patient_id} had a {output_name} output [time_filter_global1].

count the number of times that patient {patient_id} had a {output_name} output [time_filter_global1:abs-month-in].

Answer: 1


Question: how many times patient 11688 has had a void output on 11/26/last year?

count the number of times that patient 11688 had a void output on 11/26/last year.

Question: select count(*) from outputevents where outputevents.icustay_id in ( select icustays.icustay_id from icustays where icustays.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 11688 ) ) and outputevents.itemid in ( select d_items.itemid from d_items where d_items.label = 'void' and d_items.linksto = 'outputevents' ) and datetime(outputevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') and strftime('%m-%d',outputevents.charttime) = '11-26'

count the number of times that patient {patient_id} had a {output_name} output [time_filter_global1].

count the number of times that patient {patient_id} had a {output_name} output [time_filter_global1:mix-day-last_year].

Answer: 0


Question: how many times has patient 11823 had a ostomy (output) output in 11/last year?

count the number of times that patient 11823 had a ostomy (output) output in 11/last year.

Question: select count(*) from outputevents where outputevents.icustay_id in ( select icustays.icustay_id from icustays where icustays.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 11823 ) ) and outputevents.itemid in ( select d_items.itemid from d_items where d_items.label = 'ostomy (output)' and d_items.linksto = 'outputevents' ) and datetime(outputevents.charttime,'start of year') = datetime(current_time,'start of year','-1 year') and strftime('%m',outputevents.charttime) = '11'

count the number of times that patient {patient_id} had a {output_name} output [time_filter_global1].

count the number of times that patient {patient_id} had a {output_name} output [time_filter_global1:mix-month-last_year].

Answer: 0


Question: how many times does patient 28447 have a urine out foley event on the current intensive care unit visit?

count the number of times that patient 28447 had a urine out foley output on the current icu visit.

Question: select count(*) from outputevents where outputevents.icustay_id in ( select icustays.icustay_id from icustays where icustays.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 28447 ) and icustays.outtime is null ) and outputevents.itemid in ( select d_items.itemid from d_items where d_items.label = 'urine out foley' and d_items.linksto = 'outputevents' )

count the number of times that patient {patient_id} had a {output_name} output [time_filter_global1].

count the number of times that patient {patient_id} had a {output_name} output [time_filter_global1:rel-icu-cur].

Answer: 37


Question: how many patients have been admitted?

Question: select count( distinct admissions.subject_id ) from admissions where admissions.dischtime is null

Answer: 100


Question: how many people were there who are current patients?

Question: select count( distinct admissions.subject_id ) from admissions where admissions.dischtime is null

Answer: 100


Question: count the number of patients in the hospital.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.dischtime is null

Answer: 100


Question: how many hospitalized patients are there currently?

Question: select count( distinct admissions.subject_id ) from admissions where admissions.dischtime is null

Answer: 100


Question: how many current patients are of age 40s?

count the number of current patients aged 40s.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.dischtime is null and admissions.age between 40 and 49

count the number of current patients aged [age_group].

count the number of current patients aged [age_group:40s].

Answer: 13


Question: count the number of current patients whose age is 50s.

count the number of current patients aged 50s.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.dischtime is null and admissions.age between 50 and 59

count the number of current patients aged [age_group].

count the number of current patients aged [age_group:50s].

Answer: 23


Question: how many patients aged 30s are there?

count the number of current patients aged 30s.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.dischtime is null and admissions.age between 30 and 39

count the number of current patients aged [age_group].

count the number of current patients aged [age_group:30s].

Answer: 3


Question: count the number of current patients whose ages are 50s.

count the number of current patients aged 50s.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.dischtime is null and admissions.age between 50 and 59

count the number of current patients aged [age_group].

count the number of current patients aged [age_group:50s].

Answer: 23


Question: what is the total cost of the maximum hospital involving a laboratory test for granular casts in 2105?

what is the maximum total hospital cost that involves a granular casts lab test in 2105?

Question: select max(t1.c1) from ( select sum(cost.cost) as c1 from cost where cost.hadm_id in ( select labevents.hadm_id from labevents where labevents.itemid in ( select d_labitems.itemid from d_labitems where d_labitems.label = 'granular casts' ) ) and strftime('%Y',cost.chargetime) = '2105' group by cost.hadm_id ) as t1

what is_verb the [agg_function] total hospital cost that involves a {lab_name} lab test [time_filter_global1]?

what is_verb the [agg_function:maximum] total hospital cost that involves a {lab_name} lab test [time_filter_global1:abs-year-in]?

Answer: 7262.089999999987


Question: tell me the maximum hospital cost that involves factor ix how much does it cost until 2103?

what was the maximum total hospital cost that involves a factor ix lab test until 2103?

Question: select max(t1.c1) from ( select sum(cost.cost) as c1 from cost where cost.hadm_id in ( select labevents.hadm_id from labevents where labevents.itemid in ( select d_labitems.itemid from d_labitems where d_labitems.label = 'factor ix' ) ) and strftime('%Y',cost.chargetime) <= '2103' group by cost.hadm_id ) as t1

what is_verb the [agg_function] total hospital cost that involves a {lab_name} lab test [time_filter_global1]?

what is_verb the [agg_function:maximum] total hospital cost that involves a {lab_name} lab test [time_filter_global1:abs-year-until]?

Answer: 9458.319999999978


Question: tell me the maximum total hospital cost that involves ld, body fluid since 5 years ago?

what is the maximum total hospital cost that involves a ld, body fluid lab test since 5 year ago?

Question: select max(t1.c1) from ( select sum(cost.cost) as c1 from cost where cost.hadm_id in ( select labevents.hadm_id from labevents where labevents.itemid in ( select d_labitems.itemid from d_labitems where d_labitems.label = 'ld, body fluid' ) ) and datetime(cost.chargetime) >= datetime(current_time,'-5 year') group by cost.hadm_id ) as t1

what is_verb the [agg_function] total hospital cost that involves a {lab_name} lab test [time_filter_global1]?

what is_verb the [agg_function:maximum] total hospital cost that involves a {lab_name} lab test [time_filter_global1:rel-year-since]?

Answer: 7667.239999999995


Question: what's the maximum total cost of a hospital that involves unarmed fight or brawl until 2104?

what was the maximum total hospital cost that involves a diagnosis named unarmed fight or brawl until 2104?

Question: select max(t1.c1) from ( select sum(cost.cost) as c1 from cost where cost.hadm_id in ( select diagnoses_icd.hadm_id from diagnoses_icd where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'unarmed fight or brawl' ) ) and strftime('%Y',cost.chargetime) <= '2104' group by cost.hadm_id ) as t1

what is_verb the [agg_function] total hospital cost that involves a diagnosis named {diagnosis_name} [time_filter_global1]?

what is_verb the [agg_function:maximum] total hospital cost that involves a diagnosis named {diagnosis_name} [time_filter_global1:abs-year-until]?

Answer: 1629.8600000000004


Question: what is the maximum cost of the hospital which involves aortic valve disorder in 2105?

what is the maximum total hospital cost that involves a diagnosis named aortic valve disorder in 2105?

Question: select max(t1.c1) from ( select sum(cost.cost) as c1 from cost where cost.hadm_id in ( select diagnoses_icd.hadm_id from diagnoses_icd where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'aortic valve disorder' ) ) and strftime('%Y',cost.chargetime) = '2105' group by cost.hadm_id ) as t1

what is_verb the [agg_function] total hospital cost that involves a diagnosis named {diagnosis_name} [time_filter_global1]?

what is_verb the [agg_function:maximum] total hospital cost that involves a diagnosis named {diagnosis_name} [time_filter_global1:abs-year-in]?

Answer: 7667.239999999995


Question: what is the minimum total hospital cost which involves c1-c4 fx-cl/cord inj nos since 2105?

what is the minimum total hospital cost that involves a diagnosis named c1-c4 fx-cl/cord inj nos since 2105?

Question: select min(t1.c1) from ( select sum(cost.cost) as c1 from cost where cost.hadm_id in ( select diagnoses_icd.hadm_id from diagnoses_icd where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'c1-c4 fx-cl/cord inj nos' ) ) and strftime('%Y',cost.chargetime) >= '2105' group by cost.hadm_id ) as t1

what is_verb the [agg_function] total hospital cost that involves a diagnosis named {diagnosis_name} [time_filter_global1]?

what is_verb the [agg_function:minimum] total hospital cost that involves a diagnosis named {diagnosis_name} [time_filter_global1:abs-year-since]?

Answer: 3407.0699999999993


Question: list the patient identifications of patients who have been diagnosed with cannabis abuse-unspec since 2 years ago.

list the ids of patients diagnosed with cannabis abuse-unspec since 2 year ago.

Question: select admissions.subject_id from admissions where admissions.hadm_id in ( select diagnoses_icd.hadm_id from diagnoses_icd where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'cannabis abuse-unspec' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-2 year') )

list the ids of patients diagnosed with {diagnosis_name} [time_filter_global1].

list the ids of patients diagnosed with {diagnosis_name} [time_filter_global1:rel-year-since].

Answer: 64983

Answer: 18677

Answer: 92063


Question: tell me the patient ids who are diagnosed with hx of liver malignancy since 2104.

list the ids of patients diagnosed with hx of liver malignancy since 2104.

Question: select admissions.subject_id from admissions where admissions.hadm_id in ( select diagnoses_icd.hadm_id from diagnoses_icd where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'hx of liver malignancy' ) and strftime('%Y',diagnoses_icd.charttime) >= '2104' )

list the ids of patients diagnosed with {diagnosis_name} [time_filter_global1].

list the ids of patients diagnosed with {diagnosis_name} [time_filter_global1:abs-year-since].

Answer: 73713

Answer: 48706


Question: show me the patient ids who are diagnosed with b-complex defic nec in 2101.

list the ids of patients diagnosed with b-complex defic nec in 2101.

Question: select admissions.subject_id from admissions where admissions.hadm_id in ( select diagnoses_icd.hadm_id from diagnoses_icd where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'b-complex defic nec' ) and strftime('%Y',diagnoses_icd.charttime) = '2101' )

list the ids of patients diagnosed with {diagnosis_name} [time_filter_global1].

list the ids of patients diagnosed with {diagnosis_name} [time_filter_global1:abs-year-in].

Answer: 51577


Question: retrieve the patient ids who are diagnosed with nonrupt cerebral aneurym since 2105.

list the ids of patients diagnosed with nonrupt cerebral aneurym since 2105.

Question: select admissions.subject_id from admissions where admissions.hadm_id in ( select diagnoses_icd.hadm_id from diagnoses_icd 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) >= '2105' )

list the ids of patients diagnosed with {diagnosis_name} [time_filter_global1].

list the ids of patients diagnosed with {diagnosis_name} [time_filter_global1:abs-year-since].

Answer: 70169

Answer: 79348

Answer: 12917

Answer: 70234

Answer: 70267


Question: what is the minimum monthly number of patients who had abn react-procedure nec in 2104?

what is the minimum monthly number of patient records diagnosed with abn react-procedure nec in 2104?

Question: select min(t1.c1) from ( select count( distinct diagnoses_icd.hadm_id ) as c1 from diagnoses_icd where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'abn react-procedure nec' ) and strftime('%Y',diagnoses_icd.charttime) = '2104' group by strftime('%Y-%m',diagnoses_icd.charttime) ) as t1

what is the [agg_function] [unit_average] number of patient records diagnosed with {diagnosis_name} [time_filter_global1]?

what is the [agg_function:minimum] [unit_average:monthly] number of patient records diagnosed with {diagnosis_name} [time_filter_global1:abs-year-in]?

Answer: 1


Question: what are the minimum yearly number of patients diagnosed with reflux esophagitis?

what is the minimum yearly number of patient records diagnosed with reflux esophagitis?

Question: select min(t1.c1) from ( select count( distinct diagnoses_icd.hadm_id ) as c1 from diagnoses_icd where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'reflux esophagitis' ) group by strftime('%Y',diagnoses_icd.charttime) ) as t1

what is the [agg_function] [unit_average] number of patient records diagnosed with {diagnosis_name} [time_filter_global1]?

what is the [agg_function:minimum] [unit_average:yearly] number of patient records diagnosed with {diagnosis_name} [time_filter_global1:null]?

Answer: 1


Question: what is the average daily number of patients had helicobacter pylori since 4 years ago?

what is the average daily number of patient records diagnosed with helicobacter pylori since 4 year ago?

Question: select avg(t1.c1) from ( select count( distinct diagnoses_icd.hadm_id ) as c1 from diagnoses_icd where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'helicobacter pylori' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-4 year') group by strftime('%Y-%m-%d',diagnoses_icd.charttime) ) as t1

what is the [agg_function] [unit_average] number of patient records diagnosed with {diagnosis_name} [time_filter_global1]?

what is the [agg_function:average] [unit_average:daily] number of patient records diagnosed with {diagnosis_name} [time_filter_global1:rel-year-since]?

Answer: 1.0


Question: how many patients are dead after having been diagnosed with fx femoral condyle-open within the same hospital visit since 2 years ago?

count the number of patients who were dead after having been diagnosed with fx femoral condyle-open within the same hospital visit since 2 year ago.

Question: select count( distinct t2.subject_id ) from ( select t1.subject_id, t1.charttime, t1.hadm_id from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'fx femoral condyle-open' ) ) as t1 group by t1.subject_id having min(t1.charttime) = t1.charttime and datetime(t1.charttime) >= datetime(current_time,'-2 year') ) as t2 join ( select patients.subject_id, admissions.hadm_id, patients.dod from admissions join patients on patients.subject_id = admissions.subject_id where patients.dod is not null and datetime(patients.dod) >= datetime(current_time,'-2 year') ) as t3 on t2.subject_id = t3.subject_id where t2.hadm_id = t3.hadm_id

count the number of patients who were dead after having been diagnosed with {diagnosis_name} [time_filter_within] [time_filter_global1].

count the number of patients who were dead after having been diagnosed with {diagnosis_name} [time_filter_within:within-hosp] [time_filter_global1:rel-year-since].

Answer: 1


Question: how many patients died after being diagnosed this year with chr osteomyelit-l/leg within 2 months?

count the number of patients who were dead after having been diagnosed with chr osteomyelit-l/leg within 2 month this year.

Question: select count( distinct t2.subject_id ) from ( select t1.subject_id, t1.charttime 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 osteomyelit-l/leg' ) ) as t1 group by t1.subject_id having min(t1.charttime) = t1.charttime and datetime(t1.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t2 join ( select patients.subject_id, admissions.hadm_id, patients.dod from admissions join patients on patients.subject_id = admissions.subject_id where patients.dod is not null and datetime(patients.dod,'start of year') = datetime(current_time,'start of year','-0 year') ) as t3 on t2.subject_id = t3.subject_id where ( datetime(t3.dod) between datetime(t2.charttime) and datetime(t2.charttime,'+2 month') ) or ( datetime(t2.charttime) between datetime(t3.dod) and datetime(t3.dod,'+2 month') )

count the number of patients who were dead after having been diagnosed with {diagnosis_name} [time_filter_within] [time_filter_global1].

count the number of patients who were dead after having been diagnosed with {diagnosis_name} [time_filter_within:within-n_month] [time_filter_global1:rel-year-this].

Answer: 0


Question: how many patients died within 2 months after being diagnosed with chronic nephritis nos until 1 year ago?

count the number of patients who were dead after having been diagnosed with chronic nephritis nos within 2 month until 1 year ago.

Question: select count( distinct t2.subject_id ) from ( select t1.subject_id, t1.charttime 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 = 'chronic nephritis nos' ) ) as t1 group by t1.subject_id having min(t1.charttime) = t1.charttime and datetime(t1.charttime) <= datetime(current_time,'-1 year') ) as t2 join ( select patients.subject_id, admissions.hadm_id, patients.dod from admissions join patients on patients.subject_id = admissions.subject_id where patients.dod is not null and datetime(patients.dod) <= datetime(current_time,'-1 year') ) as t3 on t2.subject_id = t3.subject_id where ( datetime(t3.dod) between datetime(t2.charttime) and datetime(t2.charttime,'+2 month') ) or ( datetime(t2.charttime) between datetime(t3.dod) and datetime(t3.dod,'+2 month') )

count the number of patients who were dead after having been diagnosed with {diagnosis_name} [time_filter_within] [time_filter_global1].

count the number of patients who were dead after having been diagnosed with {diagnosis_name} [time_filter_within:within-n_month] [time_filter_global1:rel-year-until].

Answer: 0


Question: how many patients died after being diagnosed with dmii wo cmp nt st uncntr during the same hospital encounter since 6 years ago?

count the number of patients who were dead after having been diagnosed with dmii wo cmp nt st uncntr within the same hospital visit since 6 year ago.

Question: select count( distinct t2.subject_id ) from ( select t1.subject_id, t1.charttime, t1.hadm_id from ( select admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'dmii wo cmp nt st uncntr' ) ) as t1 group by t1.subject_id having min(t1.charttime) = t1.charttime and datetime(t1.charttime) >= datetime(current_time,'-6 year') ) as t2 join ( select patients.subject_id, admissions.hadm_id, patients.dod from admissions join patients on patients.subject_id = admissions.subject_id where patients.dod is not null and datetime(patients.dod) >= datetime(current_time,'-6 year') ) as t3 on t2.subject_id = t3.subject_id where t2.hadm_id = t3.hadm_id

count the number of patients who were dead after having been diagnosed with {diagnosis_name} [time_filter_within] [time_filter_global1].

count the number of patients who were dead after having been diagnosed with {diagnosis_name} [time_filter_within:within-hosp] [time_filter_global1:rel-year-since].

Answer: 51


Question: calculate the number of patients who were diagnosed with ventricular fibrillation and did not return to the hospital within the same month in 2103.

count the number of patients who did not come back to the hospital within the same month after diagnosed with ventricular fibrillation in 2103.

Question: select ( select count( distinct t1.subject_id ) from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'ventricular fibrillation' ) and strftime('%Y',diagnoses_icd.charttime) = '2103' ) as t1 ) - ( select count( distinct t2.subject_id ) from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'ventricular fibrillation' ) and strftime('%Y',diagnoses_icd.charttime) = '2103' ) as t2 join admissions on t2.subject_id = admissions.subject_id where t2.charttime < admissions.admittime and strftime('%Y',admissions.admittime) = '2103' and datetime(t2.charttime,'start of month') = datetime(admissions.admittime,'start of month') )

count the number of patients who did not come back to the hospital [time_filter_within] after diagnosed with {diagnosis_name} [time_filter_global1].

count the number of patients who did not come back to the hospital [time_filter_within:within-month] after diagnosed with {diagnosis_name} [time_filter_global1:abs-year-in].

Answer: 3


Question: count the number of patients that have been diagnosed with stenosis of larynx and didn't come back to the hospital within 2 months since 2 years ago.

count the number of patients who did not come back to the hospital within 2 month after diagnosed with stenosis of larynx since 2 year ago.

Question: select ( select count( distinct t1.subject_id ) 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 = 'stenosis of larynx' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-2 year') ) as t1 ) - ( select count( distinct t2.subject_id ) 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 = 'stenosis of larynx' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-2 year') ) as t2 join admissions on t2.subject_id = admissions.subject_id where t2.charttime < admissions.admittime and datetime(admissions.admittime) >= datetime(current_time,'-2 year') and datetime(admissions.admittime) between datetime(t2.charttime) and datetime(t2.charttime,'+2 month') )

count the number of patients who did not come back to the hospital [time_filter_within] after diagnosed with {diagnosis_name} [time_filter_global1].

count the number of patients who did not come back to the hospital [time_filter_within:within-n_month] after diagnosed with {diagnosis_name} [time_filter_global1:rel-year-since].

Answer: 1


Question: how many patients were diagnosed with cardiomyopath in oth dis and not readmitted within 2 months since 2 years ago?

count the number of patients who did not come back to the hospital within 2 month after diagnosed with cardiomyopath in oth dis since 2 year ago.

Question: select ( select count( distinct t1.subject_id ) 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 = 'cardiomyopath in oth dis' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-2 year') ) as t1 ) - ( select count( distinct t2.subject_id ) 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 = 'cardiomyopath in oth dis' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-2 year') ) as t2 join admissions on t2.subject_id = admissions.subject_id where t2.charttime < admissions.admittime and datetime(admissions.admittime) >= datetime(current_time,'-2 year') and datetime(admissions.admittime) between datetime(t2.charttime) and datetime(t2.charttime,'+2 month') )

count the number of patients who did not come back to the hospital [time_filter_within] after diagnosed with {diagnosis_name} [time_filter_global1].

count the number of patients who did not come back to the hospital [time_filter_within:within-n_month] after diagnosed with {diagnosis_name} [time_filter_global1:rel-year-since].

Answer: 1


Question: count the number of patients who were diagnosed with oth nonauto hem anemia and did not come back to the hospital within 2 months in 2103.

count the number of patients who did not come back to the hospital within 2 month after diagnosed with oth nonauto hem anemia in 2103.

Question: select ( select count( distinct t1.subject_id ) 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 = 'oth nonauto hem anemia' ) and strftime('%Y',diagnoses_icd.charttime) = '2103' ) as t1 ) - ( select count( distinct t2.subject_id ) 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 = 'oth nonauto hem anemia' ) and strftime('%Y',diagnoses_icd.charttime) = '2103' ) as t2 join admissions on t2.subject_id = admissions.subject_id where t2.charttime < admissions.admittime and strftime('%Y',admissions.admittime) = '2103' and datetime(admissions.admittime) between datetime(t2.charttime) and datetime(t2.charttime,'+2 month') )

count the number of patients who did not come back to the hospital [time_filter_within] after diagnosed with {diagnosis_name} [time_filter_global1].

count the number of patients who did not come back to the hospital [time_filter_within:within-n_month] after diagnosed with {diagnosis_name} [time_filter_global1:abs-year-in].

Answer: 1


Question: during this year, how many patients have not come back to the hospital within 2 months after diagnosed with esoph varice oth dis nos.

count the number of patients who did not come back to the hospital within 2 month after diagnosed with esoph varice oth dis nos this year.

Question: select ( select count( distinct t1.subject_id ) from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'esoph varice oth dis nos' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t1 ) - ( select count( distinct t2.subject_id ) from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'esoph varice oth dis nos' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') ) as t2 join admissions on t2.subject_id = admissions.subject_id where t2.charttime < admissions.admittime and datetime(admissions.admittime,'start of year') = datetime(current_time,'start of year','-0 year') and datetime(admissions.admittime) between datetime(t2.charttime) and datetime(t2.charttime,'+2 month') )

count the number of patients who did not come back to the hospital [time_filter_within] after diagnosed with {diagnosis_name} [time_filter_global1].

count the number of patients who did not come back to the hospital [time_filter_within:within-n_month] after diagnosed with {diagnosis_name} [time_filter_global1:rel-year-this].

Answer: 0


Question: what is the number of patients that were admitted to the hospital in this year?

count the number of patients who were admitted to the hospital this year.

Question: select count( distinct admissions.subject_id ) from admissions where datetime(admissions.admittime,'start of year') = datetime(current_time,'start of year','-0 year')

count the number of patients who were admitted to the hospital [time_filter_global1].

count the number of patients who were admitted to the hospital [time_filter_global1:rel-year-this].

Answer: 0


Question: how many patients have been admitted to hospital until 2103?

count the number of patients who were admitted to the hospital until 2103.

Question: select count( distinct admissions.subject_id ) from admissions where strftime('%Y',admissions.admittime) <= '2103'

count the number of patients who were admitted to the hospital [time_filter_global1].

count the number of patients who were admitted to the hospital [time_filter_global1:abs-year-until].

Answer: 437


Question: tell me the number of patients hospitalized in 2102?

count the number of patients who were admitted to the hospital in 2102.

Question: select count( distinct admissions.subject_id ) from admissions where strftime('%Y',admissions.admittime) = '2102'

count the number of patients who were admitted to the hospital [time_filter_global1].

count the number of patients who were admitted to the hospital [time_filter_global1:abs-year-in].

Answer: 126


Question: how many patients were admitted to the hospital until 3 years ago?

count the number of patients who were admitted to the hospital until 3 year ago.

Question: select count( distinct admissions.subject_id ) from admissions where datetime(admissions.admittime) <= datetime(current_time,'-3 year')

count the number of patients who were admitted to the hospital [time_filter_global1].

count the number of patients who were admitted to the hospital [time_filter_global1:rel-year-until].

Answer: 0


Question: find out how many patients were discharged from the hospital in 2100.

count the number of patients who were discharged from the hospital in 2100.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.dischtime is not null and strftime('%Y',admissions.dischtime) = '2100'

count the number of patients who were discharged from the hospital [time_filter_global1].

count the number of patients who were discharged from the hospital [time_filter_global1:abs-year-in].

Answer: 47


Question: calculate the number of patients who had been discharged from hospital since 2105.

count the number of patients who were discharged from the hospital since 2105.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.dischtime is not null and strftime('%Y',admissions.dischtime) >= '2105'

count the number of patients who were discharged from the hospital [time_filter_global1].

count the number of patients who were discharged from the hospital [time_filter_global1:abs-year-since].

Answer: 298


Question: tell me the total number of patients who were discharged from the hospital?

count the number of patients who were discharged from the hospital.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.dischtime is not null

count the number of patients who were discharged from the hospital [time_filter_global1].

count the number of patients who were discharged from the hospital [time_filter_global1:null].

Answer: 917


Question: tell me the number of patients discharged since 1 year ago?

count the number of patients who were discharged from the hospital since 1 year ago.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.dischtime is not null and datetime(admissions.dischtime) >= datetime(current_time,'-1 year')

count the number of patients who were discharged from the hospital [time_filter_global1].

count the number of patients who were discharged from the hospital [time_filter_global1:rel-year-since].

Answer: 917


Question: how many patients this year were staying in the ward 29?

count the number of patients who stayed in ward 29 this year.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select transfers.hadm_id from transfers where transfers.wardid = 29 and datetime(transfers.intime,'start of year') = datetime(current_time,'start of year','-0 year') )

count the number of patients who stayed in ward {ward_id} [time_filter_global1].

count the number of patients who stayed in ward {ward_id} [time_filter_global1:rel-year-this].

Answer: 0


Question: how many patients are in hospital ward 12 in 2102?

count the number of patients who stayed in ward 12 in 2102.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select transfers.hadm_id from transfers where transfers.wardid = 12 and strftime('%Y',transfers.intime) = '2102' )

count the number of patients who stayed in ward {ward_id} [time_filter_global1].

count the number of patients who stayed in ward {ward_id} [time_filter_global1:abs-year-in].

Answer: 8


Question: tell me the number of patients who stayed in ward 52 until 2102?

count the number of patients who stayed in ward 52 until 2102.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select transfers.hadm_id from transfers where transfers.wardid = 52 and strftime('%Y',transfers.intime) <= '2102' )

count the number of patients who stayed in ward {ward_id} [time_filter_global1].

count the number of patients who stayed in ward {ward_id} [time_filter_global1:abs-year-until].

Answer: 44


Question: tell me the total number of patients who stayed in ward 15 since 3 years ago?

count the number of patients who stayed in ward 15 since 3 year ago.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select transfers.hadm_id from transfers where transfers.wardid = 15 and datetime(transfers.intime) >= datetime(current_time,'-3 year') )

count the number of patients who stayed in ward {ward_id} [time_filter_global1].

count the number of patients who stayed in ward {ward_id} [time_filter_global1:rel-year-since].

Answer: 127


Question: what is the number of patients who are in careunit csru until 2101?

count the number of patients who stayed in careunit csru until 2101.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select transfers.hadm_id from transfers where transfers.careunit = 'csru' and strftime('%Y',transfers.intime) <= '2101' )

count the number of patients who stayed in careunit {careunit} [time_filter_global1].

count the number of patients who stayed in careunit {careunit} [time_filter_global1:abs-year-until].

Answer: 39


Question: what is the number of patients who have stayed in careunit ccu during the previous year?

count the number of patients who stayed in careunit ccu last year.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select transfers.hadm_id from transfers where transfers.careunit = 'ccu' and datetime(transfers.intime,'start of year') = datetime(current_time,'start of year','-1 year') )

count the number of patients who stayed in careunit {careunit} [time_filter_global1].

count the number of patients who stayed in careunit {careunit} [time_filter_global1:rel-year-last].

Answer: 0


Question: how many patients were in careunit ccu since 5 years ago?

count the number of patients who stayed in careunit ccu since 5 year ago.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select transfers.hadm_id from transfers where transfers.careunit = 'ccu' and datetime(transfers.intime) >= datetime(current_time,'-5 year') )

count the number of patients who stayed in careunit {careunit} [time_filter_global1].

count the number of patients who stayed in careunit {careunit} [time_filter_global1:rel-year-since].

Answer: 166


Question: tell me the total number of patients who stayed in careunit sicu?

count the number of patients who stayed in careunit sicu.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select transfers.hadm_id from transfers where transfers.careunit = 'sicu' )

count the number of patients who stayed in careunit {careunit} [time_filter_global1].

count the number of patients who stayed in careunit {careunit} [time_filter_global1:null].

Answer: 203


Question: since 4 years ago how many patients were diagnosed as having streptococcal septicemia within 2 months after being diagnosed with acute respiratry failure?

count the number of patients who were diagnosed with acute respiratry failure within 2 month after having been diagnosed with streptococcal septicemia since 4 year ago.

Question: select count( distinct t1.subject_id ) 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 = 'streptococcal septicemia' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-4 year') ) as t1 join ( 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 datetime(diagnoses_icd.charttime) >= datetime(current_time,'-4 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month')

count the number of patients who were diagnosed with {diagnosis_name2} [time_filter_within] after having been diagnosed with {diagnosis_name1} [time_filter_global1].

count the number of patients who were diagnosed with {diagnosis_name2} [time_filter_within:within-n_month] after having been diagnosed with {diagnosis_name1} [time_filter_global1:rel-year-since].

Answer: 1


Question: how many patients in 2105 were diagnosed with hyperpotassemia within the same hospital visit after the first diagnosis with cardiac tamponade?

count the number of patients who were diagnosed with cardiac tamponade within the same hospital visit after having been diagnosed with hyperpotassemia in 2105.

Question: select count( distinct t1.subject_id ) 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 = 'hyperpotassemia' ) and strftime('%Y',diagnoses_icd.charttime) = '2105' ) as t1 join ( 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 = 'cardiac tamponade' ) and strftime('%Y',diagnoses_icd.charttime) = '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id

count the number of patients who were diagnosed with {diagnosis_name2} [time_filter_within] after having been diagnosed with {diagnosis_name1} [time_filter_global1].

count the number of patients who were diagnosed with {diagnosis_name2} [time_filter_within:within-hosp] after having been diagnosed with {diagnosis_name1} [time_filter_global1:abs-year-in].

Answer: 0


Question: how many patients were diagnosed with long-term use of insulin within the same month after previously being diagnosed with atriovent block complete, the previous year?

count the number of patients who were diagnosed with atriovent block complete within the same month after having been diagnosed with long-term use of insulin last year.

Question: select count( distinct t1.subject_id ) 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 = 'long-term use of insulin' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( 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 = 'atriovent block complete' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month')

count the number of patients who were diagnosed with {diagnosis_name2} [time_filter_within] after having been diagnosed with {diagnosis_name1} [time_filter_global1].

count the number of patients who were diagnosed with {diagnosis_name2} [time_filter_within:within-month] after having been diagnosed with {diagnosis_name1} [time_filter_global1:rel-year-last].

Answer: 0


Question: since 4 years ago, how many patients were diagnosed with food/vomit pneumonitis during the same month after the previous diagnosis of adv eff antilipemics?

count the number of patients who were diagnosed with food/vomit pneumonitis within the same month after having been diagnosed with adv eff antilipemics since 4 year ago.

Question: select count( distinct t1.subject_id ) 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 antilipemics' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-4 year') ) as t1 join ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'food/vomit pneumonitis' ) and datetime(diagnoses_icd.charttime) >= datetime(current_time,'-4 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month')

count the number of patients who were diagnosed with {diagnosis_name2} [time_filter_within] after having been diagnosed with {diagnosis_name1} [time_filter_global1].

count the number of patients who were diagnosed with {diagnosis_name2} [time_filter_within:within-month] after having been diagnosed with {diagnosis_name1} [time_filter_global1:rel-year-since].

Answer: 0


Question: in 2105, how many patients were diagnosed with athscl extrm ntv art nos during the same hospital visit after the diagnosis with hypothyroidism nos?

count the number of patients who were diagnosed with athscl extrm ntv art nos within the same hospital visit after having been diagnosed with hypothyroidism nos in 2105.

Question: select count( distinct t1.subject_id ) 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 = 'hypothyroidism nos' ) and strftime('%Y',diagnoses_icd.charttime) = '2105' ) as t1 join ( 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 = 'athscl extrm ntv art nos' ) and strftime('%Y',diagnoses_icd.charttime) = '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id

count the number of patients who were diagnosed with {diagnosis_name2} [time_filter_within] after having been diagnosed with {diagnosis_name1} [time_filter_global1].

count the number of patients who were diagnosed with {diagnosis_name2} [time_filter_within:within-hosp] after having been diagnosed with {diagnosis_name1} [time_filter_global1:abs-year-in].

Answer: 0


Question: the number of patients who have been diagnosed with late effect acute polio.

count the number of patients who were diagnosed with late effect acute polio.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select diagnoses_icd.hadm_id from diagnoses_icd 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' ) )

count the number of patients who were diagnosed with {diagnosis_name} [time_filter_global1].

count the number of patients who were diagnosed with {diagnosis_name} [time_filter_global1:null].

['other', 'physician', 'insurance_review', 'nursing']

Answer: 1


Question: since 2103 how many patients were diagnosed with long-term use steroids.

count the number of patients who were diagnosed with long-term use steroids since 2103.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select diagnoses_icd.hadm_id from diagnoses_icd where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'long-term use steroids' ) and strftime('%Y',diagnoses_icd.charttime) >= '2103' )

count the number of patients who were diagnosed with {diagnosis_name} [time_filter_global1].

count the number of patients who were diagnosed with {diagnosis_name} [time_filter_global1:abs-year-since].

['other', 'physician', 'insurance_review', 'nursing']

Answer: 7


Question: tell me the total number of patients who are diagnosed with malign neopl ovary until 2102?

count the number of patients who were diagnosed with malign neopl ovary until 2102.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select diagnoses_icd.hadm_id from diagnoses_icd where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'malign neopl ovary' ) and strftime('%Y',diagnoses_icd.charttime) <= '2102' )

count the number of patients who were diagnosed with {diagnosis_name} [time_filter_global1].

count the number of patients who were diagnosed with {diagnosis_name} [time_filter_global1:abs-year-until].

['other', 'physician', 'insurance_review', 'nursing']

Answer: 2


Question: how many patients were diagnosed with celiac disease since 2105?

count the number of patients who were diagnosed with celiac disease since 2105.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select diagnoses_icd.hadm_id from diagnoses_icd where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'celiac disease' ) and strftime('%Y',diagnoses_icd.charttime) >= '2105' )

count the number of patients who were diagnosed with {diagnosis_name} [time_filter_global1].

count the number of patients who were diagnosed with {diagnosis_name} [time_filter_global1:abs-year-since].

['other', 'physician', 'insurance_review', 'nursing']

Answer: 1


Question: count the number of people who have had a coronar arteriogr-2 cath procedure this year.

count the number of patients who received a coronar arteriogr-2 cath procedure this year.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select procedures_icd.hadm_id from procedures_icd where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'coronar arteriogr-2 cath' ) and datetime(procedures_icd.charttime,'start of year') = datetime(current_time,'start of year','-0 year') )

count the number of patients who received a {procedure_name} procedure [time_filter_global1].

count the number of patients who received a {procedure_name} procedure [time_filter_global1:rel-year-this].

Answer: 0


Question: the number of patients who have received a partial hepatectomy.

count the number of patients who received a partial hepatectomy procedure.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select procedures_icd.hadm_id from procedures_icd where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'partial hepatectomy' ) )

count the number of patients who received a {procedure_name} procedure [time_filter_global1].

count the number of patients who received a {procedure_name} procedure [time_filter_global1:null].

Answer: 1


Question: how many patients were given temporary tracheostomy?

count the number of patients who received a temporary tracheostomy procedure.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select procedures_icd.hadm_id from procedures_icd where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'temporary tracheostomy' ) )

count the number of patients who received a {procedure_name} procedure [time_filter_global1].

count the number of patients who received a {procedure_name} procedure [time_filter_global1:null].

Answer: 32


Question: how many patients received part gastrec w jej anast since 2 years ago?

count the number of patients who received a part gastrec w jej anast procedure since 2 year ago.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select procedures_icd.hadm_id from procedures_icd where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'part gastrec w jej anast' ) and datetime(procedures_icd.charttime) >= datetime(current_time,'-2 year') )

count the number of patients who received a {procedure_name} procedure [time_filter_global1].

count the number of patients who received a {procedure_name} procedure [time_filter_global1:rel-year-since].

Answer: 2


Question: how many patients have undergone op tot intr-abd colectmy since 2 years ago?

count the number of patients who received a op tot intr-abd colectmy procedure since 2 year ago.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select procedures_icd.hadm_id from procedures_icd where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'op tot intr-abd colectmy' ) and datetime(procedures_icd.charttime) >= datetime(current_time,'-2 year') )

count the number of patients who received a {procedure_name} procedure [time_filter_global1].

count the number of patients who received a {procedure_name} procedure [time_filter_global1:rel-year-since].

Answer: 2


Question: how many patients had received a aortocor bypas-3 cor art procedure two times until 2 years ago?

count the number of patients who received a aortocor bypas-3 cor art procedure two times until 2 year ago.

Question: select count( distinct t1.subject_id ) from ( select admissions.subject_id, count(*) as c1 from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'aortocor bypas-3 cor art' ) and datetime(procedures_icd.charttime) <= datetime(current_time,'-2 year') group by admissions.subject_id ) as t1 where t1.c1 = 2

count the number of patients who received a {procedure_name} procedure [n_times] [time_filter_global1].

count the number of patients who received a {procedure_name} procedure [n_times:two times] [time_filter_global1:rel-year-until].

Answer: 0


Question: do count the number of patients who had had a skull plate insertion procedure completed two times in 2103.

count the number of patients who received a skull plate insertion procedure two times in 2103.

Question: select count( distinct t1.subject_id ) from ( select admissions.subject_id, count(*) as c1 from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'skull plate insertion' ) and strftime('%Y',procedures_icd.charttime) = '2103' group by admissions.subject_id ) as t1 where t1.c1 = 2

count the number of patients who received a {procedure_name} procedure [n_times] [time_filter_global1].

count the number of patients who received a {procedure_name} procedure [n_times:two times] [time_filter_global1:abs-year-in].

Answer: 0


Question: how many patients got tooth extraction nec two or more times until 2103?

count the number of patients who received a tooth extraction nec procedure two or more times until 2103.

Question: select count( distinct t1.subject_id ) from ( select admissions.subject_id, count(*) as c1 from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'tooth extraction nec' ) and strftime('%Y',procedures_icd.charttime) <= '2103' group by admissions.subject_id ) as t1 where t1.c1 >= 2

count the number of patients who received a {procedure_name} procedure [n_times] [time_filter_global1].

count the number of patients who received a {procedure_name} procedure [n_times:two or more times] [time_filter_global1:abs-year-until].

Answer: 0


Question: how many patients were given pericardiocentesis two or more times a year before?

count the number of patients who received a pericardiocentesis procedure two or more times last year.

Question: select count( distinct t1.subject_id ) from ( select admissions.subject_id, count(*) as c1 from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'pericardiocentesis' ) and datetime(procedures_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') group by admissions.subject_id ) as t1 where t1.c1 >= 2

count the number of patients who received a {procedure_name} procedure [n_times] [time_filter_global1].

count the number of patients who received a {procedure_name} procedure [n_times:two or more times] [time_filter_global1:rel-year-last].

Answer: 0


Question: count the number of patients who have received a replace trach tube treatment two or more times.

count the number of patients who received a replace trach tube procedure two or more times.

Question: select count( distinct t1.subject_id ) from ( select admissions.subject_id, count(*) as c1 from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'replace trach tube' ) group by admissions.subject_id ) as t1 where t1.c1 >= 2

count the number of patients who received a {procedure_name} procedure [n_times] [time_filter_global1].

count the number of patients who received a {procedure_name} procedure [n_times:two or more times] [time_filter_global1:null].

Answer: 0


Question: count the number of patients who had a int inser lead atri-vent procedure in the same hospital encounter after being given a coronar arteriogr-2 cath procedure since 2103.

count the number of patients who received a int inser lead atri-vent procedure within the same hospital visit after having received a coronar arteriogr-2 cath procedure since 2103.

Question: select count( distinct t1.subject_id ) from ( select admissions.subject_id, procedures_icd.charttime, admissions.hadm_id from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'coronar arteriogr-2 cath' ) and strftime('%Y',procedures_icd.charttime) >= '2103' ) as t1 join ( select admissions.subject_id, procedures_icd.charttime, admissions.hadm_id from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'int inser lead atri-vent' ) and strftime('%Y',procedures_icd.charttime) >= '2103' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id

count the number of patients who received a {procedure_name2} procedure [time_filter_within] after having received a {procedure_name1} procedure [time_filter_global1].

count the number of patients who received a {procedure_name2} procedure [time_filter_within:within-hosp] after having received a {procedure_name1} procedure [time_filter_global1:abs-year-since].

Answer: 0


Question: how many patients received the revise lg bowel anastom within 2 months after receiving the hemodialysis until 2104?

count the number of patients who received a revise lg bowel anastom procedure within 2 month after having received a hemodialysis procedure until 2104.

Question: select count( distinct t1.subject_id ) from ( select admissions.subject_id, procedures_icd.charttime from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'hemodialysis' ) and strftime('%Y',procedures_icd.charttime) <= '2104' ) as t1 join ( select admissions.subject_id, procedures_icd.charttime from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'revise lg bowel anastom' ) and strftime('%Y',procedures_icd.charttime) <= '2104' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month')

count the number of patients who received a {procedure_name2} procedure [time_filter_within] after having received a {procedure_name1} procedure [time_filter_global1].

count the number of patients who received a {procedure_name2} procedure [time_filter_within:within-n_month] after having received a {procedure_name1} procedure [time_filter_global1:abs-year-until].

Answer: 0


Question: until 2 years ago, how many patients underwent percu abdominal drainage within the same hospital visit after having received left heart cardiac cath?

count the number of patients who received a percu abdominal drainage procedure within the same hospital visit after having received a left heart cardiac cath procedure until 2 year ago.

Question: select count( distinct t1.subject_id ) from ( select admissions.subject_id, procedures_icd.charttime, admissions.hadm_id from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'left heart cardiac cath' ) and datetime(procedures_icd.charttime) <= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, procedures_icd.charttime, admissions.hadm_id from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'percu abdominal drainage' ) and datetime(procedures_icd.charttime) <= datetime(current_time,'-2 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id

count the number of patients who received a {procedure_name2} procedure [time_filter_within] after having received a {procedure_name1} procedure [time_filter_global1].

count the number of patients who received a {procedure_name2} procedure [time_filter_within:within-hosp] after having received a {procedure_name1} procedure [time_filter_global1:rel-year-until].

Answer: 0


Question: how many patients underwent entral infus nutrit sub in the same month after the procedure of fiber-optic bronchoscopy, since 2 years ago?

count the number of patients who received a entral infus nutrit sub procedure within the same month after having received a fiber-optic bronchoscopy procedure since 2 year ago.

Question: select count( distinct t1.subject_id ) from ( select admissions.subject_id, procedures_icd.charttime from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'fiber-optic bronchoscopy' ) and datetime(procedures_icd.charttime) >= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, procedures_icd.charttime from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'entral infus nutrit sub' ) and datetime(procedures_icd.charttime) >= datetime(current_time,'-2 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month')

count the number of patients who received a {procedure_name2} procedure [time_filter_within] after having received a {procedure_name1} procedure [time_filter_global1].

count the number of patients who received a {procedure_name2} procedure [time_filter_within:within-month] after having received a {procedure_name1} procedure [time_filter_global1:rel-year-since].

Answer: 0


Question: how many patients underwent closed bronchial biopsy during the same hospital encounter after having received closed bronchial biopsy,?

count the number of patients who received a closed bronchial biopsy procedure within the same hospital visit after having received a closed bronchial biopsy procedure.

Question: select count( distinct t1.subject_id ) from ( select admissions.subject_id, procedures_icd.charttime, admissions.hadm_id from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'closed bronchial biopsy' ) ) as t1 join ( select admissions.subject_id, procedures_icd.charttime, admissions.hadm_id from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'closed bronchial biopsy' ) ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id

count the number of patients who received a {procedure_name2} procedure [time_filter_within] after having received a {procedure_name1} procedure [time_filter_global1].

count the number of patients who received a {procedure_name2} procedure [time_filter_within:within-hosp] after having received a {procedure_name1} procedure [time_filter_global1:null].

Answer: 0


Question: how many patients have undergone a circumcision within the same hospital visit after having been diagnosed with personal history of fall, last year?

count the number of patients who received a circumcision procedure within the same hospital visit after having been diagnosed with personal history of fall last year.

Question: select count( distinct t1.subject_id ) 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 = 'personal history of fall' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, procedures_icd.charttime, admissions.hadm_id from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'circumcision' ) and datetime(procedures_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id

count the number of patients who received a {procedure_name} procedure [time_filter_within] after having been diagnosed with {diagnosis_name} [time_filter_global1].

count the number of patients who received a {procedure_name} procedure [time_filter_within:within-hosp] after having been diagnosed with {diagnosis_name} [time_filter_global1:rel-year-last].

Answer: 0


Question: how many patients until 2 years ago underwent sm bowel endoscopy nec in the same hospital visit after having been diagnosed with anisocoria?

count the number of patients who received a sm bowel endoscopy nec procedure within the same hospital visit after having been diagnosed with anisocoria until 2 year ago.

Question: select count( distinct t1.subject_id ) 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 = 'anisocoria' ) and datetime(diagnoses_icd.charttime) <= datetime(current_time,'-2 year') ) as t1 join ( select admissions.subject_id, procedures_icd.charttime, admissions.hadm_id from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'sm bowel endoscopy nec' ) and datetime(procedures_icd.charttime) <= datetime(current_time,'-2 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and t1.hadm_id = t2.hadm_id

count the number of patients who received a {procedure_name} procedure [time_filter_within] after having been diagnosed with {diagnosis_name} [time_filter_global1].

count the number of patients who received a {procedure_name} procedure [time_filter_within:within-hosp] after having been diagnosed with {diagnosis_name} [time_filter_global1:rel-year-until].

Answer: 0


Question: how many patients received fiber-optic bronchoscopy during the same month after having been diagnosed with acidosis, the last year?

count the number of patients who received a fiber-optic bronchoscopy procedure within the same month after having been diagnosed with acidosis last year.

Question: select count( distinct t1.subject_id ) 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 = 'acidosis' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, procedures_icd.charttime from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'fiber-optic bronchoscopy' ) and datetime(procedures_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month')

count the number of patients who received a {procedure_name} procedure [time_filter_within] after having been diagnosed with {diagnosis_name} [time_filter_global1].

count the number of patients who received a {procedure_name} procedure [time_filter_within:within-month] after having been diagnosed with {diagnosis_name} [time_filter_global1:rel-year-last].

Answer: 0


Question: how many patients received coronar arteriogr-1 cath in the same month after the diagnosis of dermatitis nos, since 2105?

count the number of patients who received a coronar arteriogr-1 cath procedure within the same month after having been diagnosed with dermatitis nos since 2105.

Question: select count( distinct t1.subject_id ) from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'dermatitis nos' ) and strftime('%Y',diagnoses_icd.charttime) >= '2105' ) as t1 join ( select admissions.subject_id, procedures_icd.charttime from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'coronar arteriogr-1 cath' ) and strftime('%Y',procedures_icd.charttime) >= '2105' ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t1.charttime,'start of month') = datetime(t2.charttime,'start of month')

count the number of patients who received a {procedure_name} procedure [time_filter_within] after having been diagnosed with {diagnosis_name} [time_filter_global1].

count the number of patients who received a {procedure_name} procedure [time_filter_within:within-month] after having been diagnosed with {diagnosis_name} [time_filter_global1:abs-year-since].

Answer: 1


Question: a year before, how many patients received sympath nerve inject nec within 2 months after the diagnosis of crbl emblsm w infrct?

count the number of patients who received a sympath nerve inject nec procedure within 2 month after having been diagnosed with crbl emblsm w infrct last year.

Question: select count( distinct t1.subject_id ) from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'crbl emblsm w infrct' ) and datetime(diagnoses_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t1 join ( select admissions.subject_id, procedures_icd.charttime from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'sympath nerve inject nec' ) and datetime(procedures_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year') ) as t2 on t1.subject_id = t2.subject_id where t1.charttime < t2.charttime and datetime(t2.charttime) between datetime(t1.charttime) and datetime(t1.charttime,'+2 month')

count the number of patients who received a {procedure_name} procedure [time_filter_within] after having been diagnosed with {diagnosis_name} [time_filter_global1].

count the number of patients who received a {procedure_name} procedure [time_filter_within:within-n_month] after having been diagnosed with {diagnosis_name} [time_filter_global1:rel-year-last].

Answer: 0


Question: how many times in the last year has nonexcis debridement wnd been ordered?

count the number of nonexcis debridement wnd procedure cases last year.

Question: select count(*) from procedures_icd where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'nonexcis debridement wnd' ) and datetime(procedures_icd.charttime,'start of year') = datetime(current_time,'start of year','-1 year')

count the number of {procedure_name} procedure cases [time_filter_global1].

count the number of {procedure_name} procedure cases [time_filter_global1:rel-year-last].

Answer: 0


Question: how many times has the small bowel incision nec procedure been done since 2 years ago?

count the number of small bowel incision nec procedure cases since 2 year ago.

Question: select count(*) from procedures_icd where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'small bowel incision nec' ) and datetime(procedures_icd.charttime) >= datetime(current_time,'-2 year')

count the number of {procedure_name} procedure cases [time_filter_global1].

count the number of {procedure_name} procedure cases [time_filter_global1:rel-year-since].

Answer: 1


Question: how many impacted feces removal procedures occurred until 3 years ago?

count the number of impacted feces removal procedure cases until 3 year ago.

Question: select count(*) from procedures_icd where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'impacted feces removal' ) and datetime(procedures_icd.charttime) <= datetime(current_time,'-3 year')

count the number of {procedure_name} procedure cases [time_filter_global1].

count the number of {procedure_name} procedure cases [time_filter_global1:rel-year-until].

Answer: 0


Question: how many times is other brain incision done since 2103?

count the number of other brain incision procedure cases since 2103.

Question: select count(*) from procedures_icd where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'other brain incision' ) and strftime('%Y',procedures_icd.charttime) >= '2103'

count the number of {procedure_name} procedure cases [time_filter_global1].

count the number of {procedure_name} procedure cases [time_filter_global1:abs-year-since].

Answer: 3


Question: how many hemodialysis procedures took place since 2104?

count the number of hemodialysis procedure cases since 2104.

Question: select count(*) from procedures_icd where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'hemodialysis' ) and strftime('%Y',procedures_icd.charttime) >= '2104'

count the number of {procedure_name} procedure cases [time_filter_global1].

count the number of {procedure_name} procedure cases [time_filter_global1:abs-year-since].

Answer: 29


Question: how many patients during this year were prescribed nicardipine hcl iv?

count the number of patients who were prescribed nicardipine hcl iv this year.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select prescriptions.hadm_id from prescriptions where prescriptions.drug = 'nicardipine hcl iv' and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-0 year') )

count the number of patients who were prescribed {drug_name} [time_filter_global1].

count the number of patients who were prescribed {drug_name} [time_filter_global1:rel-year-this].

Answer: 0


Question: count the number of patients who had been prescribed an heparin flush hickman (100 units/ml) since 2101.

count the number of patients who were prescribed heparin flush hickman (100 units/ml) since 2101.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select prescriptions.hadm_id from prescriptions where prescriptions.drug = 'heparin flush hickman (100 units/ml)' and strftime('%Y',prescriptions.startdate) >= '2101' )

count the number of patients who were prescribed {drug_name} [time_filter_global1].

count the number of patients who were prescribed {drug_name} [time_filter_global1:abs-year-since].

Answer: 2


Question: how many patients were prescribed with maalox/benadryl/lidocaine in the previous year?

count the number of patients who were prescribed maalox/benadryl/lidocaine last year.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select prescriptions.hadm_id from prescriptions where prescriptions.drug = 'maalox/benadryl/lidocaine' and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-1 year') )

count the number of patients who were prescribed {drug_name} [time_filter_global1].

count the number of patients who were prescribed {drug_name} [time_filter_global1:rel-year-last].

Answer: 0


Question: how many patients is methylprednisolone sodium succ prescribed to the last year?

count the number of patients who were prescribed methylprednisolone sodium succ last year.

Question: select count( distinct admissions.subject_id ) from admissions where admissions.hadm_id in ( select prescriptions.hadm_id from prescriptions where prescriptions.drug = 'methylprednisolone sodium succ' and datetime(prescriptions.startdate,'start of year') = datetime(current_time,'start of year','-1 year') )

count the number of patients who were prescribed {drug_name} [time_filter_global1].

count the number of patients who were prescribed {drug_name} [time_filter_global1:rel-year-last].

Answer: 0


Question: how many oxymetazoline prescription cases are there in 2105?

count the number of oxymetazoline prescription cases in 2105.

Question: select count(*) from prescriptions where prescriptions.drug = 'oxymetazoline' and strftime('%Y',prescriptions.startdate) = '2105'

count the number of {drug_name} prescription cases [time_filter_global1].

count the number of {drug_name} prescription cases [time_filter_global1:abs-year-in].

Answer: 5


Question: how many bendamustine prescriptions have taken place since 2100?

count the number of bendamustine prescription cases since 2100.

Question: select count(*) from prescriptions where prescriptions.drug = 'bendamustine' and strftime('%Y',prescriptions.startdate) >= '2100'

count the number of {drug_name} prescription cases [time_filter_global1].

count the number of {drug_name} prescription cases [time_filter_global1:abs-year-since].

Answer: 1


Question: how many ziprasidone prescriptions were ordered since 1 year ago?

count the number of ziprasidone prescription cases since 1 year ago.

Question: select count(*) from prescriptions where prescriptions.drug = 'ziprasidone' and datetime(prescriptions.startdate) >= datetime(current_time,'-1 year')

count the number of {drug_name} prescription cases [time_filter_global1].

count the number of {drug_name} prescription cases [time_filter_global1:rel-year-since].

Answer: 4


Question: how many triamcinolone acetonide 0.025% cream prescriptions took place since 2104?

count the number of triamcinolone acetonide 0.025% cream prescription cases since 2104.

Question: select count(*) from prescriptions where prescriptions.drug = 'triamcinolone acetonide 0.025% cream' and strftime('%Y',prescriptions.startdate) >= '2104'

count the number of {drug_name} prescription cases [time_filter_global1].

count the number of {drug_name} prescription cases [time_filter_global1:abs-year-since].

Answer: 1


Question: how many fluticasone-salmeterol diskus (100/50) prescriptions occurred since 6 years ago?

count the number of fluticasone-salmeterol diskus (100/50) prescription cases since 6 year ago.

Question: select count(*) from prescriptions where prescriptions.drug = 'fluticasone-salmeterol diskus (100/50)' and datetime(prescriptions.startdate) >= datetime(current_time,'-6 year')

count the number of {drug_name} prescription cases [time_filter_global1].

count the number of {drug_name} prescription cases [time_filter_global1:rel-year-since].

Answer: 6


Question: count the number of patients that were prescribed aspirin ec within 2 months after having received a venous cath nec procedure until 4 years ago.

count the number of patients who were prescribed aspirin ec within 2 month after having received a venous cath nec procedure until 4 year ago.

Question: select count( distinct t1.subject_id ) from ( select admissions.subject_id, procedures_icd.charttime from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'venous cath nec' ) and datetime(procedures_icd.charttime) <= datetime(current_time,'-4 year') ) as t1 join ( select admissions.subject_id, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where prescriptions.drug = 'aspirin ec' 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')

count the number of patients who were prescribed {drug_name} [time_filter_within] after having received a {procedure_name} procedure [time_filter_global1].

count the number of patients who were prescribed {drug_name} [time_filter_within:within-n_month] after having received a {procedure_name} procedure [time_filter_global1:rel-year-until].

Answer: 0


Question: how many patients were prescribed levothyroxine sodium within 2 months since 2105 after the procedure of cath base invasv ep test.

count the number of patients who were prescribed levothyroxine sodium within 2 month after having received a cath base invasv ep test procedure since 2105.

Question: select count( distinct t1.subject_id ) from ( select admissions.subject_id, procedures_icd.charttime from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'cath base invasv ep test' ) and strftime('%Y',procedures_icd.charttime) >= '2105' ) as t1 join ( select admissions.subject_id, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where prescriptions.drug = 'levothyroxine sodium' 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')

count the number of patients who were prescribed {drug_name} [time_filter_within] after having received a {procedure_name} procedure [time_filter_global1].

count the number of patients who were prescribed {drug_name} [time_filter_within:within-n_month] after having received a {procedure_name} procedure [time_filter_global1:abs-year-since].

Answer: 0


Question: how many patients were prescribed with magnesium sulfate within the same month after the treatment of cont inv mec ven <96 hrs?

count the number of patients who were prescribed magnesium sulfate within the same month after having received a cont inv mec ven <96 hrs procedure.

Question: select count( distinct t1.subject_id ) from ( select admissions.subject_id, procedures_icd.charttime from procedures_icd join admissions on procedures_icd.hadm_id = admissions.hadm_id where procedures_icd.icd9_code = ( select d_icd_procedures.icd9_code from d_icd_procedures where d_icd_procedures.short_title = 'cont inv mec ven <96 hrs' ) ) as t1 join ( select admissions.subject_id, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where prescriptions.drug = 'magnesium sulfate' ) 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')

count the number of patients who were prescribed {drug_name} [time_filter_within] after having received a {procedure_name} procedure [time_filter_global1].

count the number of patients who were prescribed {drug_name} [time_filter_within:within-month] after having received a {procedure_name} procedure [time_filter_global1:null].

Answer: 1