Below are the database queries which are used to create this measure. These are run against a copy of the BSA prescribing data which we store in Google BigQuery. We're working on making our BigQuery tables publicly available at which point it will be possible to run and modify these queries yourself. But even where code and database queries are not directly useable by others we believe it is always preferable to make them public.
Description | Total quantity where a prescription is for four pens per prescription as a proportion of all semaglutide and tirzepatide prescribing |
---|---|
Why it matters | Semaglutide and tirzepatide are both used mainly to treat diabetes. Semaglutide injection is used weekly and is only available as a multidose pre-filled pen, each of which contains four doses so one multidose pen will last for one month. Tirzepatide is used weekly and is licensed in both a single-use and a multidose pre-filled pen form. The tirzepatide multidose pen contains four doses so one multidose pen will last for one month. There have been some reports that prescribers are requesting four multidose pens per month in error. This is unlikely to be required and likely to be caused by the dose and quantity being confused on a picking list. |
Tags | Standard, Cost Saving, Diabetes, Safety |
Implies cost savings | No |
Authored by | christopher.wood |
Checked by | richard.croker |
Last reviewed | 2024-06-24 |
Next review due | 2026-06-24 |
Associated notebook | https://github.com/ebmdatalab/jupyter-notebooks/blob/e9168900e2ecf08d80315d38fd155f1ce45a435f/measures_by_software/Draft%20ideas/Diabetes%20-%20Semaglutide/Semaglutide%20Quantity%20Draft.ipynb |
History | View change history on GitHub → |
SELECT
CAST(month AS DATE) AS month,
practice AS practice_id,
SUM(total_quantity) AS numerator
FROM hscic.raw_prescribing_normalised
WHERE quantity_per_item>3 AND ((bnf_code LIKE '0601023AW%' --Semaglutide
AND bnf_name LIKE '%inj%') OR (bnf_code LIKE '0601023AZ%' --Tirzepatide
AND bnf_name LIKE '%0.6ml%' --limit to 0.6ml pens as these are multidose Kwikpens
AND bnf_name LIKE '%inj%'))
GROUP BY month, practice_id
SELECT
CAST(month AS DATE) AS month,
practice AS practice_id,
SUM(total_quantity) AS denominator
FROM hscic.raw_prescribing_normalised
WHERE (bnf_code LIKE '0601023AW%' --Semaglutide
AND bnf_name LIKE '%inj%') OR (bnf_code LIKE '0601023AZ%' --Tirzepatide
AND bnf_name LIKE '%inj%')
GROUP BY month, practice_id