db_id stringclasses 68 values | question stringlengths 24 325 | evidence stringlengths 0 580 | SQL stringlengths 23 728 |
|---|---|---|---|
synthea | The highest Systolic Blood Pressure was observed in which patient? Please give his or her full name. | the highest Systolic Blood Pressure refers to MAX(DESCRIPTION = 'Systolic Blood Pressure') from observations; full name refers to first, last; | SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T2.VALUE = ( SELECT MAX(VALUE) FROM observations WHERE description = 'Systolic Blood Pressure' ) LIMIT 1 |
synthea | Please list all the medication that are prescribed to Elly Koss. | medication that are prescribed refers to DESCRIPTION from medications; | SELECT DISTINCT T2.description FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' |
synthea | Why did Elly Koss need to take Acetaminophen? | why need to take Acetaminophen refers to REASONDESCRIPTION where DESCRIPTION like 'Acetaminophen%' from medications; | SELECT T2.REASONDESCRIPTION FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description LIKE 'Acetaminophen%' |
synthea | What medication did Elly Koss take when she had Streptococcal sore throat? | medication refers to DESCRIPTION from medications; Streptococcal sore throat refers to REASONDESCRIPTION like 'Streptococcal sore throat%'; | SELECT T2.description FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.reasondescription = 'Streptococcal sore throat (disorder)' |
synthea | Please give the full names of all the patients who had been prescribed with Acetaminophen. | full name refers to first, last; prescribed with Acetaminophen refer to DESCRIPTION like 'Acetaminophen%' from medications; | SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.description LIKE 'Acetaminophen%' |
synthea | What was the condition of Elly Koss on 2009/1/8? | condition on 2009/1/8 refers to DESCRIPTION from conditions where START = '2009-01-08'; | SELECT T2.description FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.START = '2009-01-08' |
synthea | Among all the patients who once had cystitis, what was the percentage of them being married? | DIVIDE(COUNT(marital = 'M'), COUNT(patient)) as percentage where DESCRIPTION = 'Cystitis';
| SELECT CAST(SUM(CASE WHEN T1.marital = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T2.description = 'Cystitis' |
synthea | Give the body height status of Mr. Vincent Wyman on 2010/8/2. | body height status refers to DESCRIPTION = 'Body Height' from observations; on 2010/8/2 refers to DATE = '2010-08-02'; | SELECT T2.description, T2.VALUE, T2.units FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mr.' AND T1.first = 'Vincent' AND T1.last = 'Wyman' AND T2.date = '2010-08-02' AND T2.description = 'Body Height' |
synthea | How many care plans has Mrs. Norman Berge taken? | SELECT COUNT(T2.PATIENT) FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Norman' AND T1.last = 'Berge' | |
synthea | Why did Mrs. Annabelle Pouros take leucovorin 100 mg injection on 1970/12/19? State the reason. | reason why take leucovorin 100 mg injection refers to REASONDESCRIPTION where DESCRIPTION = 'Leucovorin 100 MG Injection'; on 1970/12/19 refers to START = '1970-12-19'; | SELECT T2.reasondescription FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Annabelle' AND T1.last = 'Pouros' AND T2.start = '1970-12-19' AND T2.description = 'Leucovorin 100 MG Injection' |
synthea | What is the prevalence percentage of condition no. 64859006? | condition no. 64859006 refers to conditions where CODE = '64859006'; | SELECT DISTINCT T1."PREVALENCE PERCENTAGE" FROM all_prevalences AS T1 INNER JOIN conditions AS T2 ON lower(T1.ITEM) = lower(T2.DESCRIPTION) WHERE T2.code = '64859006' |
synthea | State the prevalence rate of condition no. 368581000119106. | condition no. 368581000119106 refers to conditions where CODE = '368581000119106'; | SELECT DISTINCT T1."PREVALENCE RATE" FROM all_prevalences AS T1 INNER JOIN conditions AS T2 ON lower(T1.ITEM) = lower(T2.DESCRIPTION) WHERE T2.code = '368581000119106' |
synthea | Give the procedure description of Ms. Jacquelyn Shanahan on 2009/8/9. | on 2009/8/9 refers to DATE = '2009-08-09'; | SELECT DISTINCT T2.description FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Ms.' AND T1.first = 'Jacquelyn' AND T1.last = 'Shanahan' AND T2.DATE = '2009-08-09' |
synthea | Give the number of claims did Ms. Abbie Cole have in the year of 2011. | in the year of 2011 refers to BILLABLEPERIOD between '2010-12-31' and '2012-01-01'; | SELECT COUNT(T2.BILLABLEPERIOD) FROM patients AS T1 INNER JOIN claims AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Ms.' AND T1.first = 'Abbie' AND T1.last = 'Cole' AND T2.BILLABLEPERIOD BETWEEN '2010-12-31' AND '2012-01-01' |
synthea | How many allergies does Mrs. Saundra Monahan have? | allergies refer to PATIENT from allergies; | SELECT COUNT(DISTINCT T2.code) FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Saundra' AND T1.last = 'Monahan' |
synthea | Provide the name of the patient who had a claim on 1947/9/11. | name of the patient implies full name and refers to first, last; on 1947/9/11 refers to BILLABLEPERIOD = '1947-09-11'; | SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN claims AS T2 ON T1.patient = T2.PATIENT WHERE T2.billableperiod = '1947-09-11' |
synthea | Describe the encounter of Mr. Hubert Baumbach on 2008/10/25. | encounter refers to DESCRIPTION from encounters; on 2008/10/25 refers to DATE = '2008-10-25'; | SELECT T2.description FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mr.' AND T1.first = 'Hubert' AND T1.last = 'Baumbach' AND T2.date = '2008-10-25' |
synthea | What kind of condition did Keven Kuhn have from 2016/9/24 to 2016/10/10? Describe the condition. | kind of condition refers to DESCRIPTION from conditions; from 2016/9/24 to 2016/10/10 refers to START = '2016-09-24' and STOP = '2016-10-10'; | SELECT T2.description FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Keven' AND T1.last = 'Kuhn' AND T2.start = '2016-09-24' AND T2.stop = '2016-10-10' |
synthea | When did Mrs. Ira Deckow have the standard pregnancy test? | standard pregnancy test refers to DESCRIPTION = 'Standard pregnancy test' from procedures; | SELECT T2.date FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Ira' AND T1.last = 'Deckow' AND T2.description = 'Standard pregnancy test' |
synthea | How many patients are allergic to eggs? | allergic to eggs refer to DESCRIPTION = 'Allergy to eggs' from allergies; | SELECT COUNT(PATIENT) FROM allergies WHERE DESCRIPTION = 'Allergy to eggs' |
synthea | What is the id of the patient whose hypertension started most recently? | id of the patient refers to PATIENT from conditions; hypertension refers to DESCRIPTION = 'Hypertension'; most recently refers to MAX(START); | SELECT PATIENT FROM conditions WHERE START = ( SELECT MAX(START) FROM conditions WHERE DESCRIPTION = 'Hypertension' ) |
synthea | What is the most common allergy among patients? | the most common allergy refers to MAX(COUNT(DESCRIPTION)) from allergies; | SELECT DESCRIPTION FROM allergies GROUP BY DESCRIPTION ORDER BY COUNT(DESCRIPTION) DESC LIMIT 1 |
synthea | What is/are the ids of the tallest patient/s? | id of the tallest patient/s refers to PATIENT from observations where MAX(DESCRIPTION = 'Body Height'); | SELECT PATIENT FROM observations WHERE DESCRIPTION = 'Body Height' AND UNITS = 'cm' ORDER BY VALUE DESC LIMIT 1 |
synthea | What is the most common condition among the female Americans? | the most common condition refers to MAX(COUNT(DESCRIPTION)); among the female Americans refer to PATIENT where gender = 'F' and ethnicity = 'american'; | SELECT T2.DESCRIPTION FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.gender = 'F' AND T1.ethnicity = 'american' GROUP BY T2.DESCRIPTION ORDER BY COUNT(T2.DESCRIPTION) DESC LIMIT 1 |
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 | 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 | 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 | 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 | 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 | 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 | 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 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 | 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 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 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 | 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 | 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 | 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 | 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 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 | 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 | 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 | 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 | State description of medication taken by Joe Homenick. | description of medication refers to medications.DESCRIPTION; | SELECT T1.DESCRIPTION FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.first = 'Joye' AND T2.last = 'Homenick' |
synthea | What is the start date of the care plan of the patient whose maiden name is Adams? | start date of the care plan refers to careplans.START; | SELECT DISTINCT T1.START FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.maiden = 'Adams' |
synthea | Among the male patients, who has the earliest starting date of the care plan? | male patients refers to gender = 'M'; earliest starting date of the care plan refers to MIN(careplans.START); | SELECT T2.first, T2.last FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.gender = 'M' ORDER BY T1.START LIMIT 1 |
synthea | State the description of the reason why Angelo Buckridge needs the care plan. | description of the reason of the care plan refers to careplans.REASONDESCRIPTION; | SELECT DISTINCT T1.REASONDESCRIPTION FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.first = 'Angelo' AND T2.last = 'Buckridge' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.