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 | Proportion of commonly used antibiotics for urinary-tract infections prescribed for more than 3 days |
---|---|
Why it matters | NICE guidance on prescribing for lower urinary-tract infections recommends a three day course of antibiotics for most women. Prescribing longer courses may be unnecessary, and also cost more. There are however some groups, such as males and pregnant patients, where longer durations are recommended. The antibiotics included in this measure are:
|
Tags | Antimicrobial Stewardship, Standard, Infections, NICE |
Implies cost savings | No |
Authored by | richard.croker |
Checked by | andrew.brown |
Last reviewed | 2024-02-12 |
Next review due | 2026-02-12 |
History | View change history on GitHub → |
SELECT
CAST(month AS DATE) AS month,
practice AS practice_id,
SUM(items) AS numerator
FROM hscic.raw_prescribing_normalised
WHERE (bnf_code LIKE '0501015P0%AB' AND quantity_per_item >10) OR --Pivmecillinam 200mg tablets (brands and generic) 400mg stat then 200mg tds for 3 days
(bnf_code LIKE '0501080W0%AE' AND quantity_per_item >6) OR --Trimethoprim 200mg tablets (brands and generic) 200mg bd for 3 days
(bnf_code LIKE '0501130R0%AA' AND quantity_per_item >12) OR --Nitrofurantoin 50mg capsules (brands and generic) 50mg qds for 3 days
(bnf_code LIKE '0501130R0%AD' AND quantity_per_item >12) OR --Nitrofurantoin 50mg tablets (brands and generic) 50mg qds for 3 days
(bnf_code LIKE '0501130R0%AG' AND quantity_per_item >6) OR --Nitrofurantoin 100mg modified-release capsules (brands and generic) 100mg bd for 3 days
(bnf_code LIKE '0501070AE%AD' AND quantity_per_item >1) --Fosfomycin 3g granules sachet (brands and generic) 3g sachet as a single dose
GROUP BY month, practice_id
SELECT
CAST(month AS DATE) AS month,
practice AS practice_id,
SUM(items) AS denominator
FROM hscic.raw_prescribing_normalised
WHERE bnf_code LIKE '0501015P0%AB' OR # Pivmecillinam HCl_Tab 200mg (brands and generic)
bnf_code LIKE '0501080W0%AE' OR # Trimethoprim_Tab 200mg (brands and generic)
bnf_code LIKE '0501130R0%AA' OR # Nitrofurantoin_Cap 50mg (brands and generic)
bnf_code LIKE '0501130R0%AD' OR # Nitrofurantoin_Tab 50mg (brands and generic)
bnf_code LIKE '0501130R0%AG' OR # Nitrofurantoin_Cap 100mg M/R (brands and generic)
bnf_code LIKE '0501070AE%AD' # Fosfomycin_Sachet 3g (brands and generic)
GROUP BY month, practice_id