db_id stringclasses 69 values | question stringlengths 24 325 | evidence stringlengths 0 673 | SQL stringlengths 23 804 |
|---|---|---|---|
synthea | What is the most common condition among the patients who received influenza seasonal injectable preservative free immunization? | the most common condition refers to MAX(DESCRIPTION) from conditions; patients who received influenza seasonal injectable preservative free immunization refer to PATIENT where DESCRIPTION = 'Influenza seasonal injectable preservative free' from immunizations; | 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 |
synthea | List the ids of all the patients with condition that has a prevalence percentage of 18.8%. | ids of the patients refer to PATIENT from conditions; condition that has a prevalence percentage of 18.8% refers to PREVALENCE PERCENTAGE = 18.8; | 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) |
synthea | How many conditions did Tyree Eichmann have? | conditions refer to DESCRIPTION from conditions; | 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' |
synthea | Among the patients who were immunized with meningococcal MCV4P, how many have viral sinusitis disorder after getting the immunization? | immunized with meningococcal MCV4P refers to DESCRIPTION = 'meningococcal MCV4P' from immunizations; viral sinusitis disorder refers to DESCRIPTION = 'Viral sinusitis (disorder)' from conditions; | 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)' |
synthea | Among the patients with prediabetes, how many are female? | patients with prediabetes refer to PATIENT from conditions where DESCRIPTION = 'Prediabetes'; female refers to gender = 'F'; | 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' |
synthea | Indicate the patient's full name with the lowest body mass index in kg/m2. | full name refers to first, last; the lowest body mass index in kg/m2 refers to DESCRIPTION = Body Mass Index from observations where MIN(VALUE) and UNITS = 'kg/m2'; | 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 |
synthea | What is the age of the patient with hypertension named Giovanni Russel? | age refers to SUBTRACT(strftime('%Y', deathdate), strftime('%Y', birthdate)); hypertension refers to conditions where DESCRIPTION = 'Hypertension'; | 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' |
synthea | How many Asian female patients take oxaliplatin 5 MG/ML [Eloxatin]? | female refers to gender = 'F'; oxaliplatin 5 MG/ML [Eloxatin] refers to medications where DESCRIPTION = 'oxaliplatin 5 MG/ML [Eloxatin]'; | 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' |
synthea | Count all of the living patients that had a stroke. | if deathdate is null, it means this patient is still alive or living; stroke refers to conditions where DESCRIPTION = 'Stroke'; | 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 |
synthea | What is the total number of Asian patients who are allergic to peanuts? | Asian refers to race like 'asian%'; allergic to peanuts refers to allergies where DESCRIPTION = 'Allergy to peanuts';
| 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' |
synthea | Among the patients with hypertension, what is the average of their diastolic blood pressure? | hypertension refers to conditions where DESCRIPTION = 'Hypertension'; average diastolic blood pressure refers to AVG(VALUE) where DESCRIPTION = 'Diastolic Blood Pressure' from observations; | 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' |
synthea | What is the medicine prescribed for the patient with social security number 999-94-3751? | medicine prescribed refers to DESCRIPTION from medications; social security number 999-94-3751 refers to ssn = '999-94-3751'; | SELECT T1.DESCRIPTION FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.ssn = '999-94-3751' |
synthea | Give the social security number of the female Irish patient allergic to grass pollen. | social security number refers to ssn; female refers to gender = 'F'; Irish refers to ethnicity = 'irish'; allergic to grass pollen refers to allergies where DESCRIPTION = 'Allergy to grass pollen'; | 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' |
synthea | Who is the patient involved in the care plan with code 311791003? | SELECT T2.first, T2.last FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.CODE = 315043002 | |
synthea | Among the patients that died, what is the condition of the oldest patient? | if deathdate is not null, it means this patient died; condition refers to DESCRIPTION from conditions; the oldest patient refers to MAX(SUBTRACT(strftime('%Y', deathdate), strftime('%Y', birthdate))); | 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 |
synthea | What is the code of the prevalent disease with the highest occurrences? | 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 | |
synthea | What is the glucose level of the patient that lives at 365 Della Crossroad Suite 202, Deerfield, MA 01342 US? | glucose level refers to VALUE, UNITS where DESCRIPTION = 'Glucose' from observations; lives at 365 Della Crossroad Suite 202, Deerfield, MA 01342 US refers to address = '365 Della Crossroad Suite 202 Deerfield MA 01342 US'; | 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' |
synthea | 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. | social security number refers to ssn; prevalence percentage lower than 30% of the average prevalence percentage of conditions refers to PREVALENCE PERCENTAGE < MULTIPLY(0.3, AVG(PREVALENCE PERCENTAGE)); | 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 |
synthea | Among the patients with acute bronchitis, what is the percentage of Asian women? | DIVIDE(COUNT(PATIENT where gender = 'F' and race = 'asian'), COUNT(PATIENT)) as percentage where DESCRIPTION = 'Acute bronchitis (disorder)' ; | 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)' |
synthea | Provide the number of encounters for Major D'Amore. | 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' | |
synthea | List the procedures received by Emmy Waelchi. | procedures refer to DESCRIPTION from procedures; | 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' |
synthea | Provide the patients' full names who received the extraction of wisdom tooth. | patient's full name refers to first, last; extraction of wisdom tooth refers to DESCRIPTION = 'Extraction of wisdom tooth' from procedures; | 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' |
synthea | Provide the body weight of Elly Koss in every observation. | body weight VALUE and UNITS where DESCRIPTION = 'Body Weight' from observations; | 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' |
synthea | Name the patients who had an allergy to soy. | allergy to soy refers to allergies where DESCRIPTION = 'Allergy to soya'; | 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' |
synthea | How many times did Keven Kuhn receive DTaP immunization? | DTaP immunization refers to immunizations where DESCRIPTION = 'DTaP'; | 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' |
synthea | Who had to take Clopidogrel 75 MG Oral Tablet for over 10 years? | Who implies the full name of the patient which refers to first, last; Clopidogrel 75 MG Oral Tablet refers to medications where DESCRIPTION = 'Clopidogrel 75 MG Oral Tablet'; for over 10 years refers to SUBTRACT(strftime('%Y', STOP), strftime('%Y', START)) > 10; | 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 |
synthea | Which procedures and medications were received by the patient with the third-degree burn? | procedures refer to DESCRIPTION from procedures; medications refers to DESCRIPTION from medications; third-degree burn refers to conditions where DESCRIPTION = 'Third degree burn'; | 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' |
synthea | Provide medications received by patients with an allergy to mould on 6th June 2016. | medications refers to DESCRIPTION from medications; allergy to mould refers to allergies where DESCRIPTION = 'Allergy to mould'; on 6th June 2016 refers to START = '6/6/16'; | 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' |
synthea | Describe the care plans received by the patient with secondary malignant neoplasm of the colon. | care plans refer to DESCRIPTION from careplans; secondary malignant neoplasm of the colon refers to conditions where DESCRIPTION = 'Secondary malignant neoplasm of colon'; | 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' |
synthea | What is the prevalence rate of the patients' diseases started on 9th May 2014? | diseases started on 9th May 2014 refer to DESCRIPTION from conditions where START = '5/9/2014'; | 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' |
synthea | Among observations in 2011, provide the names and ages of patients whose Systolic Blood Pressures are 200mmHg. | name implies the patient's full name which refers to first, last; age refers to deathdate is null then SUBTRACT(strftime('%Y', DATE), strftime('%Y', birthdate)); Systolic Blood Pressures are 200mmHg refers to DESCRIPTION = 'Systolic Blood Pressure' and VALUE = 200 and UNITS = 'mmHg' from observations; in 2011 refers to DATE like '2011%'; | 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' AND T1.VALUE = 200 AND T1.UNITS = 'mmHg' AND strftime('%Y', T1.DATE) = '2011' |
synthea | 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? | DIVIDE(COUNT(PATIENT when DESCRIPTION = 'Influenza seasonal injectable preservative free'), COUNT(PATIENT)) as percentage where strftime('%Y', 2017); English refers ethnicity = 'english'; | 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) = '2017' |
synthea | List down the first name of patients who encountered normal pregnancy. | encountered normal pregnancy refers to encounters where REASONDESCRIPTION = 'Normal pregnancy'; | SELECT DISTINCT T1.first FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T2.REASONDESCRIPTION = 'Normal pregnancy' |
synthea | What are the birth date of patients who took outpatient encounter care plan? | outpatient encounter care plan refers to careplans where DESCRIPTION = 'Outpatient Encounter'; | SELECT DISTINCT T1.birthdate FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Outpatient Encounter' |
synthea | List down the first name of patients who have cystitis condition. | cystitis refers to conditions where DESCRIPTION = 'Cystitis'; | SELECT DISTINCT T1.first FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Cystitis' |
synthea | How many stroke patients have married? | stroke refers to conditions where DESCRIPTION = 'Stroke'; married refers to the marital status of the patient in which marital = 'M'; | 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' |
synthea | List down the address of patients who have billable period in 2010. | SELECT DISTINCT T1.address FROM patients AS T1 INNER JOIN claims AS T2 ON T1.patient = T2.PATIENT WHERE T2.BILLABLEPERIOD LIKE '2010%' | |
synthea | List down the last name of patients who are allergic to dairy products. | allergic to dairy products refers to allergies where DESCRIPTION = 'Allergy to dairy product'; | 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' |
synthea | When the allergy starts for Angelo Buckridge. | 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 | |
synthea | How many of the male patients are allergic to house dust mites? | male patients refer to PATIENT where gender = 'M'; allergic to house dust mites refers to allergies where DESCRIPTION = 'House dust mite allergy'; | 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' |
synthea | What kind of allergy is most common among white people? | kind of allergy is most common refers to MAX(COUNT(DESCRIPTION)) from allergies; white refers to race = 'white'; | 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 |
synthea | List down the first name of patients who received "Influenza seasonal injectable preservative free" immunization. | "Influenza seasonal injectable preservative free" immunization refers to immunizations where DESCRIPTION = 'Influenza seasonal injectable preservative free'; | 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' |
synthea | Calculate the number of female patients who accepted "HPV quadrivalent" immunization. | female refers to gender = 'F'; "HPV quadrivalent" immunization refers to immunizations where DESCRIPTION = 'HPV quadrivalent'; | 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' |
synthea | List down the encounter descriptions of patients who were born in Pittsfield MA US. | born in Pittsfield MA US refers to birthplace = 'Pittsfield MA US'; | SELECT DISTINCT T2.DESCRIPTION FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T1.birthplace = 'Pittsfield MA US' |
synthea | Calculate the total type of allergies for German people. | type of allergies refers to DESCRIPTION from allergies; German people refer to PATIENT where ethnicity = 'german'; | SELECT COUNT(DISTINCT T2.DESCRIPTION) FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.ethnicity = 'german' |
synthea | Calculate the average age of patients with prediabetes care plan. | SUBTRACT(SUM(deathdate), SUM(birthdate)), COUNT(patient) where REASONDESCRIPTION = 'Prediabetes' from careplans; | 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 = 'Prediabetes' |
synthea | How many of the patients who have stopped taking medication for 'coronary heart disease' are still alive? | patients who have stopped taking medication for 'coronary heart disease' refer to PATIENT where REASONDESCRIPTION = 'Coronary Heart Disease' and STOP is not null from medications; if deathdate is null, it means this patient is still alive; | 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 |
synthea | How many of the patients who underwent a 'bone immobilization' procedure have a driver's license? | patients who underwent a 'bone immobilization' procedure refer to PATIENT from procedures where DESCRIPTION = 'Bone immobilization'; have a driver's license refers to drivers is not null; | 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 |
synthea | Indicate the full name of the patients who have 3 different allergies. | full name refers to first, last; have 3 different allergies refer to allergies where COUNT(DESCRIPTION) > 3; | 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 |
synthea | How many patients with 'allergy to eggs' have been immunized with 'Td (adult) preservative free'? | allergy to eggs' refers to allergies where DESCRIPTION = 'Allergy to eggs'; immunized with 'Td (adult) preservative free' refers to immunizations where DESCRIPTION = 'Td (adult) preservative free'; | 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' |
synthea | How many patients with a body weight of more than 100 kg have a 'diabetes self-management plan' care plan? | body weight of more than 100 kg refers to observations.DESCRIPTION = 'Body Weight' AND observations.VALUE > 100 AND observations.UNITS = 'kg'; diabetes self-management plan refers to careplans.DESCRIPTION = 'Diabetes self management plan'; | 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' |
synthea | What gender is more prone to 'dander (animal) allergy'? | gender who is more prone to dander (animal) allergy refers to MAX(COUNT(Gender WHERE allergies.DESCRIPTION = 'Dander (animal) allergy')); | 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 |
synthea | On what dates did the billable period begin for patients with the last name Dickinson? | dates when the billable period begin refers to BILLABLEPERIOD; | SELECT DISTINCT T2.BILLABLEPERIOD FROM patients AS T1 INNER JOIN claims AS T2 ON T1.patient = T2.PATIENT WHERE T1.last = 'Dickinson' |
synthea | List the full name of all patients with 'otitis media'. | full name = first, last; otitis media refers to conditions.DESCRIPTION = 'Otitis media'; | 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' |
synthea | How many patients of Irish ethnicity take medication for 'myocardial infarction'? | take medication for myocardial infarction refers to medications.REASONDESCRIPTION = 'Myocardial Infarction'; | 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' |
synthea | How many patients with care plan for 'concussion with loss of consciousness' are married? | concussion with loss of consciousness refers to careplans.DESCRIPTION = 'Concussion with loss of consciousness'; married refers to marital = 'M'; | 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' |
synthea | How many patients immunized against 'monovalent rotavirus' ceased their care plan on 11/23/2013? | immunized against monovalent rotavirus refers to immunizations.DESCRIPTION = 'rotavirus monovalent'; ceased their care plan on 11/23/2013 refers to careplans.STOP = '2013-11-23'; | 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' |
synthea | How many women need to take 'Nitroglycerin 0.4 MG/ACTUAT [Nitrolingual]'? | women refers to gender = 'F'; Nitroglycerin 0.4 MG/ACTUAT [Nitrolingual] refers to medications.DESCRIPTION = 'Nitroglycerin 0.4 MG/ACTUAT [Nitrolingual]' | 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' |
synthea | What percentage of patients born in 'Pembroke MA US' have 'allergy to grass pollen'? | percentage = MULTIPLY(DIVIDE(SUM(patient WHERE allergies.DESCRIPTION = 'Allergy to grass pollen'), COUNT(patient) WHERE birthplace = 'Pembroke MA US'), 100.0); born in Pembroke MA US refers to birthplace = 'Pembroke MA US'; allergy to grass pollen refers to allergies.DESCRIPTION = 'Allergy to grass'; | 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' |
synthea | What is the average body weight of Asian patients? | average = AVG(observations.VALUE WHERE observations.DESCRIPTION = 'Body Weight' AND observations.UNITS = 'kg'); body weight refers to observations.DESCRIPTION = 'Body Weight'; Asian refers to race = 'asian'; | 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' |
synthea | Write down the Social Security numbers of patients who have latex allergies. | Social Security numbers refers to ssn; latex allergies refers to allergies.DESCRIPTION = 'Latex allergy'; | SELECT T1.ssn FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Latex allergy' |
synthea | How long did Isadora Moen's allergy last? Tell me what kind of allergy she has. | how long the allergies last = SUBTRACT(allergies.STOP, allergies.START); kind of allergy refers to allergies.DESCRIPTION; | 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 ON T2.patient = T1.PATIENT WHERE T1.STOP IS NOT NULL AND T1.START IS NOT NULL AND T2.first = 'Isadora' AND T2.last = 'Moen' |
synthea | How many times was Elly Koss given a care plan between 1/11/2009 and 10/23/2010? | between 1/11/2009 and 10/23/2010 refers to careplans.START between '2009-11-1' and '2010-10-23'; | 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' |
synthea | In 2009, who among the married patients had undergone a care plan for more than 60 days? | in 2009 refers to year(careplans.START) = 2009; married patients refers to marital = 'M'; undergone a care plan for more than 60 days refers to SUBTRACT(careplans.STOP, careplans.START) > 60; | 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 |
synthea | Please provide the dates on which Elly Koss was immunized with the influenza seasonal injectable preservative-free vaccine. | date of immunization refers to immunizations.DATE; immunized with the influenza seasonal injectable preservative-free vaccine refers to immunizations.DESCRIPTION = 'Influenza seasonal injectable preservative free'; | 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' |
synthea | From 7/9/2010 to 10/29/2013, how many black patients were immunized with the meningococcal MCV4P vaccine? | From 7/9/2010 to 10/29/2013 refers to DATE between '2010-07-09' and '2013-10-29'; black patients refers to race = 'black'; immunized with the meningococcal MCV4P vaccine refers to immunizations.DESCRIPTION = 'meningococcal MCV4P'; | 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' |
synthea | Give me the immunization codes and dates on which Ms. Jacquelyn Shanahan was immunized with influenza seasonal injectable preservative-free vaccine. | immunization codes refers to immunizations.CODE; immunization dates refers to immunizations.DATE; immunized with influenza seasonal injectable preservative-free vaccine refers to immunizations.DESCRIPTION = 'Influenza seasonal injectable preservative free'; 4 consecutive years refers to 4 succeeding years; | 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' |
synthea | How long did Berry Keebler take the Acetaminophen 160 MG when he was admitted due to acute bronchitis? | how long = SUBTRACT(medications.STOP, medications.START); Acetaminophen 160 MG refers to medications.DESCRIPTION = 'Acetaminophen 160 MG'; acute bronchitis refers to medications.REASONDESCRIPTION = 'Acute bronchitis (disorder)'; | 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' |
synthea | In 2010, how many single patients took Nitrofurantoin 5 mg/ML [Furadantin] to cure cystitis? | in 2010 refers to substr(medications.START, 1, 4) = '2010' AND substr(medications.stop, 1, 4) = '2010'; Nitrofurantoin 5 mg/ML [Furadantin] refers to medications.DESCRIPTION = 'Nitrofurantoin 5 MG/ML [Furadantin]'; cystitis refers to medications.REASONDESCRIPTION = 'Cystitis'; | 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' |
synthea | Tell me the reason for Lavelle Vandervort's encounter on 11/20/2013? | reason for encounter refers to encounters.REASONDESCRIPTION; on 11/20/2013 refers to encounters.DATE = '2013-11-20'; | 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' |
synthea | From 1/9/2011 to 8/29/2012, how many German patients have their outpatient encounters? | From 1/9/2011 to 8/29/2012 refers to encounters.DATE between '2011-09-01' and '2012-08-29'; German patients refers to ethnicity = 'german'; outpatient encounters refers to encounters.DESCRIPTION = 'Outpatient Encounter'; | 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' |
synthea | What is the social security number and address of the patient who encountered viral sinusitis symptoms on 6/13/2008? | social security number refers to ssn; encountered viral sinusitis refers to encounters.REASONDESCRIPTION = 'Viral sinusitis (disorder)'; on 6/13/2008 refers to encounters.DATE = '2008-06-13'; | 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' |
synthea | 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. | reason refers to medications.REASONDESCRIPTION; name of the drug refers to medications.DESCRIPTION; duration of medication = SUBTRACT(julianday(medications.STOP, julianday(medications.START))); ecounter ID refers to encounters.ID; encounters.ID = '23c293ec-dbae-4a22-896e-f12cf3c8bac3'; if patients.deathdate is null then the patient is alive; if patients.deathdate is not null then the patient is not alive; | 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' |
synthea | How many patients with shellfish allergies died when they were under 12 years old? Please give their full names. | shellfish allergies refers to allergies.DESCRIPTION = 'Shellfish allergy'; died under 12 years old = DIVIDE(SUBTRACT(julianday(patients.deathdate), julianday(patients.birthdate)), 365) < 12; full names = first, last; | 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 |
synthea | How long was Mr. Major D'Amore prescribed with Amoxicillin 250 MG / Clavulanate 125 MG [Augmentin]? | how long = SUBTRACT(julianday(medications.STOP, julianday(medications.START))); Amoxicillin 250 MG / Clavulanate 125 MG [Augmentin] refers to medications.DESCRIPTION = 'Amoxicillin 250 MG / Clavulanate 125 MG [Augmentin]'; | 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' |
synthea | How many types of medication have been prescribed to Mr. Major D'Amore since his visit to the hospital? | types of medications refers to medications.DESCRIPTION; | 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' |
synthea | List out all the observation information collected for the patient named Bella Rolfson. | observation information refers to observations.DESCRIPTION AND observations.VALUE AND observations.UNITS; | 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' |
synthea | List out patient names with calcium deficiency. | patient names = first, last; calcium deficiency refers to observations.DESCRIPTION = 'Calcium' and observations.VALUE < 8.6; | 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 |
synthea | List out 5 most common conditions for underweight patient. | most common condition refers to MAX(COUNT(conditions.DESCRIPTION)); underweight patient refers to MIN(observations.VALUE WHERE observations.DESCRIPTION = 'Body Mass Index'); | 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 |
synthea | How many mothers have taken immunization during prenatal visit? | expecting mothers can be attributed to encounters.REASONDESCRIPTION = 'Normal pregnancy'; | 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 |
synthea | What care plans have been received by Mrs. Elly Koss during year 1970? | during year 1970 refers to substr(careplans.START, 1, 4) = '1970' and substr(careplans.STOP, 1, 4) = '1970'; | 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' |
synthea | What is the care plan, procedure, medication and the patient's full name for encounter 6f2e3935-b203-493e-a9c0-f23e847b9798? | car plan refers to careplans.DESCRIPTION; procedure refers to procedures.DESCRIPTION; medication refers to medications.DESCRIPTION; full name = first, last; encounter refers to encounters.ID; encounters.ID = '6f2e3935-b203-493e-a9c0-f23e847b9798'; | 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.PATIENT WHERE T2.ID = '6f2e3935-b203-493e-a9c0-f23e847b9798' |
synthea | How many male patients are diagnosed with hypertension as compared to female patients? | male refers to gender = 'M'; diagnosed with hypertension refers to conditions.DESCRIPTION = 'Hypertension'; female refers to gender = 'F'; number of male patients with hypertension = count(patient WHERE gender = 'M' AND conditions.DESCRIPTION = 'Hypertension'); number of female patients with hypertension = count(patient WHERE gender = 'F' AND conditions.DESCRIPTION = 'Hypertension'); | 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' |
synthea | How many unmarried women were checked for normal pregnancy? | unmarried refers to marital = 'S'; women refers to gender = 'F'; normal pregnancy refers to conditions.DESCRIPTION = 'normal pregnancy'; | 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' |
synthea | List out the procedure and medicine prescribed for drug overdose patients. | procedure refers to procedures.DESCRIPTION; medicine prescribed refers to medications.DESCRIPTION; drug overdose refers to encounters.REASONDESCRIPTION = 'Drug overdose'; | 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' |
synthea | What is the average body mass index for patients with higher total cholesterol? | average body mass index = DIVIDE(SUM(observations.VALUE), COUNT(PATIENT) WHERE observations.DESCRIPTION = 'Body Mass Index'); body mass index refers to observations.DESCRIPTION = 'Body Mass Index'; higher total cholesterol refers to observations.DESCRIPTION = 'Total Cholesterol' and observations.VALUE > = 200; | 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' |
synthea | What is the difference between average glucose reading for patients in the 20s and 50s? | sum(case when t2.DATE-t1.birthdate between 20 and 29 then t2.VALUE else 0 end)/count(case when t2.DATE-t1.birthdate between 20 and 29 then t2.PATIENT else null end)-sum(case when t2.DATE-t1.birthdate between 50 and 59 then t2.VALUE else 0 end)/count(case when t2.DATE-t1.birthdate between 50 and 59 then t2.PATIENT else null end) | 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('%J', T1.birthdate)) / 365) BETWEEN 50 AND 60 THEN T2.VALUE ELSE 0 END) / COUNT(CASE WHEN ROUND((strftime('%J', T2.DATE) - strftime('%J', T1.birthdate)) / 365) BETWEEN 50 AND 60 THEN T2.PATIENT END) AS difference FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Glucose' |
synthea | What is the percentage of the most common conditions for patients age 60 and above? | most common condition refers to MAX(COUNT(conditions.DESCRIPTION)); age 60 and above refers to SUBTRACT(conditions.START, birthdate) > 60; percentage = MULTIPLY(DIVIDE(SUM(patients.patient WHERE MAX(COUNT(conditions.DESCRIPTION)) AND SUBTRACT(conditions.START, birthdate) > 60))), COUNT(patients.patient WHERE MAX(COUNT(conditions.DESCRIPTION)), 10); | 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 T2.DESCRIPTION ORDER BY COUNT(T2.DESCRIPTION) DESC LIMIT 1 ) AS T3 INNER JOIN patients AS T4 ON T3.patient = T4.patient INNER JOIN conditions AS T5 ON T4.patient = T5.PATIENT WHERE ROUND((strftime('%J', T5.START) - strftime('%J', T4.birthdate)) / 365) > 60 |
synthea | Name the reason Walter Bahringer visited medical professionals in July 2009. | reason for visiting medical professionals refers to encounters.REASONDESCRIPTION; in July 2009 refers to substr(encounters.DATE, 1, 7) = '2009-07' ; | 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%' |
synthea | How old was Mr. Stacy Morar at the time of his first emergency room admission due to a drug overdose? | how old = SUBTRACT(MIN(encounters.DATE), patients.birthdate); his first emergency room admission refers to MIN(encounters.DATE); drug overdose refers to encounters.REASONDESCRIPTION = 'Drug overdose' ; | 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 |
synthea | What drug is administered more often to treat child attention deficit disorder? | drug that was administered refers to medications.DESCRIPTION; child attention deficit disorder refers to medications.REASONDESCRIPTION = 'Child attention deficit disorder'; | SELECT DESCRIPTION FROM medications WHERE REASONDESCRIPTION = 'Child attention deficit disorder' GROUP BY DESCRIPTION ORDER BY COUNT(DESCRIPTION) DESC LIMIT 1 |
synthea | Please include the full name of the patient who received a lung transplant. | full name = first, last; lung transplant refers to procedures.DESCRIPTION = 'Transplant of lung (procedure)'; | 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)' |
synthea | How many patients on average receive combined chemotherapy and radiation therapy procedures each year? | average = DIVIDE(COUNT(procedures.PATIENT), COUNT(substr(procedures.DATE, 1, 4))); combined chemotherapy and radiation therapy refers to procedures.DESCRIPTION = 'Combined chemotherapy and radiation therapy (procedure)'; | SELECT CAST(COUNT(PATIENT) AS REAL) / COUNT(DISTINCT strftime('%Y', DATE)) FROM procedures WHERE DESCRIPTION = 'Combined chemotherapy and radiation therapy (procedure)' |
synthea | Indicate the time frame and details of the most recent care plan suggested to Jacquelyn Shanahan. | time frame = SUBTRACT(JULIANDAY(careplans.STOP), JULIANDAY(careplans.START)); details of care plan refers to careplans.DESCRIPTION; most recent care plan refers to MIN(careplans.STAR); | 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 |
synthea | Identify the allergy period for Isadora Moen and what triggered it. | allergy period = SUBTRACT(allergies.START, allergies.STOP); what triggered the allergy refers to allergies.DESCRIPTION; | 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' |
synthea | How old was Mrs. Laronda Bernier at the time of her most recent medical encounter? | how old = SUBTRACT(MIN(encounters.DATE), patients.birthdate); most recent medical encounter refers to MIN(encounters.DATE); | 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 |
synthea | What condition forced Mrs. Joye Homenick to seek medical attention in 2017? | condition refers to conditions.DESCRIPTION; in 2017 refers to substr(conditions.START, 1, 4) = '2017'; | 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' |
synthea | When did Mrs. Joye Homenick receive her most recent influenza seasonal vaccine? | when a patient received her most recent vaccine refers to MAX(immunications.DATE); influenza seasonal vaccine refers to immunizations.DESCRIPTION = 'Influenza seasonal injectable preservative free'; | 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 |
synthea | How long did Elly Koss have to take Acetaminophen 160 MG? | how long = SUBTRACT(julianday(medications.stop), julianday(medications.START)); Acetaminophen 160 MG refers to medications.DESCRIPTION = 'Acetaminophen 160 MG'; | 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' |
synthea | How many patients sought medical attention due to a second-degree burn? Describe the care plan recommended to them. | second-degree burn refers to encounters.REASONDESCRIPTION = 'Second degree burn'; ; | 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' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.