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 | Number of prescription items for co-amoxiclav, cephalosporins and quinolones per item-based STAR-PU |
---|---|
Why it matters | Co-amoxiclav, cephalosporins and quinolones are broad spectrum antibiotics that can be used when others have failed. It is important that they are used sparingly, to avoid drug-resistant bacteria developing. This measure looks at the volume of these prescribed, versus the list size adjusted for need. |
Tags | Antimicrobial Stewardship, Standard, Infections, NICE |
Implies cost savings | No |
History | View change history on GitHub → |
SELECT
CAST(month AS DATE) AS month,
practice AS practice_id,
SUM(items) AS numerator
FROM hscic.normalised_prescribing
WHERE bnf_code IN ("0501013K0AAAAAA", "0501013K0AAABAB", "0501013K0AAADAD", "0501013K0AAAEAE", "0501013K0AAAFAF", "0501013K0AAAGAG", "0501013K0AAAHAH", "0501013K0AAAIAI", "0501013K0AAAJAJ", "0501013K0AAAKAK", "0501013K0AAANAN", "0501013K0BBAAAA", "0501013K0BBACAE", "0501013K0BBAHAF", "0501013K0BBAJAD", "0501013K0BBAKAG", "0501013K0BBALAJ", "0501013K0BBAMAK", "0501021A0AAAAAA", "0501021A0AAABAB", "0501021A0AAACAC", "0501021A0AAAEAE", "0501021A0AAAGAG", "0501021A0AAAJAJ", "0501021A0AAAKAK", "0501021A0BBABAB", "0501021A0BBACAC", "0501021A0BBADAE", "0501021A0BBAEAG", "0501021B0AAAAAA", "0501021B0AAACAC", "0501021C0AAAAAA", "0501021C0AAACAC", "0501021C0BBAAAA", "0501021D0AAAAAA", "0501021D0AAABAB", "0501021G0AAABAB", "0501021G0AAACAC", "0501021G0AAADAD", "0501021G0BBAAAB", "0501021G0BBABAC", "0501021G0BBACAD", "0501021H0AAAAAA", "0501021H0AAABAB", "0501021H0AAACAC", "0501021H0AAAHAH", "0501021H0BBABAA", "0501021H0BBACAB", "0501021H0BBAGAH", "0501021J0AAAAAA", "0501021J0AAABAB", "0501021J0AAACAC", "0501021J0BBAAAA", "0501021J0BBABAB", "0501021K0AAAAAA", "0501021K0AAABAB", "0501021K0AAACAC", "0501021K0BBAAAA", "0501021K0BBABAB", "0501021K0BBACAC", "0501021L0AAAAAA", "0501021L0AAABAB", "0501021L0AAACAC", "0501021L0AAADAD", "0501021L0AAAEAE", "0501021L0AAAGAG", "0501021L0AAAHAH", "0501021L0AAANAN", "0501021L0AAAPAP", "0501021L0BCAAAA", "0501021L0BCABAB", "0501021L0BCACAG", "0501021L0BCADAH", "0501021L0BCAEAC", "0501021L0BCAFAD", "0501021M0AAAAAA", "0501021M0AAABAB", "0501021M0BCAAAA", "0501021M0BCABAB", "0501120L0AAAAAA", "0501120L0AAABAB", "0501120L0AAADAD", "0501120L0AAAFAF", "0501120L0AAAGAG", "0501120L0AAAJAJ", "0501120L0AAAUAU", "0501120L0AABFBF", "0501120L0AABGBG", "0501120L0AABQBQ", "0501120L0BBAAAA", "0501120L0BBABAF", "0501120L0BBADAJ", "0501120L0BBAJBG", "0501120P0AAAAAA", "0501120P0AAABAB", "0501120P0BBAAAA", "0501120P0BBACAB", "0501120Q0AAAAAA", "0501120Q0BBAAAA", "0501120X0AAAAAA", "0501120X0AAABAB", "0501120X0AAADAD", "0501120X0AAAFAF", "0501120Y0AAAAAA", "0501120Y0BBAAAA")
GROUP BY month, practice_id
SELECT
CAST(month AS DATE) AS month,
practice AS practice_id,
CAST(JSON_EXTRACT(MAX(star_pu), '$.oral_antibacterials_item') AS FLOAT64) AS denominator
FROM hscic.practice_statistics
GROUP BY month, practice_id