db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
synthea | select t2.description from immunizations as t1 inner join conditions as t2 on t1.patient = t2.patient where t1.description = 'influenza seasonal injectable preservative free' group by t2.description order by count(t2.description) desc limit 1 | Question: what is the most common condition among the patients who received influenza seasonal injectable preservative free immunization? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, pa... | what is the most common condition among the patients who received influenza seasonal injectable preservative free immunization? |
synthea | select distinct t1.patient from conditions as t1 inner join all_prevalences as t2 on lower(t2.item) = lower(t1.description) where t2.'prevalence percentage' = cast(18.8 as float) | Question: list the ids of all the patients with condition that has a prevalence percentage of 18.8%. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, ... | list the ids of all the patients with condition that has a prevalence percentage of 18.8%. |
synthea | select count(distinct t2.description) from patients as t1 inner join conditions as t2 on t1.patient = t2.patient where t1.first = 'tyree' and t1.last = 'eichmann' | Question: how many conditions did tyree eichmann have? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity, gender, birt... | how many conditions did tyree eichmann have? |
synthea | select count(distinct t1.patient) from immunizations as t1 inner join conditions as t2 on t1.patient = t2.patient where t1.description = 'meningococcal mcv4p' and t2.description = 'viral sinusitis (disorder)' | Question: among the patients who were immunized with meningococcal mcv4p, how many have viral sinusitis disorder after getting the immunization? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, driv... | among the patients who were immunized with meningococcal mcv4p, how many have viral sinusitis disorder after getting the immunization? |
synthea | select count(distinct t2.patient) from conditions as t1 inner join patients as t2 on t1.patient = t2.patient where t2.gender = 'f' and t1.description = 'prediabetes' | Question: among the patients with prediabetes, how many are female? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity,... | among the patients with prediabetes, how many are female? |
synthea | select t1.first, t1.last from patients as t1 inner join observations as t2 on t1.patient = t2.patient where t2.description = 'body mass index' and t2.units = 'kg/m2' order by t2.value limit 1 | Question: indicate the patient's full name with the lowest body mass index in kg/m2. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital,... | indicate the patient's full name with the lowest body mass index in kg/m2. |
synthea | select strftime('%y', t2.deathdate) - strftime('%y', t2.birthdate) as age from conditions as t1 inner join patients as t2 on t1.patient = t2.patient where t2.first = 'giovanni' and t2.last = 'russel' and t1.description = 'hypertension' | Question: what is the age of the patient with hypertension named giovanni russel? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, ra... | what is the age of the patient with hypertension named giovanni russel? |
synthea | select count(distinct t2.patient) from medications as t1 inner join patients as t2 on t1.patient = t2.patient where t1.description = 'oxaliplatin 5 mg/ml [eloxatin]' and t2.race = 'asian' and t2.gender = 'f' | Question: how many asian female patients take oxaliplatin 5 mg/ml [eloxatin]? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ... | how many asian female patients take oxaliplatin 5 mg/ml [eloxatin]? |
synthea | select count(distinct t2.patient) from conditions as t1 inner join patients as t2 on t1.patient = t2.patient where t1.description = 'stroke' and t2.deathdate is null | Question: count all of the living patients that had a stroke. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity, gende... | count all of the living patients that had a stroke. |
synthea | select count(t2.patient) from allergies as t1 inner join patients as t2 on t1.patient = t2.patient where t1.description = 'allergy to peanuts' and t2.race = 'asian' | Question: what is the total number of asian patients who are allergic to peanuts? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, ra... | what is the total number of asian patients who are allergic to peanuts? |
synthea | select avg(t1.value) from observations as t1 inner join patients as t2 on t1.patient = t2.patient inner join conditions as t3 on t2.patient = t3.patient where t3.description = 'hypertension' and t1.description = 'diastolic blood pressure' | Question: among the patients with hypertension, what is the average of their diastolic blood pressure? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix... | among the patients with hypertension, what is the average of their diastolic blood pressure? |
synthea | select t1.description from medications as t1 inner join patients as t2 on t1.patient = t2.patient where t2.ssn = '999-94-3751' | Question: what is the medicine prescribed for the patient with social security number 999-94-3751? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, ma... | what is the medicine prescribed for the patient with social security number 999-94-3751? |
synthea | select t2.ssn from allergies as t1 inner join patients as t2 on t1.patient = t2.patient where t1.description = 'allergy to grass pollen' and t2.ethnicity = 'irish' and t2.gender = 'f' | Question: give the social security number of the female irish patient allergic to grass pollen. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maide... | give the social security number of the female irish patient allergic to grass pollen. |
synthea | select t2.first, t2.last from careplans as t1 inner join patients as t2 on t1.patient = t2.patient where t1.code = 315043002 | Question: who is the patient involved in the care plan with code 311791003? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, et... | who is the patient involved in the care plan with code 311791003? |
synthea | select t1.description from conditions as t1 inner join patients as t2 on t1.patient = t2.patient where t2.deathdate is not null order by strftime('%y', t2.deathdate) - strftime('%y', t2.birthdate) desc limit 1 | Question: among the patients that died, what is the condition of the oldest patient? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital,... | among the patients that died, what is the condition of the oldest patient? |
synthea | select t2.code from all_prevalences as t1 inner join conditions as t2 on t1.item = t2.description order by t1.occurrences desc limit 1 | Question: what is the code of the prevalent disease with the highest occurrences? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, ra... | what is the code of the prevalent disease with the highest occurrences? |
synthea | select distinct t2.description, t2.value, t2.units from patients as t1 inner join observations as t2 on t1.patient = t2.patient where t2.description = 'glucose' and t1.address = '365 della crossroad suite 202 deerfield ma 01342 us' | Question: what is the glucose level of the patient that lives at 365 della crossroad suite 202, deerfield, ma 01342 us? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, fi... | what is the glucose level of the patient that lives at 365 della crossroad suite 202, deerfield, ma 01342 us? |
synthea | select distinct t2.ssn from conditions as t1 inner join patients as t2 on t1.patient = t2.patient inner join all_prevalences as t3 on lower(t1.description) = lower(t3.item) where cast(t3.'prevalence percentage' as real) * 100 / ( select avg('prevalence percentage') from all_prevalences ) < 30 limit 5 | Question: provide at least 5 social security numbers of patients with a prevalent disease with a prevalence percentage lower than 30% of the average prevalence percentage of conditions. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients ->... | provide at least 5 social security numbers of patients with a prevalent disease with a prevalence percentage lower than 30% of the average prevalence percentage of conditions. |
synthea | select cast(sum(case when t2.gender = 'f' and t2.race = 'asian' then 1 else 0 end) as real) * 100 / count(t2.gender) from conditions as t1 inner join patients as t2 on t1.patient = t2.patient where t1.description = 'acute bronchitis (disorder)' | Question: among the patients with acute bronchitis, what is the percentage of asian women? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, ma... | among the patients with acute bronchitis, what is the percentage of asian women? |
synthea | select count(t2.id) from patients as t1 inner join encounters as t2 on t1.patient = t2.patient where t1.first = 'major' and t1.last = 'd''amore' | Question: provide the number of encounters for major d'amore. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity, gende... | provide the number of encounters for major d'amore. |
synthea | select t2.description from patients as t1 inner join procedures as t2 on t1.patient = t2.patient where t1.first = 'emmy' and t1.last = 'waelchi' | Question: list the procedures received by emmy waelchi. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity, gender, bir... | list the procedures received by emmy waelchi. |
synthea | select t1.first, t1.last from patients as t1 inner join procedures as t2 on t1.patient = t2.patient where t2.description = 'extraction of wisdom tooth' | Question: provide the patients' full names who received the extraction of wisdom tooth. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marit... | provide the patients' full names who received the extraction of wisdom tooth. |
synthea | select t2.description, t2.value, t2.units from patients as t1 inner join observations as t2 on t1.patient = t2.patient where t1.first = 'elly' and t1.last = 'koss' and t2.description = 'body weight' | Question: provide the body weight of elly koss in every observation. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity... | provide the body weight of elly koss in every observation. |
synthea | select t1.first, t1.last from patients as t1 inner join allergies as t2 on t1.patient = t2.patient where t2.description = 'allergy to soya' | Question: name the patients who had an allergy to soy. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity, gender, birt... | name the patients who had an allergy to soy. |
synthea | select count(t2.code) from patients as t1 inner join immunizations as t2 on t1.patient = t2.patient where t1.first = 'keven' and t1.last = 'kuhn' and t2.description = 'dtap' | Question: how many times did keven kuhn receive dtap immunization? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity, ... | how many times did keven kuhn receive dtap immunization? |
synthea | select t1.first, t1.last from patients as t1 inner join medications as t2 on t1.patient = t2.patient where t2.description = 'clopidogrel 75 mg oral tablet' and strftime('%y', t2.stop) - strftime('%y', t2.start) > 10 | Question: who had to take clopidogrel 75 mg oral tablet for over 10 years? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, eth... | who had to take clopidogrel 75 mg oral tablet for over 10 years? |
synthea | select distinct t1.description, t3.description from procedures as t1 inner join conditions as t2 on t1.patient = t2.patient inner join medications as t3 on t2.patient = t3.patient where t2.description = 'third degree burn' | Question: which procedures and medications were received by the patient with the third-degree burn? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, m... | which procedures and medications were received by the patient with the third-degree burn? |
synthea | select t2.description from allergies as t1 inner join medications as t2 on t1.patient = t2.patient where t1.start = '6/6/16' and t1.description = 'allergy to mould' | Question: provide medications received by patients with an allergy to mould on 6th june 2016. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden,... | provide medications received by patients with an allergy to mould on 6th june 2016. |
synthea | select distinct t1.description from careplans as t1 inner join conditions as t2 on t1.patient = t2.patient where t2.description = 'secondary malignant neoplasm of colon' | Question: describe the care plans received by the patient with secondary malignant neoplasm of the colon. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suf... | describe the care plans received by the patient with secondary malignant neoplasm of the colon. |
synthea | select t2.'prevalence rate' from conditions as t1 inner join all_prevalences as t2 on lower(t1.description) = lower(t2.item) where t1.start = '2014-05-09' | Question: what is the prevalence rate of the patients' diseases started on 9th may 2014? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, mari... | what is the prevalence rate of the patients' diseases started on 9th may 2014? |
synthea | select t2.first, t2.last , case when t2.deathdate is null then strftime('%y', t1.date) - strftime('%y', t2.birthdate) else strftime('%y', t2.deathdate) - strftime('%y', t2.birthdate) end as age from observations as t1 inner join patients as t2 on t1.patient = t2.patient where t1.description = 'systolic blood pressure' ... | Question: among observations in 2011, provide the names and ages of patients whose systolic blood pressures are 200mmhg. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, f... | among observations in 2011, provide the names and ages of patients whose systolic blood pressures are 200mmhg. |
synthea | select cast(sum(case when t2.description = 'influenza seasonal injectable preservative free' then 1 else 0 end) as real) * 100 / count(t1.patient), sum(case when t1.ethnicity = 'english' then 1 else 0 end) from patients as t1 inner join immunizations as t2 on t1.patient = t2.patient where strftime('%y', t2.date) = '201... | Question: among the immunizations in 2017, calculate the percentage of patients who received the influenza seasonal injectable preservative free. among them, how many patients are english? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients... | among the immunizations in 2017, calculate the percentage of patients who received the influenza seasonal injectable preservative free. among them, how many patients are english? |
synthea | select distinct t1.first from patients as t1 inner join encounters as t2 on t1.patient = t2.patient where t2.reasondescription = 'normal pregnancy' | Question: list down the first name of patients who encountered normal pregnancy. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, rac... | list down the first name of patients who encountered normal pregnancy. |
synthea | select distinct t1.birthdate from patients as t1 inner join encounters as t2 on t1.patient = t2.patient where t2.description = 'outpatient encounter' | Question: what are the birth date of patients who took outpatient encounter care plan? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marita... | what are the birth date of patients who took outpatient encounter care plan? |
synthea | select distinct t1.first from patients as t1 inner join conditions as t2 on t1.patient = t2.patient where t2.description = 'cystitis' | Question: list down the first name of patients who have cystitis condition. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, et... | list down the first name of patients who have cystitis condition. |
synthea | select count(distinct t1.patient) from patients as t1 inner join conditions as t2 on t1.patient = t2.patient where t2.description = 'stroke' and t1.marital = 'm' | Question: how many stroke patients have married? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity, gender, birthplace... | how many stroke patients have married? |
synthea | select distinct t1.address from patients as t1 inner join claims as t2 on t1.patient = t2.patient where t2.billableperiod like '2010%' | Question: list down the address of patients who have billable period in 2010. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ... | list down the address of patients who have billable period in 2010. |
synthea | select distinct t1.last from patients as t1 inner join allergies as t2 on t1.patient = t2.patient where t2.description = 'allergy to dairy product' | Question: list down the last name of patients who are allergic to dairy products. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, ra... | list down the last name of patients who are allergic to dairy products. |
synthea | select t2.start from patients as t1 inner join allergies as t2 on t1.patient = t2.patient where t1.first = 'adolfo' and t1.last = 'schmitt' and t2.stop is not null | Question: when the allergy starts for angelo buckridge. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity, gender, bir... | when the allergy starts for angelo buckridge. |
synthea | select count(distinct t1.patient) from patients as t1 inner join allergies as t2 on t1.patient = t2.patient where t2.description = 'house dust mite allergy' and t1.gender = 'm' | Question: how many of the male patients are allergic to house dust mites? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethn... | how many of the male patients are allergic to house dust mites? |
synthea | select t2.description from patients as t1 inner join allergies as t2 on t1.patient = t2.patient where t1.race = 'white' group by t2.description order by count(t2.description) desc limit 1 | Question: what kind of allergy is most common among white people? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity, g... | what kind of allergy is most common among white people? |
synthea | select distinct t1.first, t1.last from patients as t1 inner join immunizations as t2 on t1.patient = t2.patient where t2.description = 'influenza seasonal injectable preservative free' | Question: list down the first name of patients who received 'influenza seasonal injectable preservative free' immunization. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix... | list down the first name of patients who received 'influenza seasonal injectable preservative free' immunization. |
synthea | select count(distinct t1.patient) from patients as t1 inner join immunizations as t2 on t1.patient = t2.patient where t2.description = 'hpv quadrivalent' and t1.gender = 'f' | Question: calculate the number of female patients who accepted 'hpv quadrivalent' immunization. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maide... | calculate the number of female patients who accepted 'hpv quadrivalent' immunization. |
synthea | select distinct t2.description from patients as t1 inner join encounters as t2 on t1.patient = t2.patient where t1.birthplace = 'pittsfield ma us' | Question: list down the encounter descriptions of patients who were born in pittsfield ma us. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden,... | list down the encounter descriptions of patients who were born in pittsfield ma us. |
synthea | select count(distinct t2.description) from patients as t1 inner join allergies as t2 on t1.patient = t2.patient where t1.ethnicity = 'german' | Question: calculate the total type of allergies for german people. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity, ... | calculate the total type of allergies for german people. |
synthea | select cast(sum(case when t1.deathdate is null then strftime('%y', t2.stop) - strftime('%y', t1.birthdate) else strftime('%y', t1.deathdate) - strftime('%y', t1.birthdate) end) as real) / count(distinct t1.patient) from patients as t1 inner join careplans as t2 on t1.patient = t2.patient where t2.reasondescription = 'p... | Question: calculate the average age of patients with prediabetes care plan. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, et... | calculate the average age of patients with prediabetes care plan. |
synthea | select count(distinct t2.patient) from medications as t1 inner join patients as t2 on t1.patient = t2.patient where t1.reasondescription = 'coronary heart disease' and t1.stop is not null and t2.deathdate is null | Question: how many of the patients who have stopped taking medication for 'coronary heart disease' are still alive? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first,... | how many of the patients who have stopped taking medication for 'coronary heart disease' are still alive? |
synthea | select count(distinct t1.patient) from patients as t1 inner join procedures as t2 on t1.patient = t2.patient where t2.description = 'bone immobilization' and t1.drivers is not null | Question: how many of the patients who underwent a 'bone immobilization' procedure have a driver's license? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, s... | how many of the patients who underwent a 'bone immobilization' procedure have a driver's license? |
synthea | select t1.first, t1.last from patients as t1 inner join allergies as t2 on t1.patient = t2.patient group by t1.patient order by count(distinct t2.description) > 3 | Question: indicate the full name of the patients who have 3 different allergies. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, rac... | indicate the full name of the patients who have 3 different allergies. |
synthea | select count(distinct t2.patient) from allergies as t1 inner join patients as t2 on t1.patient = t2.patient inner join immunizations as t3 on t2.patient = t3.patient where t1.description = 'allergy to eggs' and t3.description = 'td (adult) preservative free' | Question: how many patients with 'allergy to eggs' have been immunized with 'td (adult) preservative free'? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, s... | how many patients with 'allergy to eggs' have been immunized with 'td (adult) preservative free'? |
synthea | select count(distinct t2.patient) from careplans as t1 inner join patients as t2 on t1.patient = t2.patient inner join observations as t3 on t2.patient = t3.patient where t3.description = 'body weight' and t1.description = 'diabetes self management plan' and t3.value > 100 and t3.units = 'kg' | Question: how many patients with a body weight of more than 100 kg have a 'diabetes self-management plan' care plan? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first... | how many patients with a body weight of more than 100 kg have a 'diabetes self-management plan' care plan? |
synthea | select t1.gender from patients as t1 inner join allergies as t2 on t1.patient = t2.patient where t2.description = 'dander (animal) allergy' group by t1.gender order by count(t1.gender) desc limit 1 | Question: what gender is more prone to 'dander (animal) allergy'? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity, g... | what gender is more prone to 'dander (animal) allergy'? |
synthea | select distinct t2.billableperiod from patients as t1 inner join claims as t2 on t1.patient = t2.patient where t1.last = 'dickinson' | Question: on what dates did the billable period begin for patients with the last name dickinson? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maid... | on what dates did the billable period begin for patients with the last name dickinson? |
synthea | select distinct t1.first, t1.last from patients as t1 inner join conditions as t2 on t1.patient = t2.patient where t2.description = 'otitis media' | Question: list the full name of all patients with 'otitis media'. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity, g... | list the full name of all patients with 'otitis media'. |
synthea | select count(distinct t1.patient) from patients as t1 inner join medications as t2 on t1.patient = t2.patient where t2.reasondescription = 'myocardial infarction' and t1.ethnicity = 'irish' | Question: how many patients of irish ethnicity take medication for 'myocardial infarction'? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, m... | how many patients of irish ethnicity take medication for 'myocardial infarction'? |
synthea | select count(distinct t1.patient) from patients as t1 inner join careplans as t2 on t1.patient = t2.patient where t1.marital = 'm' and t2.reasondescription = 'concussion with loss of consciousness' | Question: how many patients with care plan for 'concussion with loss of consciousness' are married? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, m... | how many patients with care plan for 'concussion with loss of consciousness' are married? |
synthea | select count(distinct t1.patient) from careplans as t1 inner join immunizations as t2 on t1.patient = t2.patient where t2.description = 'rotavirus monovalent' and t1.stop = '2013-11-23' | Question: how many patients immunized against 'monovalent rotavirus' ceased their care plan on 11/23/2013? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, su... | how many patients immunized against 'monovalent rotavirus' ceased their care plan on 11/23/2013? |
synthea | select count(distinct t1.patient) from patients as t1 inner join medications as t2 on t1.patient = t2.patient where t2.description = 'nitroglycerin 0.4 mg/actuat [nitrolingual]' and t1.gender = 'f' | Question: how many women need to take 'nitroglycerin 0.4 mg/actuat [nitrolingual]'? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, ... | how many women need to take 'nitroglycerin 0.4 mg/actuat [nitrolingual]'? |
synthea | select cast(sum(case when t2.description = 'allergy to grass pollen' then 1 else 0 end) as rel) * 100 / count(t1.patient) from patients as t1 inner join allergies as t2 on t1.patient = t2.patient where t1.birthplace = 'pembroke ma us' | Question: what percentage of patients born in 'pembroke ma us' have 'allergy to grass pollen'? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden... | what percentage of patients born in 'pembroke ma us' have 'allergy to grass pollen'? |
synthea | select sum(t2.value) / count(t1.patient) from patients as t1 inner join observations as t2 on t1.patient = t2.patient where t1.race = 'asian' and t2.description = 'body weight' and t2.units = 'kg' | Question: what is the average body weight of asian patients? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity, gender... | what is the average body weight of asian patients? |
synthea | select t1.ssn from patients as t1 inner join allergies as t2 on t1.patient = t2.patient where t2.description = 'latex allergy' | Question: write down the social security numbers of patients who have latex allergies. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marita... | write down the social security numbers of patients who have latex allergies. |
synthea | select case when substr(t1.stop, -2, 1) != '9' then substr(t1.stop, length(t1.stop) - 1) + 2000 end - case when substr(t1.start, -2, 1) = '9' then substr(t1.start, length(t1.start) - 1) + 1900 else substr(t1.start, length(t1.start) - 1) + 2000 end as years , t1.description from allergies as t1 inner join patients as t2... | Question: how long did isadora moen's allergy last? tell me what kind of allergy she has. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, mar... | how long did isadora moen's allergy last? tell me what kind of allergy she has. |
synthea | select count(t2.patient) from patients as t1 inner join careplans as t2 on t1.patient = t2.patient where t1.first = 'elly' and t1.last = 'koss' and t2.start between '2009-01-11' and '2010-10-23' | Question: how many times was elly koss given a care plan between 1/11/2009 and 10/23/2010? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, ma... | how many times was elly koss given a care plan between 1/11/2009 and 10/23/2010? |
synthea | select distinct t1.first, t1.last from patients as t1 inner join careplans as t2 on t1.patient = t2.patient where t1.marital = 'm' and strftime('%j', t2.stop) - strftime('%j', t2.start) > 60 | Question: in 2009, who among the married patients had undergone a care plan for more than 60 days? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, ma... | in 2009, who among the married patients had undergone a care plan for more than 60 days? |
synthea | select t2.date from patients as t1 inner join immunizations as t2 on t1.patient = t2.patient where t2.description = 'influenza seasonal injectable preservative free' and t1.first = 'elly' and t1.last = 'koss' | Question: please provide the dates on which elly koss was immunized with the influenza seasonal injectable preservative-free vaccine. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passpo... | please provide the dates on which elly koss was immunized with the influenza seasonal injectable preservative-free vaccine. |
synthea | select count(distinct t1.patient) from patients as t1 inner join immunizations as t2 on t1.patient = t2.patient where t2.description = 'meningococcal mcv4p' and t2.date between '2010-07-09' and '2013-10-29' and t1.race = 'black' | Question: from 7/9/2010 to 10/29/2013, how many black patients were immunized with the meningococcal mcv4p vaccine? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first,... | from 7/9/2010 to 10/29/2013, how many black patients were immunized with the meningococcal mcv4p vaccine? |
synthea | select distinct t2.code, t2.date from patients as t1 inner join immunizations as t2 on t1.patient = t2.patient where t1.prefix = 'ms.' and t1.first = 'jacquelyn' and t1.last = 'shanahan' and t2.description = 'influenza seasonal injectable preservative free' | Question: give me the immunization codes and dates on which ms. jacquelyn shanahan was immunized with influenza seasonal injectable preservative-free vaccine. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathd... | give me the immunization codes and dates on which ms. jacquelyn shanahan was immunized with influenza seasonal injectable preservative-free vaccine. |
synthea | select strftime('%j', t2.stop) - strftime('%j', t2.start) as takendays from patients as t1 inner join medications as t2 on t1.patient = t2.patient where t1.first = 'berry' and t1.last = 'keebler' and t2.reasondescription = 'acute bronchitis (disorder)' and t2.description = 'acetaminophen 160 mg' | Question: how long did berry keebler take the acetaminophen 160 mg when he was admitted due to acute bronchitis? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, la... | how long did berry keebler take the acetaminophen 160 mg when he was admitted due to acute bronchitis? |
synthea | select count(distinct t1.patient) from patients as t1 inner join medications as t2 on t1.patient = t2.patient where t1.marital = 's' and t2.reasondescription = 'cystitis' and t2.description = 'nitrofurantoin 5 mg/ml [furadantin]' and strftime('%y', t2.start) = '2010' | Question: in 2010, how many single patients took nitrofurantoin 5 mg/ml [furadantin] to cure cystitis? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix... | in 2010, how many single patients took nitrofurantoin 5 mg/ml [furadantin] to cure cystitis? |
synthea | select t2.reasondescription from patients as t1 inner join encounters as t2 on t1.patient = t2.patient where t2.date = '2013-11-20' and t1.first = 'lavelle' and t1.last = 'vandervort' | Question: tell me the reason for lavelle vandervort's encounter on 11/20/2013? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race,... | tell me the reason for lavelle vandervort's encounter on 11/20/2013? |
synthea | select count(distinct t1.patient) from patients as t1 inner join encounters as t2 on t1.patient = t2.patient where t1.ethnicity = 'german' and t2.date between '2011-01-09' and '2012-08-29' and t2.description = 'outpatient encounter' | Question: from 1/9/2011 to 8/29/2012, how many german patients have their outpatient encounters? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maid... | from 1/9/2011 to 8/29/2012, how many german patients have their outpatient encounters? |
synthea | select t1.ssn, t1.address from patients as t1 inner join encounters as t2 on t1.patient = t2.patient where t2.date = '2008-06-13' and t2.reasondescription = 'viral sinusitis (disorder)' and t2.description = 'encounter for symptom' | Question: what is the social security number and address of the patient who encountered viral sinusitis symptoms on 6/13/2008? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, pre... | what is the social security number and address of the patient who encountered viral sinusitis symptoms on 6/13/2008? |
synthea | select t2.reasondescription, t2.description , strftime('%j', t2.stop) - strftime('%j', t2.start) as days , case when t1.deathdate is null then 'alive' else 'dead' end from patients as t1 inner join medications as t2 on t1.patient = t2.patient where t2.encounter = '23c293ec-dbae-4a22-896e-f12cf3c8bac3' | Question: give me the reason, name of the drug, and duration of medication under encounter id 23c293ec-dbae-4a22-896e-f12cf3c8bac3. tell me if the patient is still alive. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birth... | give me the reason, name of the drug, and duration of medication under encounter id 23c293ec-dbae-4a22-896e-f12cf3c8bac3. tell me if the patient is still alive. |
synthea | select t1.first, t1.last from patients as t1 inner join allergies as t2 on t1.patient = t2.patient where t2.description = 'shellfish allergy' and cast((strftime('%j', t1.deathdate) - strftime('%j', t1.birthdate)) as real) / 365 < 12 | Question: how many patients with shellfish allergies died when they were under 12 years old? please give their full names. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix,... | how many patients with shellfish allergies died when they were under 12 years old? please give their full names. |
synthea | select strftime('%j', t2.stop) - strftime('%j', t2.start) as days from patients as t1 inner join medications as t2 on t1.patient = t2.patient where t2.description = ' amoxicillin 250 mg / clavulanate 125 mg [augmentin]' and t1.first = 'major' and t1.last = 'd''amore' | Question: how long was mr. major d'amore prescribed with amoxicillin 250 mg / clavulanate 125 mg [augmentin]? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last,... | how long was mr. major d'amore prescribed with amoxicillin 250 mg / clavulanate 125 mg [augmentin]? |
synthea | select count(distinct t2.description) from patients as t1 inner join medications as t2 on t1.patient = t2.patient where t1.first = 'major' and t1.last = 'd''amore' | Question: how many types of medication have been prescribed to mr. major d'amore since his visit to the hospital? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, l... | how many types of medication have been prescribed to mr. major d'amore since his visit to the hospital? |
synthea | select distinct t2.description, t2.value, t2.units from patients as t1 inner join observations as t2 on t1.patient = t2.patient where t1.first = 'bella' and t1.last = 'rolfson' | Question: list out all the observation information collected for the patient named bella rolfson. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, mai... | list out all the observation information collected for the patient named bella rolfson. |
synthea | select distinct t1.first, t1.last from patients as t1 inner join observations as t2 on t1.patient = t2.patient where t2.description = 'calcium' and t2.value < 8.6 | Question: list out patient names with calcium deficiency. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity, gender, b... | list out patient names with calcium deficiency. |
synthea | select distinct t2.description, t2.value, t2.units from patients as t1 inner join observations as t2 on t1.patient = t2.patient where t2.description = 'body mass index' group by t2.value order by count(t2.value) limit 5 | Question: list out 5 most common conditions for underweight patient. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity... | list out 5 most common conditions for underweight patient. |
synthea | select count(distinct t2.patient) from encounters as t1 inner join immunizations as t2 on t1.patient = t2.patient where t1.reasondescription = 'normal pregnancy' and t1.date = t2.date | Question: how many mothers have taken immunization during prenatal visit? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethn... | how many mothers have taken immunization during prenatal visit? |
synthea | select t2.description from patients as t1 inner join careplans as t2 on t1.patient = t2.patient where t1.first = 'elly' and t1.last = 'koss' and strftime('%y', t2.start) = '2013' | Question: what care plans have been received by mrs. elly koss during year 1970? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, rac... | what care plans have been received by mrs. elly koss during year 1970? |
synthea | select distinct t3.description, t4.description, t5.description, t1.first, t1.last from patients as t1 inner join encounters as t2 on t1.patient = t2.patient inner join careplans as t3 on t1.patient = t3.patient inner join procedures as t4 on t1.patient = t4.patient inner join medications as t5 on t1.patient = t5.patien... | Question: what is the care plan, procedure, medication and the patient's full name for encounter 6f2e3935-b203-493e-a9c0-f23e847b9798? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passp... | what is the care plan, procedure, medication and the patient's full name for encounter 6f2e3935-b203-493e-a9c0-f23e847b9798? |
synthea | select count(distinct case when t2.gender = 'm' then t2.patient end) as male , count(distinct case when t2.gender = 'f' then t2.patient end) as female from conditions as t1 inner join patients as t2 on t1.patient = t2.patient where t1.description = 'hypertension' | Question: how many male patients are diagnosed with hypertension as compared to female patients? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maid... | how many male patients are diagnosed with hypertension as compared to female patients? |
synthea | select count(distinct t2.patient) from conditions as t1 inner join patients as t2 on t1.patient = t2.patient where t1.description = 'normal pregnancy' and t2.gender = 'f' and t2.marital = 's' | Question: how many unmarried women were checked for normal pregnancy? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicit... | how many unmarried women were checked for normal pregnancy? |
synthea | select distinct t2.description, t3.description from encounters as t1 inner join procedures as t2 on t1.patient = t2.patient inner join medications as t3 on t1.patient = t3.patient where t1.reasondescription = 'drug overdose' | Question: list out the procedure and medicine prescribed for drug overdose patients. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital,... | list out the procedure and medicine prescribed for drug overdose patients. |
synthea | select sum(t1.value) / count(t1.patient) from observations as t1 inner join ( select distinct patient from observations where description = 'total cholesterol' and value > 200 ) as t2 on t1.patient = t2.patient where t1.description = 'body mass index' | Question: what is the average body mass index for patients with higher total cholesterol? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, mar... | what is the average body mass index for patients with higher total cholesterol? |
synthea | select sum(case when round((strftime('%j', t2.date) - strftime('%j', t1.birthdate)) / 365) between 20 and 30 then t2.value else 0 end) / count(case when round((strftime('%j', t2.date) - strftime('%j', t1.birthdate)) / 365) between 20 and 30 then t2.patient end) - sum(case when round((strftime('%j', t2.date) - strftime(... | Question: what is the difference between average glucose reading for patients in the 20s and 50s? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, mai... | what is the difference between average glucose reading for patients in the 20s and 50s? |
synthea | select cast(sum(case when t5.description = t3.description then 1 else 0 end) as real) * 100 / count(t3.patient) from ( select t2.description, t1.patient from patients as t1 inner join conditions as t2 on t1.patient = t2.patient where round((strftime('%j', t2.start) - strftime('%j', t1.birthdate)) / 365) > 60 group by t... | Question: what is the percentage of the most common conditions for patients age 60 and above? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden,... | what is the percentage of the most common conditions for patients age 60 and above? |
synthea | select t2.reasondescription from patients as t1 inner join encounters as t2 on t1.patient = t2.patient where t1.first = 'walter' and t1.last = 'bahringer' and t2.date like '2009-07%' | Question: name the reason walter bahringer visited medical professionals in july 2009. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marita... | name the reason walter bahringer visited medical professionals in july 2009. |
synthea | select t2.date - t1.birthdate as age from patients as t1 inner join encounters as t2 on t1.patient = t2.patient where t1.first = 'stacy' and t1.last = 'morar' and t2.description = 'emergency room admission' and t2.reasondescription = 'drug overdose' order by t2.date limit 1 | Question: how old was mr. stacy morar at the time of his first emergency room admission due to a drug overdose? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, las... | how old was mr. stacy morar at the time of his first emergency room admission due to a drug overdose? |
synthea | select description from medications where reasondescription = 'child attention deficit disorder' group by description order by count(description) desc limit 1 | Question: what drug is administered more often to treat child attention deficit disorder? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, mar... | what drug is administered more often to treat child attention deficit disorder? |
synthea | select t2.first, t2.last from procedures as t1 inner join patients as t2 on t1.patient = t2.patient where t1.description = 'transplant of lung (procedure)' | Question: please include the full name of the patient who received a lung transplant. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital... | please include the full name of the patient who received a lung transplant. |
synthea | select cast(count(patient) as real) / count(distinct strftime('%y', date)) from procedures where description = 'combined chemotherapy and radiation therapy (procedure)' | Question: how many patients on average receive combined chemotherapy and radiation therapy procedures each year? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, la... | how many patients on average receive combined chemotherapy and radiation therapy procedures each year? |
synthea | select strftime('%j', t2.stop) - strftime('%j', t2.start) as timeframe , t2.description from patients as t1 inner join careplans as t2 on t1.patient = t2.patient where t1.first = 'jacquelyn' and t1.last = 'shanahan' order by t2.start desc limit 1 | Question: indicate the time frame and details of the most recent care plan suggested to jacquelyn shanahan. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, s... | indicate the time frame and details of the most recent care plan suggested to jacquelyn shanahan. |
synthea | select t2.start, t2.stop, t2.description from patients as t1 inner join allergies as t2 on t1.patient = t2.patient where t1.first = 'isadora' and t1.last = 'moen' | Question: identify the allergy period for isadora moen and what triggered it. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ... | identify the allergy period for isadora moen and what triggered it. |
synthea | select t2.date - t1.birthdate as age from patients as t1 inner join encounters as t2 on t1.patient = t2.patient where t1.first = 'laronda' and t1.last = 'bernier' order by t2.date desc limit 1 | Question: how old was mrs. laronda bernier at the time of her most recent medical encounter? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, ... | how old was mrs. laronda bernier at the time of her most recent medical encounter? |
synthea | select t2.description from patients as t1 inner join conditions as t2 on t1.patient = t2.patient where t1.first = 'joye' and t1.last = 'homenick' and strftime('%y', t2.start) = '2017' | Question: what condition forced mrs. joye homenick to seek medical attention in 2017? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital... | what condition forced mrs. joye homenick to seek medical attention in 2017? |
synthea | select t2.date from patients as t1 inner join immunizations as t2 on t1.patient = t2.patient where t2.description = 'influenza seasonal injectable preservative free' and t1.first = 'joye' and t1.last = 'homenick' order by t2.date desc limit 1 | Question: when did mrs. joye homenick receive her most recent influenza seasonal vaccine? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, mar... | when did mrs. joye homenick receive her most recent influenza seasonal vaccine? |
synthea | select strftime('%j', t2.stop) - strftime('%j', t2.start) as days from patients as t1 inner join medications as t2 on t1.patient = t2.patient where t1.first = 'elly' and last = 'koss' and t2.description = 'acetaminophen 160 mg' | Question: how long did elly koss have to take acetaminophen 160 mg? | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, prefix, first, last, suffix, maiden, marital, race, ethnicity,... | how long did elly koss have to take acetaminophen 160 mg? |
synthea | select count(distinct t2.patient), t2.description from encounters as t1 inner join careplans as t2 on t1.patient = t2.patient where t2.reasondescription = 'second degree burn' | Question: how many patients sought medical attention due to a second-degree burn? describe the care plan recommended to them. | Tables: all_prevalences -> ITEM, POPULATION TYPE, OCCURRENCES, POPULATION COUNT, PREVALENCE RATE, PREVALENCE PERCENTAGE. patients -> patient, birthdate, deathdate, ssn, drivers, passport, pref... | how many patients sought medical attention due to a second-degree burn? describe the care plan recommended to them. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.