Skip to content

Commit

Permalink
clarify DDD question
Browse files Browse the repository at this point in the history
  • Loading branch information
wendy-aw authored and rishsriv committed Jun 26, 2024
1 parent bb250ab commit c40403b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data/instruct_advanced_bigquery.csv
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ derm_treatment,bigquery,keywords_aggregate,SELECT AVG(weight_kg) AS caw FROM der
CAW = cohort average weight in kilograms
To calculate the D7D100PIR, subtract the average PASI score at the beginning of the period from the average at the end, divide by the initial average, and multiply by 100
The Defined Daily Dose (DDD) is calculated as the total consumed medication divided by the treatment duration"
derm_treatment,bigquery,keywords_ratio,"SELECT d.drug_name, AVG(t.tot_drug_amt / NULLIF(DATE_DIFF(t.end_dt, t.start_dt, DAY), 0)) AS ddd FROM derm_treatment.treatments AS t JOIN derm_treatment.drugs AS d ON t.drug_id = d.drug_id WHERE t.end_dt IS NOT NULL GROUP BY d.drug_name;",Calculate the DDD for each drug. Return the drug name and DDD value.,"DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days), where end date is not null","DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days). To find the average weight of patients treated with a specific drug, first join patients with treatments on patient_id, then filter by the drug name. To identify doctors who have prescribed a certain drug type and their respective locations, first join doctors with treatments on doc_id, then filter by the drug type. To calculate the total number of adverse events reported for treatments involving certain drug types, first join treatments with adverse_events on treatment_id, then filter by the drug type."
derm_treatment,bigquery,keywords_ratio,"SELECT d.drug_name, AVG(t.tot_drug_amt / NULLIF(DATE_DIFF(t.end_dt, t.start_dt, DAY), 0)) AS ddd FROM derm_treatment.treatments AS t JOIN derm_treatment.drugs AS d ON t.drug_id = d.drug_id WHERE t.end_dt IS NOT NULL GROUP BY d.drug_name;",Calculate the average DDD for each drug. Return the drug name and average DDD value.,"DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days), where end date is not null","DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days). To find the average weight of patients treated with a specific drug, first join patients with treatments on patient_id, then filter by the drug name. To identify doctors who have prescribed a certain drug type and their respective locations, first join doctors with treatments on doc_id, then filter by the drug type. To calculate the total number of adverse events reported for treatments involving certain drug types, first join treatments with adverse_events on treatment_id, then filter by the drug type."
derm_treatment,bigquery,keywords_ratio,SELECT (AVG(day100_pasi_score) - AVG(day7_pasi_score)) / AVG(day7_pasi_score) * 100 AS d7d100pir FROM derm_treatment.outcomes WHERE NOT day7_pasi_score IS NULL AND NOT day100_pasi_score IS NULL;,What is the overall D7D100PIR across all treatments? Return the percentage value.,D7D100PIR (day 7 to day 100 PASI improvement rate) = (avg PASI score on day 100 - avg PASI score on day 7) / avg PASI score on day 7 * 100. This should only include patients who have non-null PASI scores for both timepoints.,"To discover the average weight of patients who have been prescribed a specific medication, begin by associating patients with treatments on patient_id, and then apply a filter by the drug name.
D7D100PIR (day 7 to day 100 PASI improvement rate) = (avg PASI score on day 100 - avg PASI score on day 7) / avg PASI score on day 7 * 100. This should only include patients who have non-null PASI scores for both timepoints.
To identify doctors who have prescribed a certain type of drug and their state of practice, initially join doctors with treatments on doc_id, followed by filtering based on the drug type
Expand Down
2 changes: 1 addition & 1 deletion data/instruct_advanced_mysql.csv
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ derm_treatment,mysql,keywords_aggregate,SELECT AVG(weight_kg) AS caw FROM patien
CAW = cohort average weight in kilograms
To calculate the D7D100PIR, subtract the average PASI score at the beginning of the period from the average at the end, divide by the initial average, and multiply by 100
The Defined Daily Dose (DDD) is calculated as the total consumed medication divided by the treatment duration"
derm_treatment,mysql,keywords_ratio,"SELECT d.drug_name, AVG(t.tot_drug_amt / NULLIF((t.end_dt - t.start_dt), 0)) AS ddd FROM treatments AS t JOIN drugs AS d ON t.drug_id = d.drug_id WHERE NOT t.end_dt IS NULL GROUP BY d.drug_name;",Calculate the DDD for each drug. Return the drug name and DDD value.,"DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days), where end date is not null","DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days). To find the average weight of patients treated with a specific drug, first join patients with treatments on patient_id, then filter by the drug name. To identify doctors who have prescribed a certain drug type and their respective locations, first join doctors with treatments on doc_id, then filter by the drug type. To calculate the total number of adverse events reported for treatments involving certain drug types, first join treatments with adverse_events on treatment_id, then filter by the drug type."
derm_treatment,mysql,keywords_ratio,"SELECT d.drug_name, AVG(t.tot_drug_amt / NULLIF((t.end_dt - t.start_dt), 0)) AS ddd FROM treatments AS t JOIN drugs AS d ON t.drug_id = d.drug_id WHERE NOT t.end_dt IS NULL GROUP BY d.drug_name;",Calculate the average DDD for each drug. Return the drug name and average DDD value.,"DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days), where end date is not null","DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days). To find the average weight of patients treated with a specific drug, first join patients with treatments on patient_id, then filter by the drug name. To identify doctors who have prescribed a certain drug type and their respective locations, first join doctors with treatments on doc_id, then filter by the drug type. To calculate the total number of adverse events reported for treatments involving certain drug types, first join treatments with adverse_events on treatment_id, then filter by the drug type."
derm_treatment,mysql,keywords_ratio,SELECT (AVG(day100_pasi_score) - AVG(day7_pasi_score)) / AVG(day7_pasi_score) * 100 AS d7d100pir FROM outcomes WHERE NOT day7_pasi_score IS NULL AND NOT day100_pasi_score IS NULL;,What is the overall D7D100PIR across all treatments? Return the percentage value.,D7D100PIR (day 7 to day 100 PASI improvement rate) = (avg PASI score on day 100 - avg PASI score on day 7) / avg PASI score on day 7 * 100. This should only include patients who have non-null PASI scores for both timepoints.,"To discover the average weight of patients who have been prescribed a specific medication, begin by associating patients with treatments on patient_id, and then apply a filter by the drug name.
D7D100PIR (day 7 to day 100 PASI improvement rate) = (avg PASI score on day 100 - avg PASI score on day 7) / avg PASI score on day 7 * 100. This should only include patients who have non-null PASI scores for both timepoints.
To identify doctors who have prescribed a certain type of drug and their state of practice, initially join doctors with treatments on doc_id, followed by filtering based on the drug type
Expand Down
2 changes: 1 addition & 1 deletion data/instruct_advanced_postgres.csv
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ derm_treatment,keywords_aggregate,What is the CAW for male patients,CAW = cohort
CAW = cohort average weight in kilograms
To calculate the D7D100PIR, subtract the average PASI score at the beginning of the period from the average at the end, divide by the initial average, and multiply by 100
The Defined Daily Dose (DDD) is calculated as the total consumed medication divided by the treatment duration"
derm_treatment,keywords_ratio,Calculate the DDD for each drug. Return the drug name and DDD value.,"DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days), where end date is not null","SELECT d.drug_name, AVG(t.tot_drug_amt / NULLIF((t.end_dt - t.start_dt), 0)) AS ddd FROM treatments t JOIN drugs d ON t.drug_id = d.drug_id WHERE t.end_dt IS NOT NULL GROUP BY d.drug_name","DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days). To find the average weight of patients treated with a specific drug, first join patients with treatments on patient_id, then filter by the drug name. To identify doctors who have prescribed a certain drug type and their respective locations, first join doctors with treatments on doc_id, then filter by the drug type. To calculate the total number of adverse events reported for treatments involving certain drug types, first join treatments with adverse_events on treatment_id, then filter by the drug type."
derm_treatment,keywords_ratio,Calculate the average DDD for each drug. Return the drug name and average DDD value.,"DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days), where end date is not null","SELECT d.drug_name, AVG(t.tot_drug_amt / NULLIF((t.end_dt - t.start_dt), 0)) AS ddd FROM treatments t JOIN drugs d ON t.drug_id = d.drug_id WHERE t.end_dt IS NOT NULL GROUP BY d.drug_name","DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days). To find the average weight of patients treated with a specific drug, first join patients with treatments on patient_id, then filter by the drug name. To identify doctors who have prescribed a certain drug type and their respective locations, first join doctors with treatments on doc_id, then filter by the drug type. To calculate the total number of adverse events reported for treatments involving certain drug types, first join treatments with adverse_events on treatment_id, then filter by the drug type."
derm_treatment,keywords_ratio,What is the overall D7D100PIR across all treatments? Return the percentage value.,D7D100PIR (day 7 to day 100 PASI improvement rate) = (avg PASI score on day 100 - avg PASI score on day 7) / avg PASI score on day 7 * 100. This should only include patients who have non-null PASI scores for both timepoints.,SELECT (AVG(day100_pasi_score) - AVG(day7_pasi_score)) / AVG(day7_pasi_score) * 100 AS d7d100pir FROM outcomes WHERE day7_pasi_score IS NOT NULL AND day100_pasi_score IS NOT NULL,"To discover the average weight of patients who have been prescribed a specific medication, begin by associating patients with treatments on patient_id, and then apply a filter by the drug name.
D7D100PIR (day 7 to day 100 PASI improvement rate) = (avg PASI score on day 100 - avg PASI score on day 7) / avg PASI score on day 7 * 100. This should only include patients who have non-null PASI scores for both timepoints.
To identify doctors who have prescribed a certain type of drug and their state of practice, initially join doctors with treatments on doc_id, followed by filtering based on the drug type
Expand Down
2 changes: 1 addition & 1 deletion data/instruct_advanced_sqlite.csv
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ derm_treatment,sqlite,keywords_aggregate,SELECT AVG(weight_kg) AS caw FROM patie
CAW = cohort average weight in kilograms
To calculate the D7D100PIR, subtract the average PASI score at the beginning of the period from the average at the end, divide by the initial average, and multiply by 100
The Defined Daily Dose (DDD) is calculated as the total consumed medication divided by the treatment duration"
derm_treatment,sqlite,keywords_ratio,"SELECT d.drug_name, AVG(t.tot_drug_amt / NULLIF((t.end_dt - t.start_dt), 0)) AS ddd FROM treatments AS t JOIN drugs AS d ON t.drug_id = d.drug_id WHERE NOT t.end_dt IS NULL GROUP BY d.drug_name;",Calculate the DDD for each drug. Return the drug name and DDD value.,"DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days), where end date is not null","DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days). To find the average weight of patients treated with a specific drug, first join patients with treatments on patient_id, then filter by the drug name. To identify doctors who have prescribed a certain drug type and their respective locations, first join doctors with treatments on doc_id, then filter by the drug type. To calculate the total number of adverse events reported for treatments involving certain drug types, first join treatments with adverse_events on treatment_id, then filter by the drug type."
derm_treatment,sqlite,keywords_ratio,"SELECT d.drug_name, AVG(t.tot_drug_amt / NULLIF((t.end_dt - t.start_dt), 0)) AS ddd FROM treatments AS t JOIN drugs AS d ON t.drug_id = d.drug_id WHERE NOT t.end_dt IS NULL GROUP BY d.drug_name;",Calculate the average DDD for each drug. Return the drug name and average DDD value.,"DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days), where end date is not null","DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days). To find the average weight of patients treated with a specific drug, first join patients with treatments on patient_id, then filter by the drug name. To identify doctors who have prescribed a certain drug type and their respective locations, first join doctors with treatments on doc_id, then filter by the drug type. To calculate the total number of adverse events reported for treatments involving certain drug types, first join treatments with adverse_events on treatment_id, then filter by the drug type."
derm_treatment,sqlite,keywords_ratio,SELECT (AVG(day100_pasi_score) - AVG(day7_pasi_score)) / AVG(day7_pasi_score) * 100 AS d7d100pir FROM outcomes WHERE NOT day7_pasi_score IS NULL AND NOT day100_pasi_score IS NULL;,What is the overall D7D100PIR across all treatments? Return the percentage value.,D7D100PIR (day 7 to day 100 PASI improvement rate) = (avg PASI score on day 100 - avg PASI score on day 7) / avg PASI score on day 7 * 100. This should only include patients who have non-null PASI scores for both timepoints.,"To discover the average weight of patients who have been prescribed a specific medication, begin by associating patients with treatments on patient_id, and then apply a filter by the drug name.
D7D100PIR (day 7 to day 100 PASI improvement rate) = (avg PASI score on day 100 - avg PASI score on day 7) / avg PASI score on day 7 * 100. This should only include patients who have non-null PASI scores for both timepoints.
To identify doctors who have prescribed a certain type of drug and their state of practice, initially join doctors with treatments on doc_id, followed by filtering based on the drug type
Expand Down
2 changes: 1 addition & 1 deletion data/instruct_advanced_tsql.csv
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ derm_treatment,tsql,keywords_aggregate,SELECT AVG(weight_kg) AS caw FROM patient
CAW = cohort average weight in kilograms
To calculate the D7D100PIR, subtract the average PASI score at the beginning of the period from the average at the end, divide by the initial average, and multiply by 100
The Defined Daily Dose (DDD) is calculated as the total consumed medication divided by the treatment duration"
derm_treatment,tsql,keywords_ratio,"SELECT d.drug_name, AVG(t.tot_drug_amt / NULLIF(DATEDIFF(day, t.start_dt, t.end_dt), 0)) AS ddd FROM treatments AS t JOIN drugs AS d ON t.drug_id = d.drug_id WHERE t.end_dt IS NOT NULL GROUP BY d.drug_name;",Calculate the DDD for each drug. Return the drug name and DDD value.,"DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days), where end date is not null","DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days). To find the average weight of patients treated with a specific drug, first join patients with treatments on patient_id, then filter by the drug name. To identify doctors who have prescribed a certain drug type and their respective locations, first join doctors with treatments on doc_id, then filter by the drug type. To calculate the total number of adverse events reported for treatments involving certain drug types, first join treatments with adverse_events on treatment_id, then filter by the drug type."
derm_treatment,tsql,keywords_ratio,"SELECT d.drug_name, AVG(t.tot_drug_amt / NULLIF(DATEDIFF(day, t.start_dt, t.end_dt), 0)) AS ddd FROM treatments AS t JOIN drugs AS d ON t.drug_id = d.drug_id WHERE t.end_dt IS NOT NULL GROUP BY d.drug_name;",Calculate the average DDD for each drug. Return the drug name and average DDD value.,"DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days), where end date is not null","DDD (defined daily dose) = total drug amount consumed / total days of treatment (end - start date in days). To find the average weight of patients treated with a specific drug, first join patients with treatments on patient_id, then filter by the drug name. To identify doctors who have prescribed a certain drug type and their respective locations, first join doctors with treatments on doc_id, then filter by the drug type. To calculate the total number of adverse events reported for treatments involving certain drug types, first join treatments with adverse_events on treatment_id, then filter by the drug type."
derm_treatment,tsql,keywords_ratio,SELECT (AVG(day100_pasi_score) - AVG(day7_pasi_score)) / AVG(day7_pasi_score) * 100 AS d7d100pir FROM outcomes WHERE NOT day7_pasi_score IS NULL AND NOT day100_pasi_score IS NULL;,What is the overall D7D100PIR across all treatments? Return the percentage value.,D7D100PIR (day 7 to day 100 PASI improvement rate) = (avg PASI score on day 100 - avg PASI score on day 7) / avg PASI score on day 7 * 100. This should only include patients who have non-null PASI scores for both timepoints.,"To discover the average weight of patients who have been prescribed a specific medication, begin by associating patients with treatments on patient_id, and then apply a filter by the drug name.
D7D100PIR (day 7 to day 100 PASI improvement rate) = (avg PASI score on day 100 - avg PASI score on day 7) / avg PASI score on day 7 * 100. This should only include patients who have non-null PASI scores for both timepoints.
To identify doctors who have prescribed a certain type of drug and their state of practice, initially join doctors with treatments on doc_id, followed by filtering based on the drug type
Expand Down

0 comments on commit c40403b

Please sign in to comment.