query
stringlengths
24
325
positive
stringlengths
1
580
negative_1
stringlengths
6
580
negative_2
stringlengths
1
576
negative_3
stringlengths
1
576
negative_4
stringlengths
1
580
negative_5
stringlengths
1
580
negative_6
stringlengths
1
580
negative_7
stringlengths
5
576
negative_8
stringlengths
1
576
negative_9
stringlengths
1
580
negative_10
stringlengths
1
580
Please list the names of all the products ordered in order CA-2011-112326 in superstores in the center.
names of all the products refers to "Product Name"; order CA-2011-112326 refers to "Order ID" = 'CA-2011-112326'; in the center refers to Region = 'Central';
ordered by Becky Martin refers to "Customer Name" = 'Becky Martin'; Region = 'Central'; products refers to "Product Name"
East superstore refers to Region = 'East'; West superstore refers to Region = 'West'; difference = subtract(sum(Sales) when Region = 'East', sum(Sales) when Region = 'West')
"Telescoping Adjustable Floor Lamp" is a "Product Name"; consumers refers to Segment = 'Consumer';
Xerox 1952 is a "Product Name"; ordered by Aimee Bixby refers to "Customer Name" = 'Aimee Bixby'; on 2014/9/10 refers to "Order Date" = date('2014-09-10'); total cost refers to SUTRACT(MULTIPLY(DIVIDE(Sales, SUTRACT(1, discount)), Quantity), Profit)
Aimee Bixby made refers to "Customer Name" = 'Aimee Bixby';
Indiana refers to State = 'Indiana'; no discount refers to Discount = 0; percentage = divide(sum(Discount) when Discount = 0, count(Discount)) as percentage
Plantronics Single Ear Headset' is the "Product Name"; name refers to "Customer Name";
Who is the customer refers to Customer Name; shipped on March 5, 2013 refers to "Ship Date" = '2013-03-05'; eastern region refers to Region = 'East'
product named Xerox 23 refers to "Product Name" = 'Xerox 23'; customers refers to "Customer Name"
name of customers refers to "Customer Name"; bought exactly 8 items refers to Quantity = 8
Among the orders with sales value of no less than 5,000 in west superstore, how many were bought by the customers in California?
customers in California refers to State = 'California'; orders with sales value of no less than 5,000 refers to Sales > = 5,000
furniture refers to Category = 'Furniture'; shipped through first class in 2013 refers to ship mode = 'first class' and "Ship Date" = '2013%'; percentage = divide(sum(Order ID) when Category = 'Furniture' and "Ship Date" = '2013%', sum(Order ID)) as percentage
customer live in Texas refers to State = 'Texas'
furniture products refers to Category = 'Furnitures'; in the year 2016 refers to "Order Date" BETWEEN '2016-01-01' AND '2016-12-31'
"Memorix Froggy Flash Drive 8 GB" is the "Product Name"
office supplies products refers to Category = 'Office Supplies'; central refers to Region = 'Central'; south superstore refers to Region = 'South'; percentage = divide(SUM(Product ID where Category = 'Office Supplies'), count(Product ID)) * 100 where Region = 'Central' OR Region = 'South'
caused a loss to the company refers to Profit < 0
Who refers to "Customer Name"
shipment duration = subtract("Ship Date", "Order Date"); order number CA-2011-134103 refers to "Order ID" = 'CA-2011-134103'
at least 10 goods refers to Quantity > = 14; Cardinal EasyOpen D-Ring Binders refers to "Product Name"; customers in Chicago refers to City = 'Chicago'
slowest shipping speed refers to "Ship Mode" = 'Standard Class'
Calculate the total cost of the orders by Brad Thomas in 2016.
Brad Thomas is the "Customer Name"; in 2016 refers to strftime('%Y', "Order Date") = '2016'; total cost refers to SUM(SUTRACT(MULTIPLY(DIVIDE(Sales, SUTRACT(1, discount)), Quantity), Profit))
Logitech G600 MMO Gaming Mouse refers to "Product Name"; highest total cost refers to MAX(SUTRACT(MULTIPLY(DIVIDE(Sales, SUTRACT(1, discount)), Quantity), Profit))
highest profit refers to MAX(profit); Region = 'East'
highest profit refers to max(Profit); Houston, Texas refers to City = 'Houston' and State = 'Texas'
'Hon Valutask Swivel Chairs' is the "Product Name"
Region = 'West'
office supplies products refers to Category = 'Office Supplies'; central refers to Region = 'Central'; south superstore refers to Region = 'South'; percentage = divide(SUM(Product ID where Category = 'Office Supplies'), count(Product ID)) * 100 where Region = 'Central' OR Region = 'South'
name of all the products refers to Product Name; order quantities greater than or equal to 10 refers to COUNT("Order ID") > = 10; slowest delivery refers to "Ship Mode" = 'Standard Class'
live in Texas refers to State = 'Texas'; live in Indiana refers to State = 'Indiana'; Ratio = divide(sum(State = 'Texas'), sum(State = 'Indiana'))
"Telescoping Adjustable Floor Lamp" is a product name; names of all the customers refers to "Customer Name"
made by Aimee Bixby refers to "Customer Name" = 'Aimee Bixby';
Provide the order ID of Frank Olsen of the South region.
Frank Olsen' is the "Customer Name"; Region = 'South'
shipment duration = subtract("Ship Date", "Order Date"); order number CA-2011-134103 refers to "Order ID" = 'CA-2011-134103'
name of all products refers to Product Name; Cindy Stewart is the Customer Name;
name of the customers refers to Customer_Name; in 2015 refers to "Order Date" BETWEEN '2015-01-01' AND '2015-12-31'; more than 3 times refers to count(Order_ID) > 3
product named Xerox 23 refers to "Product Name" = 'Xerox 23'; customers refers to "Customer Name"
Anne McFarland' is the "Customer Name"; Western store refers to west_superstore; products refers to "Product Name"
furniture products refers to Category = 'Furniture'; shipped by standard class refers to "Ship Mode" = 'Standard Class'
Xerox 1952 is a "Product Name"; ordered by Aimee Bixby refers to "Customer Name" = 'Aimee Bixby'; on 2014/9/10 refers to "Order Date" = date('2014-09-10'); total cost refers to SUTRACT(MULTIPLY(DIVIDE(Sales, SUTRACT(1, discount)), Quantity), Profit)
Xerox 1952 is a "Product Name"; ordered by Aimee Bixby refers to "Customer Name" = 'Aimee Bixby'; on 2014/9/10 refers to "Order Date" = date('2014-09-10');
Who is the customer refers to Customer Name; shipped on March 5, 2013 refers to "Ship Date" = '2013-03-05'; eastern region refers to Region = 'East'
Ann Chong' is the "Customer Name"; Region = 'Central'
How many art products were ordered in 2013 in the east superstore?
ordered in 2013 refers to strftime('%Y', "Order Date") = '2013'; art products refers to "Sub-Category" = 'Art'
names of the products refers to Product Name; shipped in March 2013 refers to "Ship Date" = '2013-03%'
has the highest original price refers to MAX(DIVIDE(Sales, SUTRACT(1, discount))); name of the product refers to "Product Name"
names of all the products refers to "Product Name"; order CA-2011-112326 refers to "Order ID" = 'CA-2011-112326'; in the center refers to Region = 'Central';
furniture products refers to Category = 'Furnitures'; in the year 2016 refers to "Order Date" BETWEEN '2016-01-01' AND '2016-12-31'
made the highest sales refers to MAX(Sales)
name of customers refers to "Customer Name"; bought exactly 8 items refers to Quantity = 8
highest profit refers to max(Profit); Houston, Texas refers to City = 'Houston' and State = 'Texas'
Who is the customer refers to Customer Name; shipped on March 5, 2013 refers to "Ship Date" = '2013-03-05'; eastern region refers to Region = 'East'
highest profit refers to MAX(profit); Region = 'East'
Brad Thomas is the "Customer Name"; in 2016 refers to strftime('%Y', "Order Date") = '2016'; total cost refers to SUM(SUTRACT(MULTIPLY(DIVIDE(Sales, SUTRACT(1, discount)), Quantity), Profit))
What is the shipment duration for order number CA-2011-134103?
shipment duration = subtract("Ship Date", "Order Date"); order number CA-2011-134103 refers to "Order ID" = 'CA-2011-134103'
Patrick Gardner is the "Customer Name"; Region = 'Central'
sales greater than the 88% of the average sales of all orders refers to Sales > avg(Sales) * 0.88; South region refers to south_superstore
East superstore refers to Region = 'East'; West superstore refers to Region = 'West'; difference = subtract(sum(Sales) when Region = 'East', sum(Sales) when Region = 'West')
furniture products refers to Category = 'Furniture'; shipped by standard class refers to "Ship Mode" = 'Standard Class'
name of customers refers to "Customer Name"; bought exactly 8 items refers to Quantity = 8
names of all the products refers to "Product Name"; order CA-2011-112326 refers to "Order ID" = 'CA-2011-112326'; in the center refers to Region = 'Central';
ordered by Alejandro Grove refers to "Customer Name" = 'Alejandro Grove'; names of the products refers to "Product Name"
Frank Olsen' is the "Customer Name"; Region = 'South'
Logitech G600 MMO Gaming Mouse refers to "Product Name"; highest total cost refers to MAX(SUTRACT(MULTIPLY(DIVIDE(Sales, SUTRACT(1, discount)), Quantity), Profit))
Xerox 1952 is a "Product Name"; ordered by Aimee Bixby refers to "Customer Name" = 'Aimee Bixby'; on 2014/9/10 refers to "Order Date" = date('2014-09-10'); total cost refers to SUTRACT(MULTIPLY(DIVIDE(Sales, SUTRACT(1, discount)), Quantity), Profit)
What is the order ID of the security-Tint Envelopes product ordered on June 3, 2013, in the Central region?
Security-Tint Envelopes' refers to "Product Name"; ordered on June 3, 2013 refers to "Order Date" = '2013-06-03'
has the highest original price refers to MAX(DIVIDE(Sales, SUTRACT(1, discount))); name of the product refers to "Product Name"
name of all the products refers to Product Name; order quantities greater than or equal to 10 refers to COUNT("Order ID") > = 10; slowest delivery refers to "Ship Mode" = 'Standard Class'
Bush Mission Pointe Library' is the "Product Name";
Indiana refers to State = 'Indiana'; no discount refers to Discount = 0; percentage = divide(sum(Discount) when Discount = 0, count(Discount)) as percentage
Aimee Bixby made refers to "Customer Name" = 'Aimee Bixby';
highest profit refers to max(Profit)
received the highest discount refers to MAX(discount); customer refers to "Customer Name"
product named Xerox 23 refers to "Product Name" = 'Xerox 23'; customers refers to "Customer Name"
art product refers to Sub-Category = 'Art'; the most refers to max(order_number)
name of the product refers to "Product Name"
How many orders were made by Maxwell Schwartz in 2015?
Maxwell Schwartz' is the "Customer Name"; in 2015 refers to strftime('%Y', "Order Date") = '2015';
name of customers refers to "Customer Name"; bought exactly 8 items refers to Quantity = 8
Sauder Camden County Barrister Bookcase, Planked Cherry Finish' refers to "Product Name"
Plantronics Single Ear Headset' is the "Product Name"; name refers to "Customer Name";
Frank Olsen' is the "Customer Name"; Region = 'South'
Lexmark X 9575 Professional All-in-One Color Printer' is the "Product Name"
names of the products refers to Product Name; shipped in March 2013 refers to "Ship Date" = '2013-03%'
name of all products refers to Product Name; Cindy Stewart is the Customer Name;
name of the product refers to "Product Name"
furniture refers to Category = 'Furniture'; shipped through first class in 2013 refers to ship mode = 'first class' and "Ship Date" = '2013%'; percentage = divide(sum(Order ID) when Category = 'Furniture' and "Ship Date" = '2013%', sum(Order ID)) as percentage
Who refers to "Customer Name"
Who is the customer with an order shipped on March 5, 2013, in the eastern region?
Who is the customer refers to Customer Name; shipped on March 5, 2013 refers to "Ship Date" = '2013-03-05'; eastern region refers to Region = 'East'
highest profit refers to max(Profit); Houston, Texas refers to City = 'Houston' and State = 'Texas'
on April 26, 2018 refers to "Order Date" = date('2018-04-26'); shipped by April 27, 2018 refers to "Ship Date" = date('2018-04-27');
shipment duration = subtract("Ship Date", "Order Date"); order number CA-2011-134103 refers to "Order ID" = 'CA-2011-134103'
Patrick Gardner is the "Customer Name"; Region = 'Central'
Xerox 1952 is a "Product Name"; ordered by Aimee Bixby refers to "Customer Name" = 'Aimee Bixby'; on 2014/9/10 refers to "Order Date" = date('2014-09-10'); total cost refers to SUTRACT(MULTIPLY(DIVIDE(Sales, SUTRACT(1, discount)), Quantity), Profit)
art product refers to Sub-Category = 'Art'; the most refers to max(order_number)
names of the products refers to "Product Name";  profit greater than 98% of the average profit refers to Profit > MULTIPLY(AVG(Profit), 0.98)
highest profit refers to MAX(profit); Region = 'East'
customer live in Texas refers to State = 'Texas'
Cisco SPA301' is the "Product Name"; all regions refers to central_superstore, south_superstore, west_superstore, east_superstore
Among the orders made by Aimee Bixby, how many of them included at least one kind of product under the category "Furniture"?
made by Aimee Bixby refers to "Customer Name" = 'Aimee Bixby';
Logitech G600 MMO Gaming Mouse refers to "Product Name"; highest total cost refers to MAX(SUTRACT(MULTIPLY(DIVIDE(Sales, SUTRACT(1, discount)), Quantity), Profit))
ordered by Alejandro Grove refers to "Customer Name" = 'Alejandro Grove'; names of the products refers to "Product Name"
customer refers to "Customer Name"; “Hon Multipurpose Stacking Arm Chairs" is the "Product Name";
sales greater than the 88% of the average sales of all orders refers to Sales > avg(Sales) * 0.88; South region refers to south_superstore
shipment duration = subtract("Ship Date", "Order Date"); order number CA-2011-134103 refers to "Order ID" = 'CA-2011-134103'
"Memorix Froggy Flash Drive 8 GB" is the "Product Name"
Ann Chong' is the "Customer Name"; Region = 'Central'
Anne McFarland' is the "Customer Name"; Western store refers to west_superstore; products refers to "Product Name"
names of the products refers to Product Name; shipped in March 2013 refers to "Ship Date" = '2013-03%'
name of the product refers to "Product Name"
Calculate the total profit by Cisco SPA301 for all regions.
Cisco SPA301' is the "Product Name"; all regions refers to central_superstore, south_superstore, west_superstore, east_superstore
'O'Sullivan Cherrywood Estates Traditional Bookcase' is the "Product Name"; shipping mode with the fastest delivery speed refers to "Ship Mode" = 'First Class'
caused a loss to the company refers to Profit < 0
Xerox 1952 is a "Product Name"; ordered by Aimee Bixby refers to "Customer Name" = 'Aimee Bixby'; on 2014/9/10 refers to "Order Date" = date('2014-09-10');
Anne McFarland' is the "Customer Name"; Western store refers to west_superstore; products refers to "Product Name"
Indiana refers to State = 'Indiana'; no discount refers to Discount = 0; percentage = divide(sum(Discount) when Discount = 0, count(Discount)) as percentage
office supply refers to Category = 'Office Supplies'
ordered in 2013 refers to strftime('%Y', "Order Date") = '2013'; art products refers to "Sub-Category" = 'Art'
received the highest discount refers to MAX(discount); customer refers to "Customer Name"
orders from 2016 refers to "Order Date" = '2016%'; product refers to "Product Name"; lowest profit refers to min(Profit)
Who is the customer refers to Customer Name; shipped on March 5, 2013 refers to "Ship Date" = '2013-03-05'; eastern region refers to Region = 'East'
How many furniture products had been shipped by standard class in the East superstore?
furniture products refers to Category = 'Furniture'; shipped by standard class refers to "Ship Mode" = 'Standard Class'
name of customers refers to "Customer Name"; bought exactly 8 items refers to Quantity = 8
Indiana refers to State = 'Indiana'; no discount refers to Discount = 0; percentage = divide(sum(Discount) when Discount = 0, count(Discount)) as percentage
'O'Sullivan Cherrywood Estates Traditional Bookcase' is the "Product Name"; shipping mode with the fastest delivery speed refers to "Ship Mode" = 'First Class'
product refers to "Product Name"
East superstore refers to Region = 'East'; West superstore refers to Region = 'West'; difference = subtract(sum(Sales) when Region = 'East', sum(Sales) when Region = 'West')
on April 26, 2018 refers to "Order Date" = date('2018-04-26'); shipped by April 27, 2018 refers to "Ship Date" = date('2018-04-27');
Aimee Bixby made refers to "Customer Name" = 'Aimee Bixby';
caused a loss to the company refers to Profit < 0
Anne McFarland' is the "Customer Name"; Western store refers to west_superstore; products refers to "Product Name"
ordered by Alejandro Grove refers to "Customer Name" = 'Alejandro Grove'; names of the products refers to "Product Name"
Provide the names of the products with a profit greater than 98% of the average profit of all products in the East region.
names of the products refers to "Product Name";  profit greater than 98% of the average profit refers to Profit > MULTIPLY(AVG(Profit), 0.98)
has the highest original price refers to MAX(DIVIDE(Sales, SUTRACT(1, discount))); name of the product refers to "Product Name"
"Telescoping Adjustable Floor Lamp" is a product name; names of all the customers refers to "Customer Name"
shipped on 3/25/2015 refers to "Ship Date" = Date('2015-03-25');
Lexmark X 9575 Professional All-in-One Color Printer' is the "Product Name"
name of all the products refers to Product Name; order quantities greater than or equal to 10 refers to COUNT("Order ID") > = 10; slowest delivery refers to "Ship Mode" = 'Standard Class'
Cisco SPA301' is the "Product Name"; all regions refers to central_superstore, south_superstore, west_superstore, east_superstore
office supply refers to Category = 'Office Supplies'
ordered in 2013 refers to strftime('%Y', "Order Date") = '2013'; art products refers to "Sub-Category" = 'Art'
names of all the products refers to "Product Name"; order CA-2011-112326 refers to "Order ID" = 'CA-2011-112326'; in the center refers to Region = 'Central';
Indiana refers to State = 'Indiana'; no discount refers to Discount = 0; percentage = divide(sum(Discount) when Discount = 0, count(Discount)) as percentage
Among the products under the office supplies category, what is the product that made the highest sales in the Central region?
made the highest sales refers to MAX(Sales)
ordered by Alejandro Grove refers to "Customer Name" = 'Alejandro Grove'; names of the products refers to "Product Name"
at least 10 goods refers to Quantity > = 14; Cardinal EasyOpen D-Ring Binders refers to "Product Name"; customers in Chicago refers to City = 'Chicago'
Region = 'West'
customer live in Texas refers to State = 'Texas'
slowest shipping speed refers to "Ship Mode" = 'Standard Class'
Sauder Camden County Barrister Bookcase, Planked Cherry Finish' refers to "Product Name"
names of the products refers to Product Name; shipped in March 2013 refers to "Ship Date" = '2013-03%'
Aimee Bixby made refers to "Customer Name" = 'Aimee Bixby';
'Hon Valutask Swivel Chairs' is the "Product Name"
"Memorix Froggy Flash Drive 8 GB" is the "Product Name"
Among the patients who have been using Penicillin V Potassium 250 MG, what percentage of patients are female?
Penicillin V Potassium 250 MG refers to medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'; percentage = MULTIPLY(DIVIDE(patients.patient WHERE gender = 'F'), COUNT(patients.patient) WHERE medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'), 100) female refers to gender = 'F';
care plans refer to DESCRIPTION from careplans; secondary malignant neoplasm of the colon refers to conditions where DESCRIPTION = 'Secondary malignant neoplasm of colon';
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION = 'Cystitis';
full name = first, last; Irish refers to ethnicity = 'irish'; prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions = OCCURRENCES > (AVG(MULTIPLY(all_prevalences.OCCURRENCES, 0.96)));
Ibuprofen 200mg Oral Tablet refers to DESCRIPTION = 'Ibuprofen 200 MG Oral Tablet' from medications; started in 2016 refers to START like '2016%'; Dominican patients refer to ethnicity = 'dominican'; stopped taking the medicine after exactly one month refers to SUBTRACT(strftime('%m', STOP), strftime('%m', START)) = 1;
expecting mothers can be attributed to encounters.REASONDESCRIPTION = 'Normal pregnancy';
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';
female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
immunized with meningococcal MCV4P refers to DESCRIPTION = 'meningococcal MCV4P' from immunizations; viral sinusitis disorder refers to DESCRIPTION = 'Viral sinusitis (disorder)' from conditions;
procedures refer to DESCRIPTION from procedures;
medicine prescribed refers to DESCRIPTION from medications; social security number 999-94-3751 refers to ssn = '999-94-3751';
Among the patients with viral sinusitis condition, which patient's gender is most affected? Provide the number for each respectively.
viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)'; gender that is most affected refers to MAX(COUNT(gender WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder)'));
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';
how long the allergies last = SUBTRACT(allergies.STOP, allergies.START); kind of allergy refers to allergies.DESCRIPTION;
body weight VALUE and UNITS where DESCRIPTION = 'Body Weight' from observations;
description of medication refers to medications.DESCRIPTION;
between 2010 and 2017 refers to substr(encounters.DATE, 1, 4) between '2010' and '2017'; percentage = MULTIPLY(DIVIDE(COUNT(encounters.ID WHERE DESCRIPTION = 'Prenatal visit'), count(encounters.ID)), 1.0); prenatal visits refers to encounters.DESCRIPTION = 'Prenatal visit';
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION = 'Cystitis';
encountered normal pregnancy refers to encounters where REASONDESCRIPTION = 'Normal pregnancy';
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');
on 2009/8/9 refers to DATE = '2009-08-09';
cystitis refers to conditions where DESCRIPTION = 'Cystitis';
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;
on 2009/8/9 refers to DATE = '2009-08-09';
procedures refer to DESCRIPTION from procedures; medications refers to DESCRIPTION from medications; third-degree burn refers to conditions where DESCRIPTION = 'Third degree burn';
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;
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);
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';
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';
full name = first, last; Irish refers to ethnicity = 'irish'; prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions = OCCURRENCES > (AVG(MULTIPLY(all_prevalences.OCCURRENCES, 0.96)));
start of the care plan refers to careplans.START; alive patients refers to deathdate is null;
difference = SUBTRACT(patients.patient WHERE marital = 'M'), COUNT(patients.patient WHERE marital = 'S') WHERE conditions.DESCRIPTION = 'Diabetes'); married patients refers to marital = 'M'; single patients refers to marital = 'S'; diabetes refers to conditions.DESCRIPTION = 'Diabetes';
conditions refer to DESCRIPTION from conditions;
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';
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';
procedures refer to DESCRIPTION from procedures; medications refers to DESCRIPTION from medications; third-degree burn refers to conditions where DESCRIPTION = 'Third degree burn';
second-degree burn refers to encounters.REASONDESCRIPTION = 'Second degree burn'; ;
condition refers to conditions.DESCRIPTION; in 2017 refers to substr(conditions.START, 1, 4) = '2017';
stop date of the care plan refers to careplans.STOP; dead patients refers to deathdate is not null;
female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
procedures refer to DESCRIPTION from procedures;
viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)'; gender that is most affected refers to MAX(COUNT(gender WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder)'));
conditions refer to DESCRIPTION from conditions;
immunized with meningococcal MCV4P refers to DESCRIPTION = 'meningococcal MCV4P' from immunizations; viral sinusitis disorder refers to DESCRIPTION = 'Viral sinusitis (disorder)' from conditions;
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';
social security number refers to ssn; ssn = '999-15-3685';
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';
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';
DIVIDE(SUM(VALUE), COUNT(VALUE)) WHERE DESCRIPTION = 'Body Weight';
difference = SUBTRACT(patients.patient WHERE marital = 'M'), COUNT(patients.patient WHERE marital = 'S') WHERE conditions.DESCRIPTION = 'Diabetes'); married patients refers to marital = 'M'; single patients refers to marital = 'S'; diabetes refers to conditions.DESCRIPTION = 'Diabetes';
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');
full name = first, last; otitis media refers to conditions.DESCRIPTION = 'Otitis media';
allergic to eggs refer to DESCRIPTION = 'Allergy to eggs' from allergies;
the highest Systolic Blood Pressure refers to MAX(DESCRIPTION = 'Systolic Blood Pressure') from observations;
patient names = first, last; calcium deficiency refers to observations.DESCRIPTION = 'Calcium' and observations.VALUE < 8.6;
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';
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';
born in Pittsfield MA US refers to birthplace = 'Pittsfield MA US';
patients with prediabetes refer to PATIENT from conditions where DESCRIPTION = 'Prediabetes'; female refers to gender = 'F';
how long the allergies last = SUBTRACT(allergies.STOP, allergies.START); kind of allergy refers to allergies.DESCRIPTION;
allergies refer to PATIENT from allergies;
body height status refers to DESCRIPTION = 'Body Height' from observations; on 2010/8/2 refers to DATE = '2010-08-02';
full name refers to first, last; Yaz 28 Day Pack refers to DESCRIPTION = 'Yaz 28 Day Pack' from medications; started taking in 2011 refers to START like '2011%';
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;
encountered normal pregnancy refers to encounters where REASONDESCRIPTION = 'Normal pregnancy';
medical encounter ids careplans.ID; born in Pembroke MA US refers to birthplace = 'Pembroke MA US';
List down the first name of patients who encountered normal pregnancy.
encountered normal pregnancy refers to encounters where REASONDESCRIPTION = 'Normal pregnancy';
description of the reason of the care plan refers to careplans.REASONDESCRIPTION;
start of the care plan refers to careplans.START; alive patients refers to deathdate is null;
body height status refers to DESCRIPTION = 'Body Height' from observations; on 2010/8/2 refers to DATE = '2010-08-02';
cystitis refers to conditions where DESCRIPTION = 'Cystitis';
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';
diseases started on 9th May 2014 refer to DESCRIPTION from conditions where START = '5/9/2014';
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;
procedures refer to DESCRIPTION from procedures; medications refers to DESCRIPTION from medications; third-degree burn refers to conditions where DESCRIPTION = 'Third degree burn';
"Influenza seasonal injectable preservative free" immunization refers to immunizations where DESCRIPTION = 'Influenza seasonal injectable preservative free';
Italian patients refers to ethnicity = 'italian';
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';
drug that was administered refers to medications.DESCRIPTION; child attention deficit disorder refers to medications.REASONDESCRIPTION = 'Child attention deficit disorder';
patients name = first, last; streptococcal sore throat disorder refers to medications.REASONDESCRIPTION = 'Streptococcal sore throat (disorder)';
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION = 'Cystitis';
Asian refers to race like 'asian%'; allergic to peanuts refers to allergies where DESCRIPTION = 'Allergy to peanuts';
in the year of 2011 refers to BILLABLEPERIOD between '2010-12-31' and '2012-01-01';
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)));
diabetes that started in 1988 refers to DESCRIPTION = 'Diabetes' from conditions and START like '1988%';
expecting mothers can be attributed to encounters.REASONDESCRIPTION = 'Normal pregnancy';
full name = first, last; Irish refers to ethnicity = 'irish'; prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions = OCCURRENCES > (AVG(MULTIPLY(all_prevalences.OCCURRENCES, 0.96)));
DIVIDE(SUM(VALUE), COUNT(VALUE)) WHERE DESCRIPTION = 'Body Weight';
Calculate the average period of Mr. Wesley Lemke's care plans.
DIVIDE(SUBTRACT(stop time - start time), COUNT(ID)));
Ibuprofen 200mg Oral Tablet refers to DESCRIPTION = 'Ibuprofen 200 MG Oral Tablet' from medications; started in 2016 refers to START like '2016%'; Dominican patients refer to ethnicity = 'dominican'; stopped taking the medicine after exactly one month refers to SUBTRACT(strftime('%m', STOP), strftime('%m', START)) = 1;
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';
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;
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;
how old = SUBTRACT(MIN(encounters.DATE), patients.birthdate); most recent medical encounter refers to MIN(encounters.DATE);
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;
born in Pittsfield MA US refers to birthplace = 'Pittsfield MA US';
most common condition refers to MAX(COUNT(conditions.DESCRIPTION)); underweight patient refers to MIN(observations.VALUE WHERE observations.DESCRIPTION = 'Body Mass Index');
diseases started on 9th May 2014 refer to DESCRIPTION from conditions where START = '5/9/2014';
description of the reason of the care plan refers to careplans.REASONDESCRIPTION;
State the average period of Ms. Angelena Kertzmann's several normal pregnancies.
DIVIDE(SUBTRACT(stop time - start time), COUNT(DESCRIPTION = 'Normal pregnancy')));
black refers to race = 'black'; stopped their care plan in 2017 refers to substr(careplans.STOP, 1, 4) = '2017';
allergic to peanuts refers to allergies.DESCRIPTION = 'Allergy to peanuts'; asthma refers to conditions.DESCRIPTION = 'Asthma';
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;
SUBTRACT(SUM(deathdate), SUM(birthdate)), COUNT(patient) where REASONDESCRIPTION = 'Prediabetes' from careplans;
procedures refer to DESCRIPTION from procedures; medications refers to DESCRIPTION from medications; third-degree burn refers to conditions where DESCRIPTION = 'Third degree burn';
condition on 2009/1/8 refers to DESCRIPTION from conditions where START = '2009-01-08';
the highest Systolic Blood Pressure refers to MAX(DESCRIPTION = 'Systolic Blood Pressure') from observations;
percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE gender = 'M'), COUNT(patients.patient) WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder))), 100); male patients refers to gender = 'M'; viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)';
in the year of 2011 refers to BILLABLEPERIOD between '2010-12-31' and '2012-01-01';
full name = first, last; Diabetic diet refers to careplans.DESCRIPTION = 'Diabetic diet';
Calculate the percentage of male patients with viral sinusitis condition.
percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE gender = 'M'), COUNT(patients.patient) WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder))), 100); male patients refers to gender = 'M'; viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)';
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;
condition no. 368581000119106 refers to conditions where CODE = '368581000119106';
age refers to SUBTRACT(strftime('%Y', deathdate), strftime('%Y', birthdate)); hypertension refers to conditions where DESCRIPTION = 'Hypertension';
condition refers to conditions.DESCRIPTION; in 2017 refers to substr(conditions.START, 1, 4) = '2017';
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;
diseases started on 9th May 2014 refer to DESCRIPTION from conditions where START = '5/9/2014';
DIVIDE(SUBTRACT(stop time - start time), COUNT(ID)));
drug that was administered refers to medications.DESCRIPTION; child attention deficit disorder refers to medications.REASONDESCRIPTION = 'Child attention deficit disorder';
why need to take Acetaminophen refers to REASONDESCRIPTION  where DESCRIPTION like 'Acetaminophen%' from medications;
stop date of the care plan refers to careplans.STOP; dead patients refers to deathdate is not null;
List out patient names with calcium deficiency.
patient names = first, last; calcium deficiency refers to observations.DESCRIPTION = 'Calcium' and observations.VALUE < 8.6;
stop date of the care plan refers to careplans.STOP; dead patients refers to deathdate is not null;
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);
care plans refer to DESCRIPTION from careplans; secondary malignant neoplasm of the colon refers to conditions where DESCRIPTION = 'Secondary malignant neoplasm of colon';
viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)'; gender that is most affected refers to MAX(COUNT(gender WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder)'));
between 2010 and 2017 refers to substr(encounters.DATE, 1, 4) between '2010' and '2017'; percentage = MULTIPLY(DIVIDE(COUNT(encounters.ID WHERE DESCRIPTION = 'Prenatal visit'), count(encounters.ID)), 1.0); prenatal visits refers to encounters.DESCRIPTION = 'Prenatal visit';
Asian refers to race like 'asian%'; allergic to peanuts refers to allergies where DESCRIPTION = 'Allergy to peanuts';
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;
SUBTRACT(SUM(deathdate), SUM(birthdate)), COUNT(patient) where REASONDESCRIPTION = 'Prediabetes' from careplans;
condition no. 368581000119106 refers to conditions where CODE = '368581000119106';
DIVIDE(COUNT(marital = 'M'), COUNT(patient)) as percentage where DESCRIPTION = 'Cystitis';
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';
expecting mothers can be attributed to encounters.REASONDESCRIPTION = 'Normal pregnancy';
procedures refer to DESCRIPTION from procedures; medications refers to DESCRIPTION from medications; third-degree burn refers to conditions where DESCRIPTION = 'Third degree burn';
start of the care plan refers to careplans.START; alive patients refers to deathdate is null;
DIVIDE(COUNT(marital = 'M'), COUNT(patient)) as percentage where DESCRIPTION = 'Cystitis';
full name = first, last; lung transplant refers to procedures.DESCRIPTION = 'Transplant of lung (procedure)';
immunized with meningococcal MCV4P refers to DESCRIPTION = 'meningococcal MCV4P' from immunizations; viral sinusitis disorder refers to DESCRIPTION = 'Viral sinusitis (disorder)' from conditions;
between 2010 and 2017 refers to substr(encounters.DATE, 1, 4) between '2010' and '2017'; percentage = MULTIPLY(DIVIDE(COUNT(encounters.ID WHERE DESCRIPTION = 'Prenatal visit'), count(encounters.ID)), 1.0); prenatal visits refers to encounters.DESCRIPTION = 'Prenatal visit';
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION like 'Acetaminophen%';
female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
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';
How many mothers have taken immunization during prenatal visit?
expecting mothers can be attributed to encounters.REASONDESCRIPTION = 'Normal pregnancy';
full name = first, last; Diabetic diet refers to careplans.DESCRIPTION = 'Diabetic diet';
Penicillin V Potassium 250 MG refers to medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'; percentage = MULTIPLY(DIVIDE(patients.patient WHERE gender = 'F'), COUNT(patients.patient) WHERE medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'), 100) female refers to gender = 'F';
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';
female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
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;
medication that are prescribed refers to DESCRIPTION from medications;
allergies refer to PATIENT from allergies;
the most common allergy refers to MAX(COUNT(DESCRIPTION)) from allergies;
percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE gender = 'M'), COUNT(patients.patient) WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder))), 100); male patients refers to gender = 'M'; viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)';
between 2010 and 2017 refers to substr(encounters.DATE, 1, 4) between '2010' and '2017'; percentage = MULTIPLY(DIVIDE(COUNT(encounters.ID WHERE DESCRIPTION = 'Prenatal visit'), count(encounters.ID)), 1.0); prenatal visits refers to encounters.DESCRIPTION = 'Prenatal visit';
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;
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);
full name = first, last; lung transplant refers to procedures.DESCRIPTION = 'Transplant of lung (procedure)';
procedure refers to procedures.DESCRIPTION; medicine prescribed refers to medications.DESCRIPTION; drug overdose refers to encounters.REASONDESCRIPTION = 'Drug overdose';
the highest Systolic Blood Pressure refers to MAX(DESCRIPTION = 'Systolic Blood Pressure') from observations;
diabetes that started in 1988 refers to DESCRIPTION = 'Diabetes' from conditions and START like '1988%';
condition no. 368581000119106 refers to conditions where CODE = '368581000119106';
care plans refer to DESCRIPTION from careplans; secondary malignant neoplasm of the colon refers to conditions where DESCRIPTION = 'Secondary malignant neoplasm of colon';
between 2010 and 2017 refers to substr(encounters.DATE, 1, 4) between '2010' and '2017'; percentage = MULTIPLY(DIVIDE(COUNT(encounters.ID WHERE DESCRIPTION = 'Prenatal visit'), count(encounters.ID)), 1.0); prenatal visits refers to encounters.DESCRIPTION = 'Prenatal visit';
difference = SUBTRACT(patients.patient WHERE marital = 'M'), COUNT(patients.patient WHERE marital = 'S') WHERE conditions.DESCRIPTION = 'Diabetes'); married patients refers to marital = 'M'; single patients refers to marital = 'S'; diabetes refers to conditions.DESCRIPTION = 'Diabetes';
Asian refers to race like 'asian%'; allergic to peanuts refers to allergies where DESCRIPTION = 'Allergy to peanuts';
Why did Elly Koss need to take Acetaminophen?
why need to take Acetaminophen refers to REASONDESCRIPTION  where DESCRIPTION like 'Acetaminophen%' from medications;
female refers to gender = 'F'; "HPV quadrivalent" immunization refers to immunizations where DESCRIPTION = 'HPV quadrivalent';
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]';
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;
description of medication refers to medications.DESCRIPTION;
the highest Systolic Blood Pressure refers to MAX(DESCRIPTION = 'Systolic Blood Pressure') from observations;
conditions refer to DESCRIPTION from conditions;
difference = SUBTRACT(patients.patient WHERE marital = 'M'), COUNT(patients.patient WHERE marital = 'S') WHERE conditions.DESCRIPTION = 'Diabetes'); married patients refers to marital = 'M'; single patients refers to marital = 'S'; diabetes refers to conditions.DESCRIPTION = 'Diabetes';
start date of the care plan refers to careplans.START;
condition on 2009/1/8 refers to DESCRIPTION from conditions where START = '2009-01-08';
body height status refers to DESCRIPTION = 'Body Height' from observations; on 2010/8/2 refers to DATE = '2010-08-02';
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';
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';
full name = first, last; otitis media refers to conditions.DESCRIPTION = 'Otitis media';
the highest Systolic Blood Pressure refers to MAX(DESCRIPTION = 'Systolic Blood Pressure') from observations;
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';
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;
most common condition refers to MAX(COUNT(conditions.DESCRIPTION)); underweight patient refers to MIN(observations.VALUE WHERE observations.DESCRIPTION = 'Body Mass Index');
allergies refer to PATIENT from allergies;
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';
full name refers to first, last; Yaz 28 Day Pack refers to DESCRIPTION = 'Yaz 28 Day Pack' from medications; started taking in 2011 refers to START like '2011%';
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;
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';
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';
condition on 2009/1/8 refers to DESCRIPTION from conditions where START = '2009-01-08';
DIVIDE(SUM(VALUE), COUNT(VALUE)) WHERE DESCRIPTION = 'Body Weight';
the most common condition refers to MAX(COUNT(DESCRIPTION)); among the female Americans refer to PATIENT where gender = 'F' and ethnicity = 'american';
patient with the most prevalent condition refers to patient where MAX(PREVALENCE RATE); started recently refers to MAX(START);
the most common allergy refers to MAX(COUNT(DESCRIPTION)) from allergies;
stop date of the care plan refers to careplans.STOP; dead patients refers to deathdate is not null;
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';
difference = SUBTRACT(patients.patient WHERE marital = 'M'), COUNT(patients.patient WHERE marital = 'S') WHERE conditions.DESCRIPTION = 'Diabetes'); married patients refers to marital = 'M'; single patients refers to marital = 'S'; diabetes refers to conditions.DESCRIPTION = 'Diabetes';
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)));
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';
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;
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);
how old = SUBTRACT(MIN(encounters.DATE), patients.birthdate); most recent medical encounter refers to MIN(encounters.DATE);
body height status refers to DESCRIPTION = 'Body Height' from observations; on 2010/8/2 refers to DATE = '2010-08-02';
the most common allergy refers to MAX(COUNT(DESCRIPTION)) from allergies;
stop date of the care plan refers to careplans.STOP; dead patients refers to deathdate is not null;
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION = 'Cystitis';
Hispanic patients refers to ethnicity = 'hispanic'; percentage = MULTIPLY(DIVIDE(COUNT(careplans.PATIENT WHERE ethnicity = 'hispanic'), COUNT(careplans.PATIENT)), 1.0); stopped their care plan in 2011 refers to substr(careplans.stop, 1, 4) = '2011';
female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
cystitis refers to conditions where DESCRIPTION = 'Cystitis';
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';
allergies refer to PATIENT from allergies;
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';
full name = first, last; Irish refers to ethnicity = 'irish'; prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions = OCCURRENCES > (AVG(MULTIPLY(all_prevalences.OCCURRENCES, 0.96)));
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)));
most common condition refers to MAX(COUNT(conditions.DESCRIPTION)); underweight patient refers to MIN(observations.VALUE WHERE observations.DESCRIPTION = 'Body Mass Index');
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION like 'Acetaminophen%';
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');
body weight VALUE and UNITS where DESCRIPTION = 'Body Weight' from observations;
full name = first, last; lung transplant refers to procedures.DESCRIPTION = 'Transplant of lung (procedure)';
DIVIDE(COUNT(PATIENT where gender = 'F' and race = 'asian'), COUNT(PATIENT)) as percentage where DESCRIPTION = 'Acute bronchitis (disorder)' ;
How many allergies does Mrs. Saundra Monahan have?
allergies refer to PATIENT from allergies;
SUBTRACT(SUM(deathdate), SUM(birthdate)), COUNT(patient) where REASONDESCRIPTION = 'Prediabetes' from careplans;
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION like 'Acetaminophen%';
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';
procedure refers to procedures.DESCRIPTION; medicine prescribed refers to medications.DESCRIPTION; drug overdose refers to encounters.REASONDESCRIPTION = 'Drug overdose';
patients name = first, last; streptococcal sore throat disorder refers to medications.REASONDESCRIPTION = 'Streptococcal sore throat (disorder)';
full name = first, last; Irish refers to ethnicity = 'irish'; prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions = OCCURRENCES > (AVG(MULTIPLY(all_prevalences.OCCURRENCES, 0.96)));
DIVIDE(SUBTRACT(stop time - start time), COUNT(ID)));
condition on 2009/1/8 refers to DESCRIPTION from conditions where START = '2009-01-08';
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)));
full name = first, last; otitis media refers to conditions.DESCRIPTION = 'Otitis media';
For how long did Elly Koss's cystitis last?
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION = 'Cystitis';
"Influenza seasonal injectable preservative free" immunization refers to immunizations where DESCRIPTION = 'Influenza seasonal injectable preservative free';
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;
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';
most common condition refers to MAX(COUNT(conditions.DESCRIPTION)); underweight patient refers to MIN(observations.VALUE WHERE observations.DESCRIPTION = 'Body Mass Index');
SUBTRACT(SUM(deathdate), SUM(birthdate)), COUNT(patient) where REASONDESCRIPTION = 'Prediabetes' from careplans;
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';
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';
full name = first, last; lung transplant refers to procedures.DESCRIPTION = 'Transplant of lung (procedure)';
between 2010 and 2017 refers to substr(encounters.DATE, 1, 4) between '2010' and '2017'; percentage = MULTIPLY(DIVIDE(COUNT(encounters.ID WHERE DESCRIPTION = 'Prenatal visit'), count(encounters.ID)), 1.0); prenatal visits refers to encounters.DESCRIPTION = 'Prenatal visit';
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';
What is the difference between the number of married patients and the number of single patients with diabetes?
difference = SUBTRACT(patients.patient WHERE marital = 'M'), COUNT(patients.patient WHERE marital = 'S') WHERE conditions.DESCRIPTION = 'Diabetes'); married patients refers to marital = 'M'; single patients refers to marital = 'S'; diabetes refers to conditions.DESCRIPTION = 'Diabetes';
cystitis refers to conditions where DESCRIPTION = 'Cystitis';
allergic to peanuts refers to allergies.DESCRIPTION = 'Allergy to peanuts'; asthma refers to conditions.DESCRIPTION = 'Asthma';
full name = first, last; otitis media refers to conditions.DESCRIPTION = 'Otitis media';
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' ;
encountered normal pregnancy refers to encounters where REASONDESCRIPTION = 'Normal pregnancy';
male refers to gender = 'M'; immune to quadrivalent HPV refers to immunizations.DESCRIPTION = 'HPV quadrivalent';
medication that are prescribed refers to DESCRIPTION from medications;
how long = SUBTRACT(julianday(medications.stop), julianday(medications.START)); Acetaminophen 160 MG refers to medications.DESCRIPTION = 'Acetaminophen 160 MG';
the most common allergy refers to MAX(COUNT(DESCRIPTION)) from allergies;
reason for visiting medical professionals refers to encounters.REASONDESCRIPTION;  in July 2009 refers to  substr(encounters.DATE, 1, 7) = '2009-07' ;
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)));
start date of the care plan refers to careplans.START;
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';
in 2010 refers to substr(encounters.DATE, 1, 4) = '2010'; contact dermatitis refers to encounters.REASONDESCRIPTION = 'Contact dermatitis'; percentage = MULTIPLY(DIVIDE(COUNT(encounters.PATIENT WHERE gender = 'F'), count(encounters.PATIENT) WHERE encounters.REASONDESCRIPTION = 'Contact dermatitis'), 1.0) females refers to gender = 'F';
condition on 2009/1/8 refers to DESCRIPTION from conditions where START = '2009-01-08';
patient names = first, last; calcium deficiency refers to observations.DESCRIPTION = 'Calcium' and observations.VALUE < 8.6;
body height status refers to DESCRIPTION = 'Body Height' from observations; on 2010/8/2 refers to DATE = '2010-08-02';
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;
social security number refers to ssn; ssn = '999-15-3685';
age refers to SUBTRACT(strftime('%Y', deathdate), strftime('%Y', birthdate)); hypertension refers to conditions where DESCRIPTION = 'Hypertension';
encountered normal pregnancy refers to encounters where REASONDESCRIPTION = 'Normal pregnancy';
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' ;
start of the care plan refers to careplans.START; alive patients refers to deathdate is null;
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)';
condition refers to conditions.DESCRIPTION; in 2017 refers to substr(conditions.START, 1, 4) = '2017';
female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
DIVIDE(COUNT(marital = 'M'), COUNT(patient)) as percentage where DESCRIPTION = 'Cystitis';
on 2009/8/9 refers to DATE = '2009-08-09';
Italian patients refers to ethnicity = 'italian';
description of medication refers to medications.DESCRIPTION;
in the year of 2011 refers to BILLABLEPERIOD between '2010-12-31' and '2012-01-01';
why need to take Acetaminophen refers to REASONDESCRIPTION  where DESCRIPTION like 'Acetaminophen%' from medications;
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'; ;
procedure refers to procedures.DESCRIPTION; medicine prescribed refers to medications.DESCRIPTION; drug overdose refers to encounters.REASONDESCRIPTION = 'Drug overdose';
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]';
DIVIDE(COUNT(PATIENT where gender = 'F' and race = 'asian'), COUNT(PATIENT)) as percentage where DESCRIPTION = 'Acute bronchitis (disorder)' ;
full name = first, last; Diabetic diet refers to careplans.DESCRIPTION = 'Diabetic diet';
allergies refer to PATIENT from allergies;
reason for visiting medical professionals refers to encounters.REASONDESCRIPTION;  in July 2009 refers to  substr(encounters.DATE, 1, 7) = '2009-07' ;
allergic to eggs refer to DESCRIPTION = 'Allergy to eggs' from allergies;
DIVIDE(COUNT(marital = 'M'), COUNT(patient)) as percentage where DESCRIPTION = 'Cystitis';
black refers to race = 'black'; stopped their care plan in 2017 refers to substr(careplans.STOP, 1, 4) = '2017';
born in Pittsfield MA US refers to birthplace = 'Pittsfield MA US';
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';
DIVIDE(SUBTRACT(stop time - start time), COUNT(ID)));
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';
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';
full name = first, last; lung transplant refers to procedures.DESCRIPTION = 'Transplant of lung (procedure)';
how old = SUBTRACT(MIN(encounters.DATE), patients.birthdate); most recent medical encounter refers to MIN(encounters.DATE);
patients with prediabetes refer to PATIENT from conditions where DESCRIPTION = 'Prediabetes'; female refers to gender = 'F';
medicine prescribed refers to DESCRIPTION from medications; social security number 999-94-3751 refers to ssn = '999-94-3751';
full name refers to first, last; Yaz 28 Day Pack refers to DESCRIPTION = 'Yaz 28 Day Pack' from medications; started taking in 2011 refers to START like '2011%';
condition on 2009/1/8 refers to DESCRIPTION from conditions where START = '2009-01-08';
full names = first, last; condition described as cystitis refers to conditions.DESCRIPTION = ''Cystitis';
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';
full name = first, last; Irish refers to ethnicity = 'irish'; prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions = OCCURRENCES > (AVG(MULTIPLY(all_prevalences.OCCURRENCES, 0.96)));
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';
reason for visiting medical professionals refers to encounters.REASONDESCRIPTION;  in July 2009 refers to  substr(encounters.DATE, 1, 7) = '2009-07' ;
description of medication refers to medications.DESCRIPTION;
"Influenza seasonal injectable preservative free" immunization refers to immunizations where DESCRIPTION = 'Influenza seasonal injectable preservative free';
born in Pittsfield MA US refers to birthplace = 'Pittsfield MA US';
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';
start date of the care plan refers to careplans.START;
full name refers to first, last; have 3 different allergies refer to allergies where COUNT(DESCRIPTION) > 3;
Penicillin V Potassium 250 MG refers to medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'; percentage = MULTIPLY(DIVIDE(patients.patient WHERE gender = 'F'), COUNT(patients.patient) WHERE medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'), 100) female refers to gender = 'F';
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';
procedure refers to procedures.DESCRIPTION; medicine prescribed refers to medications.DESCRIPTION; drug overdose refers to encounters.REASONDESCRIPTION = 'Drug overdose';
condition refers to conditions.DESCRIPTION; in 2017 refers to substr(conditions.START, 1, 4) = '2017';
between 2010 and 2017 refers to substr(encounters.DATE, 1, 4) between '2010' and '2017'; percentage = MULTIPLY(DIVIDE(COUNT(encounters.ID WHERE DESCRIPTION = 'Prenatal visit'), count(encounters.ID)), 1.0); prenatal visits refers to encounters.DESCRIPTION = 'Prenatal visit';
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);
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';
Hispanic patients refers to ethnicity = 'hispanic'; percentage = MULTIPLY(DIVIDE(COUNT(careplans.PATIENT WHERE ethnicity = 'hispanic'), COUNT(careplans.PATIENT)), 1.0); stopped their care plan in 2011 refers to substr(careplans.stop, 1, 4) = '2011';
DIVIDE(SUBTRACT(stop time - start time), COUNT(ID)));
social security number refers to ssn; ssn = '999-15-3685';
percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE gender = 'M'), COUNT(patients.patient) WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder))), 100); male patients refers to gender = 'M'; viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)';
SUBTRACT(SUM(deathdate), SUM(birthdate)), COUNT(patient) where REASONDESCRIPTION = 'Prediabetes' from careplans;
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]';
condition refers to conditions.DESCRIPTION; in 2017 refers to substr(conditions.START, 1, 4) = '2017';
full name refers to first, last; Yaz 28 Day Pack refers to DESCRIPTION = 'Yaz 28 Day Pack' from medications; started taking in 2011 refers to START like '2011%';
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');
description of the reason of the care plan refers to careplans.REASONDESCRIPTION;
born in Pittsfield MA US refers to birthplace = 'Pittsfield MA US';
DIVIDE(SUM(VALUE), COUNT(VALUE)) WHERE DESCRIPTION = 'Body Weight';
the most common allergy refers to MAX(COUNT(DESCRIPTION)) from allergies;
patient with the most prevalent condition refers to patient where MAX(PREVALENCE RATE); started recently refers to MAX(START);
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;
full name = first, last; Diabetic diet refers to careplans.DESCRIPTION = 'Diabetic diet';
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;
condition on 2009/1/8 refers to DESCRIPTION from conditions where START = '2009-01-08';
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION like 'Acetaminophen%';
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)));
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]';
the most common condition refers to MAX(COUNT(DESCRIPTION)); among the female Americans refer to PATIENT where gender = 'F' and ethnicity = 'american';
the most common allergy refers to MAX(COUNT(DESCRIPTION)) from allergies;
social security number refers to ssn; ssn = '999-15-3685';
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';
full name = first, last; otitis media refers to conditions.DESCRIPTION = 'Otitis media';
unmarried refers to marital = 'S'; women refers to gender = 'F'; normal pregnancy refers to conditions.DESCRIPTION = 'normal pregnancy';
According to all the observations of Elly Koss, what was her average weight?
DIVIDE(SUM(VALUE), COUNT(VALUE)) WHERE DESCRIPTION = 'Body Weight';
patients with prediabetes refer to PATIENT from conditions where DESCRIPTION = 'Prediabetes'; female refers to gender = 'F';
condition no. 368581000119106 refers to conditions where CODE = '368581000119106';
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;
full name = first, last; otitis media refers to conditions.DESCRIPTION = 'Otitis media';
how old = SUBTRACT(MIN(encounters.DATE), patients.birthdate); most recent medical encounter refers to MIN(encounters.DATE);
percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE gender = 'M'), COUNT(patients.patient) WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder))), 100); male patients refers to gender = 'M'; viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)';
allergies refer to PATIENT from allergies;
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION like 'Acetaminophen%';
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';
full names = first, last; nut allergy refers to allergies.DESCRIPTION = 'Allergy to nut';
List down the full name of Irish patients diagnosed with the prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions.
full name = first, last; Irish refers to ethnicity = 'irish'; prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions = OCCURRENCES > (AVG(MULTIPLY(all_prevalences.OCCURRENCES, 0.96)));
condition no. 368581000119106 refers to conditions where CODE = '368581000119106';
drug that was administered refers to medications.DESCRIPTION; child attention deficit disorder refers to medications.REASONDESCRIPTION = 'Child attention deficit disorder';
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;
viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)'; gender that is most affected refers to MAX(COUNT(gender WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder)'));
DIVIDE(COUNT(marital = 'M'), COUNT(patient)) as percentage where DESCRIPTION = 'Cystitis';
in the year of 2011 refers to BILLABLEPERIOD between '2010-12-31' and '2012-01-01';
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)));
black refers to race = 'black'; stopped their care plan in 2017 refers to substr(careplans.STOP, 1, 4) = '2017';
medicine prescribed refers to DESCRIPTION from medications; social security number 999-94-3751 refers to ssn = '999-94-3751';
procedures refer to DESCRIPTION from procedures;
Among all patients who sought medical attention in 2010 due to contact dermatitis, identify the percentage of females.
in 2010 refers to substr(encounters.DATE, 1, 4) = '2010'; contact dermatitis refers to encounters.REASONDESCRIPTION = 'Contact dermatitis'; percentage = MULTIPLY(DIVIDE(COUNT(encounters.PATIENT WHERE gender = 'F'), count(encounters.PATIENT) WHERE encounters.REASONDESCRIPTION = 'Contact dermatitis'), 1.0) females refers to gender = 'F';
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';
SUBTRACT(SUM(deathdate), SUM(birthdate)), COUNT(patient) where REASONDESCRIPTION = 'Prediabetes' from careplans;
condition no. 368581000119106 refers to conditions where CODE = '368581000119106';
DIVIDE(SUBTRACT(stop time - start time), COUNT(ID)));
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';
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';
medicine prescribed refers to DESCRIPTION from medications; social security number 999-94-3751 refers to ssn = '999-94-3751';
how long the allergies last = SUBTRACT(allergies.STOP, allergies.START); kind of allergy refers to allergies.DESCRIPTION;
procedures refer to DESCRIPTION from procedures; medications refers to DESCRIPTION from medications; third-degree burn refers to conditions where DESCRIPTION = 'Third degree burn';
why need to take Acetaminophen refers to REASONDESCRIPTION  where DESCRIPTION like 'Acetaminophen%' from medications;
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;
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';
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]';
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';
patients with prediabetes refer to PATIENT from conditions where DESCRIPTION = 'Prediabetes'; female refers to gender = 'F';
how long the allergies last = SUBTRACT(allergies.STOP, allergies.START); kind of allergy refers to allergies.DESCRIPTION;
most common condition refers to MAX(COUNT(conditions.DESCRIPTION)); underweight patient refers to MIN(observations.VALUE WHERE observations.DESCRIPTION = 'Body Mass Index');
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';
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';
DIVIDE(COUNT(PATIENT where gender = 'F' and race = 'asian'), COUNT(PATIENT)) as percentage where DESCRIPTION = 'Acute bronchitis (disorder)' ;
unmarried refers to marital = 'S'; women refers to gender = 'F'; normal pregnancy refers to conditions.DESCRIPTION = 'normal pregnancy';
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;
the most common condition refers to MAX(COUNT(DESCRIPTION)); among the female Americans refer to PATIENT where gender = 'F' and ethnicity = 'american';
on 2009/8/9 refers to DATE = '2009-08-09';
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';
DIVIDE(SUBTRACT(stop time - start time), COUNT(DESCRIPTION = 'Normal pregnancy')));
care plans refer to DESCRIPTION from careplans; secondary malignant neoplasm of the colon refers to conditions where DESCRIPTION = 'Secondary malignant neoplasm of colon';
DIVIDE(COUNT(PATIENT where gender = 'F' and race = 'asian'), COUNT(PATIENT)) as percentage where DESCRIPTION = 'Acute bronchitis (disorder)' ;
patients with prediabetes refer to PATIENT from conditions where DESCRIPTION = 'Prediabetes'; female refers to gender = 'F';
second-degree burn refers to encounters.REASONDESCRIPTION = 'Second degree burn'; ;
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');
patient names = first, last; calcium deficiency refers to observations.DESCRIPTION = 'Calcium' and observations.VALUE < 8.6;
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';
black refers to race = 'black'; stopped their care plan in 2017 refers to substr(careplans.STOP, 1, 4) = '2017';
patient with the most prevalent condition refers to patient where MAX(PREVALENCE RATE); started recently refers to MAX(START);
allergies refer to PATIENT from allergies;
social security number refers to ssn; ssn = '999-15-3685';
full name = first, last; lung transplant refers to procedures.DESCRIPTION = 'Transplant of lung (procedure)';
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;
care plans refer to DESCRIPTION from careplans; secondary malignant neoplasm of the colon refers to conditions where DESCRIPTION = 'Secondary malignant neoplasm of colon';
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');
Italian patients refers to ethnicity = 'italian';
female refers to gender = 'F'; "HPV quadrivalent" immunization refers to immunizations where DESCRIPTION = 'HPV quadrivalent';
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');
description of the reason of the care plan refers to careplans.REASONDESCRIPTION;
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)';
reason for visiting medical professionals refers to encounters.REASONDESCRIPTION;  in July 2009 refers to  substr(encounters.DATE, 1, 7) = '2009-07' ;
allergic to eggs refer to DESCRIPTION = 'Allergy to eggs' from allergies;
patients name = first, last; streptococcal sore throat disorder refers to medications.REASONDESCRIPTION = 'Streptococcal sore throat (disorder)';
SUBTRACT(SUM(deathdate), SUM(birthdate)), COUNT(patient) where REASONDESCRIPTION = 'Prediabetes' from careplans;
immunized with meningococcal MCV4P refers to DESCRIPTION = 'meningococcal MCV4P' from immunizations; viral sinusitis disorder refers to DESCRIPTION = 'Viral sinusitis (disorder)' from conditions;
the most common condition refers to MAX(COUNT(DESCRIPTION)); among the female Americans refer to PATIENT where gender = 'F' and ethnicity = 'american';
medication that are prescribed refers to DESCRIPTION from medications;
patient names = first, last; calcium deficiency refers to observations.DESCRIPTION = 'Calcium' and observations.VALUE < 8.6;
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';
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';
body weight VALUE and UNITS where DESCRIPTION = 'Body Weight' from observations;
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION = 'Cystitis';
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);
most common condition refers to MAX(COUNT(conditions.DESCRIPTION)); underweight patient refers to MIN(observations.VALUE WHERE observations.DESCRIPTION = 'Body Mass Index');
why need to take Acetaminophen refers to REASONDESCRIPTION  where DESCRIPTION like 'Acetaminophen%' from medications;
allergies refer to PATIENT from allergies;
DIVIDE(COUNT(PATIENT where gender = 'F' and race = 'asian'), COUNT(PATIENT)) as percentage where DESCRIPTION = 'Acute bronchitis (disorder)' ;
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';
medication that are prescribed refers to DESCRIPTION from medications;
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';
body height status refers to DESCRIPTION = 'Body Height' from observations; on 2010/8/2 refers to DATE = '2010-08-02';
male refers to gender = 'M'; immune to quadrivalent HPV refers to immunizations.DESCRIPTION = 'HPV quadrivalent';
patients name = first, last; streptococcal sore throat disorder refers to medications.REASONDESCRIPTION = 'Streptococcal sore throat (disorder)';
allergic to peanuts refers to allergies.DESCRIPTION = 'Allergy to peanuts'; asthma refers to conditions.DESCRIPTION = 'Asthma';
second-degree burn refers to encounters.REASONDESCRIPTION = 'Second degree burn'; ;
black refers to race = 'black'; stopped their care plan in 2017 refers to substr(careplans.STOP, 1, 4) = '2017';
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;
patient with the most prevalent condition refers to patient where MAX(PREVALENCE RATE); started recently refers to MAX(START);
start of the care plan refers to careplans.START; alive patients refers to deathdate is null;
medicine prescribed refers to DESCRIPTION from medications; social security number 999-94-3751 refers to ssn = '999-94-3751';
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;
procedures refer to DESCRIPTION from procedures;
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';
cystitis refers to conditions where DESCRIPTION = 'Cystitis';
medication that are prescribed refers to DESCRIPTION from medications;
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';
female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
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' ;
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;
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';
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;
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;
female refers to gender = 'F'; "HPV quadrivalent" immunization refers to immunizations where DESCRIPTION = 'HPV quadrivalent';
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;
condition on 2009/1/8 refers to DESCRIPTION from conditions where START = '2009-01-08';
expecting mothers can be attributed to encounters.REASONDESCRIPTION = 'Normal pregnancy';
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]';
in the year of 2011 refers to BILLABLEPERIOD between '2010-12-31' and '2012-01-01';
the most common condition refers to MAX(COUNT(DESCRIPTION)); among the female Americans refer to PATIENT where gender = 'F' and ethnicity = 'american';
Penicillin V Potassium 250 MG refers to medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'; percentage = MULTIPLY(DIVIDE(patients.patient WHERE gender = 'F'), COUNT(patients.patient) WHERE medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'), 100) female refers to gender = 'F';
black refers to race = 'black'; stopped their care plan in 2017 refers to substr(careplans.STOP, 1, 4) = '2017';
age refers to SUBTRACT(strftime('%Y', deathdate), strftime('%Y', birthdate)); hypertension refers to conditions where DESCRIPTION = 'Hypertension';
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';
female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
diabetes that started in 1988 refers to DESCRIPTION = 'Diabetes' from conditions and START like '1988%';
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;
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';
the most common allergy refers to MAX(COUNT(DESCRIPTION)) from allergies;
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';
condition refers to conditions.DESCRIPTION; in 2017 refers to substr(conditions.START, 1, 4) = '2017';
allergic to peanuts refers to allergies.DESCRIPTION = 'Allergy to peanuts'; asthma refers to conditions.DESCRIPTION = 'Asthma';
encountered normal pregnancy refers to encounters where REASONDESCRIPTION = 'Normal pregnancy';
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';
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';
cystitis refers to conditions where DESCRIPTION = 'Cystitis';
most common condition refers to MAX(COUNT(conditions.DESCRIPTION)); underweight patient refers to MIN(observations.VALUE WHERE observations.DESCRIPTION = 'Body Mass Index');
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';
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;
the most common condition refers to MAX(COUNT(DESCRIPTION)); among the female Americans refer to PATIENT where gender = 'F' and ethnicity = 'american';
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';
how long = SUBTRACT(julianday(medications.stop), julianday(medications.START)); Acetaminophen 160 MG refers to medications.DESCRIPTION = 'Acetaminophen 160 MG';
body height status refers to DESCRIPTION = 'Body Height' from observations; on 2010/8/2 refers to DATE = '2010-08-02';
full names = first, last; nut allergy refers to allergies.DESCRIPTION = 'Allergy to nut';
in 2010 refers to substr(encounters.DATE, 1, 4) = '2010'; contact dermatitis refers to encounters.REASONDESCRIPTION = 'Contact dermatitis'; percentage = MULTIPLY(DIVIDE(COUNT(encounters.PATIENT WHERE gender = 'F'), count(encounters.PATIENT) WHERE encounters.REASONDESCRIPTION = 'Contact dermatitis'), 1.0) females refers to gender = 'F';
How many patients who are allergic to peanuts have asthma?
allergic to peanuts refers to allergies.DESCRIPTION = 'Allergy to peanuts'; asthma refers to conditions.DESCRIPTION = 'Asthma';
Hispanic patients refers to ethnicity = 'hispanic'; percentage = MULTIPLY(DIVIDE(COUNT(careplans.PATIENT WHERE ethnicity = 'hispanic'), COUNT(careplans.PATIENT)), 1.0); stopped their care plan in 2011 refers to substr(careplans.stop, 1, 4) = '2011';
DIVIDE(COUNT(PATIENT where gender = 'F' and race = 'asian'), COUNT(PATIENT)) as percentage where DESCRIPTION = 'Acute bronchitis (disorder)' ;
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';
immunized with meningococcal MCV4P refers to DESCRIPTION = 'meningococcal MCV4P' from immunizations; viral sinusitis disorder refers to DESCRIPTION = 'Viral sinusitis (disorder)' from conditions;
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';
viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)'; gender that is most affected refers to MAX(COUNT(gender WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder)'));
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';
age refers to SUBTRACT(strftime('%Y', deathdate), strftime('%Y', birthdate)); hypertension refers to conditions where DESCRIPTION = 'Hypertension';
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;
condition refers to conditions.DESCRIPTION; in 2017 refers to substr(conditions.START, 1, 4) = '2017';
List out the stop date of the care plan of dead patients.
stop date of the care plan refers to careplans.STOP; dead patients refers to deathdate is not null;
between 2010 and 2017 refers to substr(encounters.DATE, 1, 4) between '2010' and '2017'; percentage = MULTIPLY(DIVIDE(COUNT(encounters.ID WHERE DESCRIPTION = 'Prenatal visit'), count(encounters.ID)), 1.0); prenatal visits refers to encounters.DESCRIPTION = 'Prenatal visit';
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION = 'Cystitis';
how long = SUBTRACT(julianday(medications.stop), julianday(medications.START)); Acetaminophen 160 MG refers to medications.DESCRIPTION = 'Acetaminophen 160 MG';
allergic to peanuts refers to allergies.DESCRIPTION = 'Allergy to peanuts'; asthma refers to conditions.DESCRIPTION = 'Asthma';
medicine prescribed refers to DESCRIPTION from medications; social security number 999-94-3751 refers to ssn = '999-94-3751';
full name refers to first, last; have 3 different allergies refer to allergies where COUNT(DESCRIPTION) > 3;
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)));
most common condition refers to MAX(COUNT(conditions.DESCRIPTION)); underweight patient refers to MIN(observations.VALUE WHERE observations.DESCRIPTION = 'Body Mass Index');
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)';
procedures refer to DESCRIPTION from procedures; medications refers to DESCRIPTION from medications; third-degree burn refers to conditions where DESCRIPTION = 'Third degree burn';
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';
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION like 'Acetaminophen%';
DIVIDE(SUBTRACT(stop time - start time), COUNT(ID)));
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION = 'Cystitis';
percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE gender = 'M'), COUNT(patients.patient) WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder))), 100); male patients refers to gender = 'M'; viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)';
DIVIDE(SUM(VALUE), COUNT(VALUE)) WHERE DESCRIPTION = 'Body Weight';
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';
full name = first, last; Irish refers to ethnicity = 'irish'; prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions = OCCURRENCES > (AVG(MULTIPLY(all_prevalences.OCCURRENCES, 0.96)));
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');
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' ;
reason for visiting medical professionals refers to encounters.REASONDESCRIPTION;  in July 2009 refers to  substr(encounters.DATE, 1, 7) = '2009-07' ;
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';
"Influenza seasonal injectable preservative free" immunization refers to immunizations where DESCRIPTION = 'Influenza seasonal injectable preservative free';
on 2009/8/9 refers to DATE = '2009-08-09';
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';
description of the reason of the care plan refers to careplans.REASONDESCRIPTION;
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;
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';
procedures refer to DESCRIPTION from procedures;
full names = first, last; nut allergy refers to allergies.DESCRIPTION = 'Allergy to nut';
allergic to eggs refer to DESCRIPTION = 'Allergy to eggs' from allergies;
DIVIDE(SUBTRACT(stop time - start time), COUNT(DESCRIPTION = 'Normal pregnancy')));
Provide the body weight of Elly Koss in every observation.
body weight VALUE and UNITS where DESCRIPTION = 'Body Weight' from observations;
female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
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]';
how old = SUBTRACT(MIN(encounters.DATE), patients.birthdate); most recent medical encounter refers to MIN(encounters.DATE);
DIVIDE(SUBTRACT(stop time - start time), COUNT(ID)));
black refers to race = 'black'; stopped their care plan in 2017 refers to substr(careplans.STOP, 1, 4) = '2017';
patient with the most prevalent condition refers to patient where MAX(PREVALENCE RATE); started recently refers to MAX(START);
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';
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;
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';
unmarried refers to marital = 'S'; women refers to gender = 'F'; normal pregnancy refers to conditions.DESCRIPTION = 'normal pregnancy';
What are the full names of the patients who started taking Yaz 28 Day Pack in 2011?
full name refers to first, last; Yaz 28 Day Pack refers to DESCRIPTION = 'Yaz 28 Day Pack' from medications; started taking in 2011 refers to START like '2011%';
immunized with meningococcal MCV4P refers to DESCRIPTION = 'meningococcal MCV4P' from immunizations; viral sinusitis disorder refers to DESCRIPTION = 'Viral sinusitis (disorder)' from conditions;
female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
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');
how long = SUBTRACT(julianday(medications.stop), julianday(medications.START)); Acetaminophen 160 MG refers to medications.DESCRIPTION = 'Acetaminophen 160 MG';
social security number refers to ssn; ssn = '999-15-3685';
SUBTRACT(SUM(deathdate), SUM(birthdate)), COUNT(patient) where REASONDESCRIPTION = 'Prediabetes' from careplans;
diabetes that started in 1988 refers to DESCRIPTION = 'Diabetes' from conditions and START like '1988%';
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';
start date of the care plan refers to careplans.START;
DIVIDE(SUBTRACT(stop time - start time), COUNT(ID)));
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);
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';
diseases started on 9th May 2014 refer to DESCRIPTION from conditions where START = '5/9/2014';
procedures refer to DESCRIPTION from procedures; medications refers to DESCRIPTION from medications; third-degree burn refers to conditions where DESCRIPTION = 'Third degree burn';
viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)'; gender that is most affected refers to MAX(COUNT(gender WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder)'));
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]';
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');
why need to take Acetaminophen refers to REASONDESCRIPTION  where DESCRIPTION like 'Acetaminophen%' from medications;
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';
medication that are prescribed refers to DESCRIPTION from medications;
cystitis refers to conditions where DESCRIPTION = 'Cystitis';
Calculate the average age of patients with prediabetes care plan.
SUBTRACT(SUM(deathdate), SUM(birthdate)), COUNT(patient) where REASONDESCRIPTION = 'Prediabetes' from careplans;
patient with the most prevalent condition refers to patient where MAX(PREVALENCE RATE); started recently refers to MAX(START);
encountered normal pregnancy refers to encounters where REASONDESCRIPTION = 'Normal pregnancy';
full names = first, last; nut allergy refers to allergies.DESCRIPTION = 'Allergy to nut';
expecting mothers can be attributed to encounters.REASONDESCRIPTION = 'Normal pregnancy';
DIVIDE(SUBTRACT(stop time - start time), COUNT(ID)));
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';
allergic to eggs refer to DESCRIPTION = 'Allergy to eggs' from allergies;
black refers to race = 'black'; stopped their care plan in 2017 refers to substr(careplans.STOP, 1, 4) = '2017';
start date of the care plan refers to careplans.START;
percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE gender = 'M'), COUNT(patients.patient) WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder))), 100); male patients refers to gender = 'M'; viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)';
Give the procedure description of Ms. Jacquelyn Shanahan on 2009/8/9.
on 2009/8/9 refers to DATE = '2009-08-09';
body weight VALUE and UNITS where DESCRIPTION = 'Body Weight' from observations;
Ibuprofen 200mg Oral Tablet refers to DESCRIPTION = 'Ibuprofen 200 MG Oral Tablet' from medications; started in 2016 refers to START like '2016%'; Dominican patients refer to ethnicity = 'dominican'; stopped taking the medicine after exactly one month refers to SUBTRACT(strftime('%m', STOP), strftime('%m', START)) = 1;
the most common condition refers to MAX(COUNT(DESCRIPTION)); among the female Americans refer to PATIENT where gender = 'F' and ethnicity = 'american';
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;
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';
most common condition refers to MAX(COUNT(conditions.DESCRIPTION)); underweight patient refers to MIN(observations.VALUE WHERE observations.DESCRIPTION = 'Body Mass Index');
DIVIDE(COUNT(marital = 'M'), COUNT(patient)) as percentage where DESCRIPTION = 'Cystitis';
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';
percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE gender = 'M'), COUNT(patients.patient) WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder))), 100); male patients refers to gender = 'M'; viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)';
start date of the care plan refers to careplans.START;
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)';
full name refers to first, last; have 3 different allergies refer to allergies where COUNT(DESCRIPTION) > 3;
full name = first, last; Irish refers to ethnicity = 'irish'; prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions = OCCURRENCES > (AVG(MULTIPLY(all_prevalences.OCCURRENCES, 0.96)));
Ibuprofen 200mg Oral Tablet refers to DESCRIPTION = 'Ibuprofen 200 MG Oral Tablet' from medications; started in 2016 refers to START like '2016%'; Dominican patients refer to ethnicity = 'dominican'; stopped taking the medicine after exactly one month refers to SUBTRACT(strftime('%m', STOP), strftime('%m', START)) = 1;
conditions refer to DESCRIPTION from conditions;
body height status refers to DESCRIPTION = 'Body Height' from observations; on 2010/8/2 refers to DATE = '2010-08-02';
on 2009/8/9 refers to DATE = '2009-08-09';
condition refers to conditions.DESCRIPTION; in 2017 refers to substr(conditions.START, 1, 4) = '2017';
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';
why need to take Acetaminophen refers to REASONDESCRIPTION  where DESCRIPTION like 'Acetaminophen%' from medications;
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';
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';
social security number refers to ssn; ssn = '999-15-3685';
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';
female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
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';
how old = SUBTRACT(MIN(encounters.DATE), patients.birthdate); most recent medical encounter refers to MIN(encounters.DATE);
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';
DIVIDE(COUNT(marital = 'M'), COUNT(patient)) as percentage where DESCRIPTION = 'Cystitis';
patients name = first, last; streptococcal sore throat disorder refers to medications.REASONDESCRIPTION = 'Streptococcal sore throat (disorder)';
procedures refer to DESCRIPTION from procedures; medications refers to DESCRIPTION from medications; third-degree burn refers to conditions where DESCRIPTION = 'Third degree burn';
conditions refer to DESCRIPTION from conditions;
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';
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';
Italian patients refers to ethnicity = 'italian';
cystitis refers to conditions where DESCRIPTION = 'Cystitis';
Penicillin V Potassium 250 MG refers to medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'; percentage = MULTIPLY(DIVIDE(patients.patient WHERE gender = 'F'), COUNT(patients.patient) WHERE medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'), 100) female refers to gender = 'F';
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';
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';
procedure refers to procedures.DESCRIPTION; medicine prescribed refers to medications.DESCRIPTION; drug overdose refers to encounters.REASONDESCRIPTION = 'Drug overdose';
conditions refer to DESCRIPTION from conditions;
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;
full names = first, last; condition described as cystitis refers to conditions.DESCRIPTION = ''Cystitis';
What is the percentage of female patients who started the care plan in 2010?
female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
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';
male refers to gender = 'M'; immune to quadrivalent HPV refers to immunizations.DESCRIPTION = 'HPV quadrivalent';
condition no. 368581000119106 refers to conditions where CODE = '368581000119106';
viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)'; gender that is most affected refers to MAX(COUNT(gender WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder)'));
encountered normal pregnancy refers to encounters where REASONDESCRIPTION = 'Normal pregnancy';
condition on 2009/1/8 refers to DESCRIPTION from conditions where START = '2009-01-08';
in the year of 2011 refers to BILLABLEPERIOD between '2010-12-31' and '2012-01-01';
medical encounter ids careplans.ID; born in Pembroke MA US refers to birthplace = 'Pembroke MA US';
SUBTRACT(SUM(deathdate), SUM(birthdate)), COUNT(patient) where REASONDESCRIPTION = 'Prediabetes' from careplans;
female refers to gender = 'F'; "HPV quadrivalent" immunization refers to immunizations where DESCRIPTION = 'HPV quadrivalent';
List out the start date of the care plan of alive patients.
start of the care plan refers to careplans.START; alive patients refers to deathdate is null;
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]';
patients name = first, last; streptococcal sore throat disorder refers to medications.REASONDESCRIPTION = 'Streptococcal sore throat (disorder)';
full name refers to first, last; Yaz 28 Day Pack refers to DESCRIPTION = 'Yaz 28 Day Pack' from medications; started taking in 2011 refers to START like '2011%';
condition no. 368581000119106 refers to conditions where CODE = '368581000119106';
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION = 'Cystitis';
description of medication refers to medications.DESCRIPTION;
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';
allergic to peanuts refers to allergies.DESCRIPTION = 'Allergy to peanuts'; asthma refers to conditions.DESCRIPTION = 'Asthma';
DIVIDE(SUBTRACT(stop time - start time), COUNT(DESCRIPTION = 'Normal pregnancy')));
full name = first, last; otitis media refers to conditions.DESCRIPTION = 'Otitis media';
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';
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';
allergic to eggs refer to DESCRIPTION = 'Allergy to eggs' from allergies;
diseases started on 9th May 2014 refer to DESCRIPTION from conditions where START = '5/9/2014';
medical encounter ids careplans.ID; born in Pembroke MA US refers to birthplace = 'Pembroke MA US';
encountered normal pregnancy refers to encounters where REASONDESCRIPTION = 'Normal pregnancy';
DIVIDE(COUNT(marital = 'M'), COUNT(patient)) as percentage where DESCRIPTION = 'Cystitis';
Hispanic patients refers to ethnicity = 'hispanic'; percentage = MULTIPLY(DIVIDE(COUNT(careplans.PATIENT WHERE ethnicity = 'hispanic'), COUNT(careplans.PATIENT)), 1.0); stopped their care plan in 2011 refers to substr(careplans.stop, 1, 4) = '2011';
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';
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);
Penicillin V Potassium 250 MG refers to medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'; percentage = MULTIPLY(DIVIDE(patients.patient WHERE gender = 'F'), COUNT(patients.patient) WHERE medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'), 100) female refers to gender = 'F';
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)';
DIVIDE(SUBTRACT(stop time - start time), COUNT(ID)));
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);
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';
full name refers to first, last; have 3 different allergies refer to allergies where COUNT(DESCRIPTION) > 3;
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';
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';
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION like 'Acetaminophen%';
born in Pittsfield MA US refers to birthplace = 'Pittsfield MA US';
patients name = first, last; streptococcal sore throat disorder refers to medications.REASONDESCRIPTION = 'Streptococcal sore throat (disorder)';
full name = first, last; lung transplant refers to procedures.DESCRIPTION = 'Transplant of lung (procedure)';
Among the patients that started taking Ibuprofen 200mg Oral Tablet in 2016, how many Dominican patients stopped taking the medicine after exactly one month?
Ibuprofen 200mg Oral Tablet refers to DESCRIPTION = 'Ibuprofen 200 MG Oral Tablet' from medications; started in 2016 refers to START like '2016%'; Dominican patients refer to ethnicity = 'dominican'; stopped taking the medicine after exactly one month refers to SUBTRACT(strftime('%m', STOP), strftime('%m', START)) = 1;
procedure refers to procedures.DESCRIPTION; medicine prescribed refers to medications.DESCRIPTION; drug overdose refers to encounters.REASONDESCRIPTION = 'Drug overdose';
most common condition refers to MAX(COUNT(conditions.DESCRIPTION)); underweight patient refers to MIN(observations.VALUE WHERE observations.DESCRIPTION = 'Body Mass Index');
on 2009/8/9 refers to DATE = '2009-08-09';
description of the reason of the care plan refers to careplans.REASONDESCRIPTION;
the highest Systolic Blood Pressure refers to MAX(DESCRIPTION = 'Systolic Blood Pressure') from observations;
female refers to gender = 'F'; "HPV quadrivalent" immunization refers to immunizations where DESCRIPTION = 'HPV quadrivalent';
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';
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');
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';
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)));
What are the medical encounter ids of patients who were born in Pembroke MA US?
medical encounter ids careplans.ID; born in Pembroke MA US refers to birthplace = 'Pembroke MA US';
DIVIDE(COUNT(marital = 'M'), COUNT(patient)) as percentage where DESCRIPTION = 'Cystitis';
body weight VALUE and UNITS where DESCRIPTION = 'Body Weight' from observations;
condition on 2009/1/8 refers to DESCRIPTION from conditions where START = '2009-01-08';
procedures refer to DESCRIPTION from procedures;
care plans refer to DESCRIPTION from careplans; secondary malignant neoplasm of the colon refers to conditions where DESCRIPTION = 'Secondary malignant neoplasm of colon';
in the year of 2011 refers to BILLABLEPERIOD between '2010-12-31' and '2012-01-01';
condition refers to conditions.DESCRIPTION; in 2017 refers to substr(conditions.START, 1, 4) = '2017';
encountered normal pregnancy refers to encounters where REASONDESCRIPTION = 'Normal pregnancy';
how old = SUBTRACT(MIN(encounters.DATE), patients.birthdate); most recent medical encounter refers to MIN(encounters.DATE);
patient names = first, last; calcium deficiency refers to observations.DESCRIPTION = 'Calcium' and observations.VALUE < 8.6;
List down the first name of patients who have cystitis condition.
cystitis refers to conditions where DESCRIPTION = 'Cystitis';
conditions refer to DESCRIPTION from conditions;
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);
"Influenza seasonal injectable preservative free" immunization refers to immunizations where DESCRIPTION = 'Influenza seasonal injectable preservative free';
black refers to race = 'black'; stopped their care plan in 2017 refers to substr(careplans.STOP, 1, 4) = '2017';
start date of the care plan refers to careplans.START;
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';
how long = SUBTRACT(julianday(medications.stop), julianday(medications.START)); Acetaminophen 160 MG refers to medications.DESCRIPTION = 'Acetaminophen 160 MG';
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;
full name = first, last; otitis media refers to conditions.DESCRIPTION = 'Otitis media';
percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE gender = 'M'), COUNT(patients.patient) WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder))), 100); male patients refers to gender = 'M'; viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)';
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';
in the year of 2011 refers to BILLABLEPERIOD between '2010-12-31' and '2012-01-01';
age refers to SUBTRACT(strftime('%Y', deathdate), strftime('%Y', birthdate)); hypertension refers to conditions where DESCRIPTION = 'Hypertension';
diseases started on 9th May 2014 refer to DESCRIPTION from conditions where START = '5/9/2014';
medicine prescribed refers to DESCRIPTION from medications; social security number 999-94-3751 refers to ssn = '999-94-3751';
female refers to gender = 'F'; "HPV quadrivalent" immunization refers to immunizations where DESCRIPTION = 'HPV quadrivalent';
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;
full name = first, last; Diabetic diet refers to careplans.DESCRIPTION = 'Diabetic diet';
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';
medical encounter ids careplans.ID; born in Pembroke MA US refers to birthplace = 'Pembroke MA US';
percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE gender = 'M'), COUNT(patients.patient) WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder))), 100); male patients refers to gender = 'M'; viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)';
What is the care plan for the patient with social security number 999-15-3685?
social security number refers to ssn; ssn = '999-15-3685';
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';
the highest Systolic Blood Pressure refers to MAX(DESCRIPTION = 'Systolic Blood Pressure') from observations;
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';
procedures refer to DESCRIPTION from procedures;
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION = 'Cystitis';
age refers to SUBTRACT(strftime('%Y', deathdate), strftime('%Y', birthdate)); hypertension refers to conditions where DESCRIPTION = 'Hypertension';
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;
SUBTRACT(SUM(deathdate), SUM(birthdate)), COUNT(patient) where REASONDESCRIPTION = 'Prediabetes' from careplans;
allergies refer to PATIENT from allergies;
difference = SUBTRACT(patients.patient WHERE marital = 'M'), COUNT(patients.patient WHERE marital = 'S') WHERE conditions.DESCRIPTION = 'Diabetes'); married patients refers to marital = 'M'; single patients refers to marital = 'S'; diabetes refers to conditions.DESCRIPTION = 'Diabetes';
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;
description of medication refers to medications.DESCRIPTION;
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;
conditions refer to DESCRIPTION from conditions;
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;
second-degree burn refers to encounters.REASONDESCRIPTION = 'Second degree burn'; ;
full names = first, last; condition described as cystitis refers to conditions.DESCRIPTION = ''Cystitis';
the highest Systolic Blood Pressure refers to MAX(DESCRIPTION = 'Systolic Blood Pressure') from observations;
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]';
how long = SUBTRACT(julianday(medications.stop), julianday(medications.START)); Acetaminophen 160 MG refers to medications.DESCRIPTION = 'Acetaminophen 160 MG';
care plans refer to DESCRIPTION from careplans; secondary malignant neoplasm of the colon refers to conditions where DESCRIPTION = 'Secondary malignant neoplasm of colon';
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)' ;
body height status refers to DESCRIPTION = 'Body Height' from observations; on 2010/8/2 refers to DATE = '2010-08-02';
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;
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';
patient with the most prevalent condition refers to patient where MAX(PREVALENCE RATE); started recently refers to MAX(START);
female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
patients with prediabetes refer to PATIENT from conditions where DESCRIPTION = 'Prediabetes'; female refers to gender = 'F';
condition no. 368581000119106 refers to conditions where CODE = '368581000119106';
full name = first, last; lung transplant refers to procedures.DESCRIPTION = 'Transplant of lung (procedure)';
in the year of 2011 refers to BILLABLEPERIOD between '2010-12-31' and '2012-01-01';
viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)'; gender that is most affected refers to MAX(COUNT(gender WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder)'));
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);
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;
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';
condition refers to conditions.DESCRIPTION; in 2017 refers to substr(conditions.START, 1, 4) = '2017';
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;
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';
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';
the most common allergy refers to MAX(COUNT(DESCRIPTION)) from allergies;
born in Pittsfield MA US refers to birthplace = 'Pittsfield MA US';
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';
patients with prediabetes refer to PATIENT from conditions where DESCRIPTION = 'Prediabetes'; female refers to gender = 'F';
For how long was Elly Koss required to take Acetaminophen?
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION like 'Acetaminophen%';
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';
Penicillin V Potassium 250 MG refers to medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'; percentage = MULTIPLY(DIVIDE(patients.patient WHERE gender = 'F'), COUNT(patients.patient) WHERE medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'), 100) female refers to gender = 'F';
why need to take Acetaminophen refers to REASONDESCRIPTION  where DESCRIPTION like 'Acetaminophen%' from medications;
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]';
"Influenza seasonal injectable preservative free" immunization refers to immunizations where DESCRIPTION = 'Influenza seasonal injectable preservative free';
the highest Systolic Blood Pressure refers to MAX(DESCRIPTION = 'Systolic Blood Pressure') from observations;
medication that are prescribed refers to DESCRIPTION from medications;
Asian refers to race like 'asian%'; allergic to peanuts refers to allergies where DESCRIPTION = 'Allergy to peanuts';
full names = first, last; condition described as cystitis refers to conditions.DESCRIPTION = ''Cystitis';
Italian patients refers to ethnicity = 'italian';
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';
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION like 'Acetaminophen%';
medication that are prescribed refers to DESCRIPTION from medications;
how long = SUBTRACT(julianday(medications.stop), julianday(medications.START)); Acetaminophen 160 MG refers to medications.DESCRIPTION = 'Acetaminophen 160 MG';
full name = first, last; lung transplant refers to procedures.DESCRIPTION = 'Transplant of lung (procedure)';
condition refers to conditions.DESCRIPTION; in 2017 refers to substr(conditions.START, 1, 4) = '2017';
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';
DIVIDE(SUM(VALUE), COUNT(VALUE)) WHERE DESCRIPTION = 'Body Weight';
on 2009/8/9 refers to DATE = '2009-08-09';
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;
most common condition refers to MAX(COUNT(conditions.DESCRIPTION)); underweight patient refers to MIN(observations.VALUE WHERE observations.DESCRIPTION = 'Body Mass Index');
Please list all the medication that are prescribed to Elly Koss.
medication that are prescribed refers to DESCRIPTION from medications;
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';
age refers to SUBTRACT(strftime('%Y', deathdate), strftime('%Y', birthdate)); hypertension refers to conditions where DESCRIPTION = 'Hypertension';
the highest Systolic Blood Pressure refers to MAX(DESCRIPTION = 'Systolic Blood Pressure') from observations;
start of the care plan refers to careplans.START; alive patients refers to deathdate is null;
DIVIDE(SUBTRACT(stop time - start time), COUNT(ID)));
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';
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]';
Asian refers to race like 'asian%'; allergic to peanuts refers to allergies where DESCRIPTION = 'Allergy to peanuts';
DIVIDE(SUBTRACT(stop time - start time), COUNT(DESCRIPTION = 'Normal pregnancy')));
DIVIDE(COUNT(PATIENT where gender = 'F' and race = 'asian'), COUNT(PATIENT)) as percentage where DESCRIPTION = 'Acute bronchitis (disorder)' ;
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;
social security number refers to ssn; ssn = '999-15-3685';
procedures refer to DESCRIPTION from procedures; medications refers to DESCRIPTION from medications; third-degree burn refers to conditions where DESCRIPTION = 'Third degree burn';
encountered normal pregnancy refers to encounters where REASONDESCRIPTION = 'Normal pregnancy';
full names = first, last; condition described as cystitis refers to conditions.DESCRIPTION = ''Cystitis';
body weight VALUE and UNITS where DESCRIPTION = 'Body Weight' from observations;
Asian refers to race like 'asian%'; allergic to peanuts refers to allergies where DESCRIPTION = 'Allergy to peanuts';
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';
medication that are prescribed refers to DESCRIPTION from medications;
diabetes that started in 1988 refers to DESCRIPTION = 'Diabetes' from conditions and START like '1988%';
second-degree burn refers to encounters.REASONDESCRIPTION = 'Second degree burn'; ;
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';
diseases started on 9th May 2014 refer to DESCRIPTION from conditions where START = '5/9/2014';
second-degree burn refers to encounters.REASONDESCRIPTION = 'Second degree burn'; ;
full name = first, last; Diabetic diet refers to careplans.DESCRIPTION = 'Diabetic diet';
expecting mothers can be attributed to encounters.REASONDESCRIPTION = 'Normal pregnancy';
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;
between 2010 and 2017 refers to substr(encounters.DATE, 1, 4) between '2010' and '2017'; percentage = MULTIPLY(DIVIDE(COUNT(encounters.ID WHERE DESCRIPTION = 'Prenatal visit'), count(encounters.ID)), 1.0); prenatal visits refers to encounters.DESCRIPTION = 'Prenatal visit';
female refers to gender = 'F'; "HPV quadrivalent" immunization refers to immunizations where DESCRIPTION = 'HPV quadrivalent';
care plans refer to DESCRIPTION from careplans; secondary malignant neoplasm of the colon refers to conditions where DESCRIPTION = 'Secondary malignant neoplasm of colon';
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION like 'Acetaminophen%';
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';
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' ;
patient with the most prevalent condition refers to patient where MAX(PREVALENCE RATE); started recently refers to MAX(START);
description of the reason of the care plan refers to careplans.REASONDESCRIPTION;
patient names = first, last; calcium deficiency refers to observations.DESCRIPTION = 'Calcium' and observations.VALUE < 8.6;
medication that are prescribed refers to DESCRIPTION from medications;
born in Pittsfield MA US refers to birthplace = 'Pittsfield MA US';
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';
black refers to race = 'black'; stopped their care plan in 2017 refers to substr(careplans.STOP, 1, 4) = '2017';
condition on 2009/1/8 refers to DESCRIPTION from conditions where START = '2009-01-08';
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);
"Influenza seasonal injectable preservative free" immunization refers to immunizations where DESCRIPTION = 'Influenza seasonal injectable preservative free';
How many immunizations did the patient with the most prevalent condition that started recently get?
patient with the most prevalent condition refers to patient where MAX(PREVALENCE RATE); started recently refers to MAX(START);
encountered normal pregnancy refers to encounters where REASONDESCRIPTION = 'Normal pregnancy';
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;
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';
full name = first, last; Diabetic diet refers to careplans.DESCRIPTION = 'Diabetic diet';
Ibuprofen 200mg Oral Tablet refers to DESCRIPTION = 'Ibuprofen 200 MG Oral Tablet' from medications; started in 2016 refers to START like '2016%'; Dominican patients refer to ethnicity = 'dominican'; stopped taking the medicine after exactly one month refers to SUBTRACT(strftime('%m', STOP), strftime('%m', START)) = 1;
body weight VALUE and UNITS where DESCRIPTION = 'Body Weight' from observations;
stop date of the care plan refers to careplans.STOP; dead patients refers to deathdate is not null;
full name = first, last; Irish refers to ethnicity = 'irish'; prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions = OCCURRENCES > (AVG(MULTIPLY(all_prevalences.OCCURRENCES, 0.96)));
how long = SUBTRACT(julianday(medications.stop), julianday(medications.START)); Acetaminophen 160 MG refers to medications.DESCRIPTION = 'Acetaminophen 160 MG';
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;
What is the percentage of Hispanic patients who stopped their care plan in 2011?
Hispanic patients refers to ethnicity = 'hispanic'; percentage = MULTIPLY(DIVIDE(COUNT(careplans.PATIENT WHERE ethnicity = 'hispanic'), COUNT(careplans.PATIENT)), 1.0); stopped their care plan in 2011 refers to substr(careplans.stop, 1, 4) = '2011';
how long the allergies last = SUBTRACT(allergies.STOP, allergies.START); kind of allergy refers to allergies.DESCRIPTION;
allergic to eggs refer to DESCRIPTION = 'Allergy to eggs' from allergies;
unmarried refers to marital = 'S'; women refers to gender = 'F'; normal pregnancy refers to conditions.DESCRIPTION = 'normal pregnancy';
in 2010 refers to substr(encounters.DATE, 1, 4) = '2010'; contact dermatitis refers to encounters.REASONDESCRIPTION = 'Contact dermatitis'; percentage = MULTIPLY(DIVIDE(COUNT(encounters.PATIENT WHERE gender = 'F'), count(encounters.PATIENT) WHERE encounters.REASONDESCRIPTION = 'Contact dermatitis'), 1.0) females refers to gender = 'F';
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;
patient names = first, last; calcium deficiency refers to observations.DESCRIPTION = 'Calcium' and observations.VALUE < 8.6;
DIVIDE(SUM(VALUE), COUNT(VALUE)) WHERE DESCRIPTION = 'Body Weight';
encountered normal pregnancy refers to encounters where REASONDESCRIPTION = 'Normal pregnancy';
full name = first, last; lung transplant refers to procedures.DESCRIPTION = 'Transplant of lung (procedure)';
condition on 2009/1/8 refers to DESCRIPTION from conditions where START = '2009-01-08';
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';
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;
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';
full names = first, last; condition described as cystitis refers to conditions.DESCRIPTION = ''Cystitis';
conditions refer to DESCRIPTION from conditions;
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);
full name refers to first, last; Yaz 28 Day Pack refers to DESCRIPTION = 'Yaz 28 Day Pack' from medications; started taking in 2011 refers to START like '2011%';
full name = first, last; Irish refers to ethnicity = 'irish'; prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions = OCCURRENCES > (AVG(MULTIPLY(all_prevalences.OCCURRENCES, 0.96)));
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';
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)';
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;
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';
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';
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';
unmarried refers to marital = 'S'; women refers to gender = 'F'; normal pregnancy refers to conditions.DESCRIPTION = 'normal pregnancy';
full names = first, last; nut allergy refers to allergies.DESCRIPTION = 'Allergy to nut';
procedures refer to DESCRIPTION from procedures; medications refers to DESCRIPTION from medications; third-degree burn refers to conditions where DESCRIPTION = 'Third degree burn';
Penicillin V Potassium 250 MG refers to medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'; percentage = MULTIPLY(DIVIDE(patients.patient WHERE gender = 'F'), COUNT(patients.patient) WHERE medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'), 100) female refers to gender = 'F';
reason for visiting medical professionals refers to encounters.REASONDESCRIPTION;  in July 2009 refers to  substr(encounters.DATE, 1, 7) = '2009-07' ;
full name = first, last; lung transplant refers to procedures.DESCRIPTION = 'Transplant of lung (procedure)';
description of the reason of the care plan refers to careplans.REASONDESCRIPTION;
born in Pittsfield MA US refers to birthplace = 'Pittsfield MA US';
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';
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;
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';
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';
Italian patients refers to ethnicity = 'italian';
condition no. 368581000119106 refers to conditions where CODE = '368581000119106';
conditions refer to DESCRIPTION from conditions;
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION = 'Cystitis';
the most common condition refers to MAX(COUNT(DESCRIPTION)); among the female Americans refer to PATIENT where gender = 'F' and ethnicity = 'american';
allergic to eggs refer to DESCRIPTION = 'Allergy to eggs' from allergies;
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;
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);
second-degree burn refers to encounters.REASONDESCRIPTION = 'Second degree burn'; ;
diabetes that started in 1988 refers to DESCRIPTION = 'Diabetes' from conditions and START like '1988%';
care plans refer to DESCRIPTION from careplans; secondary malignant neoplasm of the colon refers to conditions where DESCRIPTION = 'Secondary malignant neoplasm of colon';
Asian refers to race like 'asian%'; allergic to peanuts refers to allergies where DESCRIPTION = 'Allergy to peanuts';
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);
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);
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;
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';
procedures refer to DESCRIPTION from procedures; medications refers to DESCRIPTION from medications; third-degree burn refers to conditions where DESCRIPTION = 'Third degree burn';
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION = 'Cystitis';
How many male patients have been described as immune to quadrivalent HPV?
male refers to gender = 'M'; immune to quadrivalent HPV refers to immunizations.DESCRIPTION = 'HPV quadrivalent';
condition no. 368581000119106 refers to conditions where CODE = '368581000119106';
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)';
difference = SUBTRACT(patients.patient WHERE marital = 'M'), COUNT(patients.patient WHERE marital = 'S') WHERE conditions.DESCRIPTION = 'Diabetes'); married patients refers to marital = 'M'; single patients refers to marital = 'S'; diabetes refers to conditions.DESCRIPTION = 'Diabetes';
"Influenza seasonal injectable preservative free" immunization refers to immunizations where DESCRIPTION = 'Influenza seasonal injectable preservative free';
condition on 2009/1/8 refers to DESCRIPTION from conditions where START = '2009-01-08';
Hispanic patients refers to ethnicity = 'hispanic'; percentage = MULTIPLY(DIVIDE(COUNT(careplans.PATIENT WHERE ethnicity = 'hispanic'), COUNT(careplans.PATIENT)), 1.0); stopped their care plan in 2011 refers to substr(careplans.stop, 1, 4) = '2011';
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';
medical encounter ids careplans.ID; born in Pembroke MA US refers to birthplace = 'Pembroke MA US';
viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)'; gender that is most affected refers to MAX(COUNT(gender WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder)'));
female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
How many patients have diabetes that started in 1988?
diabetes that started in 1988 refers to DESCRIPTION = 'Diabetes' from conditions and START like '1988%';
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';
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);
diseases started on 9th May 2014 refer to DESCRIPTION from conditions where START = '5/9/2014';
patients with prediabetes refer to PATIENT from conditions where DESCRIPTION = 'Prediabetes'; female refers to gender = 'F';
age refers to SUBTRACT(strftime('%Y', deathdate), strftime('%Y', birthdate)); hypertension refers to conditions where DESCRIPTION = 'Hypertension';
patient names = first, last; calcium deficiency refers to observations.DESCRIPTION = 'Calcium' and observations.VALUE < 8.6;
stop date of the care plan refers to careplans.STOP; dead patients refers to deathdate is not null;
female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
Italian patients refers to ethnicity = 'italian';
patient with the most prevalent condition refers to patient where MAX(PREVALENCE RATE); started recently refers to MAX(START);
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';
allergic to eggs refer to DESCRIPTION = 'Allergy to eggs' from allergies;
female patients refers to gender = 'F'; started the care plan in 2010 refers to substr(careplans.START, 1, 4) = '2010'; percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE patients.gender = 'F'), COUNT(patients.patient) WHERE substr(careplans.START, 1, 4) = '2010'), 100);
allergies refer to PATIENT from allergies;
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';
full name = first, last; Diabetic diet refers to careplans.DESCRIPTION = 'Diabetic diet';
how long the allergies last = SUBTRACT(allergies.STOP, allergies.START); kind of allergy refers to allergies.DESCRIPTION;
condition refers to conditions.DESCRIPTION; in 2017 refers to substr(conditions.START, 1, 4) = '2017';
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;
DIVIDE(SUBTRACT(stop time - start time), COUNT(DESCRIPTION = 'Normal pregnancy')));
on 2009/8/9 refers to DATE = '2009-08-09';
How many Italian patients have the care plan code of 304510005?
Italian patients refers to ethnicity = 'italian';
description of the reason of the care plan refers to careplans.REASONDESCRIPTION;
most common condition refers to MAX(COUNT(conditions.DESCRIPTION)); underweight patient refers to MIN(observations.VALUE WHERE observations.DESCRIPTION = 'Body Mass Index');
DIVIDE(COUNT(PATIENT where gender = 'F' and race = 'asian'), COUNT(PATIENT)) as percentage where DESCRIPTION = 'Acute bronchitis (disorder)' ;
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;
condition refers to conditions.DESCRIPTION; in 2017 refers to substr(conditions.START, 1, 4) = '2017';
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;
born in Pittsfield MA US refers to birthplace = 'Pittsfield MA US';
diabetes that started in 1988 refers to DESCRIPTION = 'Diabetes' from conditions and START like '1988%';
immunized with meningococcal MCV4P refers to DESCRIPTION = 'meningococcal MCV4P' from immunizations; viral sinusitis disorder refers to DESCRIPTION = 'Viral sinusitis (disorder)' from conditions;
Penicillin V Potassium 250 MG refers to medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'; percentage = MULTIPLY(DIVIDE(patients.patient WHERE gender = 'F'), COUNT(patients.patient) WHERE medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'), 100) female refers to gender = 'F';
State the prevalence rate of condition no. 368581000119106.
condition no. 368581000119106 refers to conditions where CODE = '368581000119106';
immunized with meningococcal MCV4P refers to DESCRIPTION = 'meningococcal MCV4P' from immunizations; viral sinusitis disorder refers to DESCRIPTION = 'Viral sinusitis (disorder)' from conditions;
procedures refer to DESCRIPTION from procedures; medications refers to DESCRIPTION from medications; third-degree burn refers to conditions where DESCRIPTION = 'Third degree burn';
in the year of 2011 refers to BILLABLEPERIOD between '2010-12-31' and '2012-01-01';
percentage = MULTIPLY(DIVIDE(COUNT(patients.patient WHERE gender = 'M'), COUNT(patients.patient) WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder))), 100); male patients refers to gender = 'M'; viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)';
encountered normal pregnancy refers to encounters where REASONDESCRIPTION = 'Normal pregnancy';
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');
DIVIDE(SUM(VALUE), COUNT(VALUE)) WHERE DESCRIPTION = 'Body Weight';
why need to take Acetaminophen refers to REASONDESCRIPTION  where DESCRIPTION like 'Acetaminophen%' from medications;
DIVIDE(COUNT(marital = 'M'), COUNT(patient)) as percentage where DESCRIPTION = 'Cystitis';
patient names = first, last; calcium deficiency refers to observations.DESCRIPTION = 'Calcium' and observations.VALUE < 8.6;
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');
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';
black refers to race = 'black'; stopped their care plan in 2017 refers to substr(careplans.STOP, 1, 4) = '2017';
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]';
full name = first, last; otitis media refers to conditions.DESCRIPTION = 'Otitis media';
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';
SUM(MULTIPLY(365, SUBTRACT(strftime('%Y', STOP), strftime('%Y', START))), MULTIPLY(30, SUBTRACT(strftime('%m', STOP), strftime('%m', START))), SUBTRACT(strftime('%d', STOP), strftime('%d', START))) where DESCRIPTION like 'Acetaminophen%';
reason for visiting medical professionals refers to encounters.REASONDESCRIPTION;  in July 2009 refers to  substr(encounters.DATE, 1, 7) = '2009-07' ;
the most common condition refers to MAX(COUNT(DESCRIPTION)); among the female Americans refer to PATIENT where gender = 'F' and ethnicity = 'american';
second-degree burn refers to encounters.REASONDESCRIPTION = 'Second degree burn'; ;
Asian refers to race like 'asian%'; allergic to peanuts refers to allergies where DESCRIPTION = 'Allergy to peanuts';