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 | Prescription items for all oral antibacterial drugs (excluding antituberculosis drugs and antileprotic drugs) per 1000 patients |
---|---|
Why it matters | Antibiotics play a critical role in modern medicines, as both a treatment of common infections and for the prevention of infections, for example in patients undergoing surgery or chemotherapy. Antimicrobial resistance therefore poses a significant threat to public health. To help slow the development of resistance it is important that antiobiotics aren't overused. |
Tags | Antimicrobial Stewardship, Standard, Infections, NICE |
Implies cost savings | No |
Authored by | christopher.wood |
Checked by | richard.croker |
Last reviewed | 2024-08-05 |
Next review due | 2026-08-05 |
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 ("0501011P0AAADAD", "0501011P0AAAFAF", "0501011P0AAAJAJ", "0501011P0AAARAR", "0501011P0AAASAS", "0501012G0AAAAAA", "0501012G0AAABAB", "0501012G0AAAFAF", "0501012G0AAAGAG", "0501012G0AAAPAP", "0501012G0AAAQAQ", "0501012G0BBABAB", "0501012H0AAAAAA", "0501012H0AAABAB", "0501012H0BBAAAA", "0501012H0BBABAB", "0501013B0AAAAAA", "0501013B0AAABAB", "0501013B0AAAHAH", "0501013B0AAAIAI", "0501013B0AAAJAJ", "0501013B0AAAKAK", "0501013B0AAASAS", "0501013B0AAATAT", "0501013B0AAAUAU", "0501013B0AAAVAV", "0501013B0BCAAAA", "0501013B0BCABAB", "0501013B0BCAEAS", "0501013B0BCAFAT", "0501013B0BCAGAI", "0501013B0BCAIAH", "0501013E0AAAAAA", "0501013E0AAABAB", "0501013E0AAAEAE", "0501013E0AAAFAF", "0501013K0AAAAAA", "0501013K0AAABAB", "0501013K0AAADAD", "0501013K0AAAGAG", "0501013K0AAAHAH", "0501013K0AAAIAI", "0501013K0AAAJAJ", "0501013K0AAAKAK", "0501013K0AAANAN", "0501013K0BBAAAA", "0501013K0BBAJAD", "0501013K0BBAKAG", "0501013K0BBALAJ", "0501013K0BBAMAK", "0501013L0AAAAAA", "0501013L0AAADAD", "0501015P0AAABAB", "0501015P0AAACAC", "0501015P0BBABAB", "0501021A0AAAAAA", "0501021A0AAABAB", "0501021A0AAACAC", "0501021A0AAAEAE", "0501021A0AAAGAG", "0501021A0AAAJAJ", "0501021A0AAAKAK", "0501021A0BBABAB", "0501021A0BBACAC", "0501021A0BBADAE", "0501021A0BBAEAG", "0501021B0AAAAAA", "0501021B0AAACAC", "0501021C0AAAAAA", "0501021C0AAACAC", "0501021C0BBAAAA", "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", "0501030F0AAAAAA", "0501030F0AAAFAF", "0501030F0AAAGAG", "0501030F0AAAIAI", "0501030F0AAAJAJ", "0501030I0AAAAAA", "0501030I0AAABAB", "0501030I0AAAHAH", "0501030I0AAAKAK", "0501030I0AAALAL", "0501030I0AAAMAM", "0501030I0BCAAAB", "0501030I0BCABAA", "0501030L0AAABAB", "0501030L0BBABAB", "0501030P0AAAAAA", "0501030P0AAABAB", "0501030P0AAACAC", "0501030P0AAADAD", "0501030P0AAAEAE", "0501030P0BBACAC", "0501030P0BDABAE", "0501030P0BHAAAC", "0501030P0BHABAC", "0501030T0AAAJAJ", "0501030T0AAAPAP", "0501030T0BIAAAJ", "0501030V0AAAAAA", "0501030V0AAAFAF", "0501030V0AAARAR", "0501030Z0AAAAAA", "0501030Z0AAABAB", "0501030Z0BBAAAA", "0501030Z0BCAAAB", "0501040H0AAAWAW", "0501040H0AAAYAY", "0501040N0AAADAD", "0501040U0AAAHAH", "0501050A0AAAAAA", "0501050A0AAABAB", "0501050A0AAADAD", "0501050A0AAAGAG", "0501050A0AAAHAH", "0501050A0BBAAAA", "0501050A0BBABAB", "0501050A0BBADAD", "0501050B0AAAAAA", "0501050B0AAABAB", "0501050B0AAADAD", "0501050B0AAAEAE", "0501050B0AAAFAF", "0501050B0AAAHAH", "0501050B0AAAKAK", "0501050B0BBAAAA", "0501050B0BBABAB", "0501050B0BBADAD", "0501050B0BBAEAE", "0501050B0BBAFAF", "0501050B0BBAHAH", "0501050B0BEAAAE", "0501050B0BHAAAE", "0501050C0AAABAB", "0501050C0AAAKAK", "0501050C0BCAAAK", "0501050C0BKAAAK", "0501050C0BLAAAK", "0501050H0AAAAAA", "0501050H0AAABAB", "0501050H0AAACAC", "0501050H0AAAEAE", "0501050H0AAALAL", "0501050H0AAAMAM", "0501050H0AAANAN", "0501050H0BDAIAE", "0501050H0BDAMAM", "0501050H0BDANAL", "0501050H0BDAPAN", "0501050N0AAAAAA", "0501050N0AAABAB", "0501050N0BBAAAA", "0501050N0BBABAB", "0501050N0BCAAAA", "0501050N0BCABAB", "0501060D0AAAAAA", "0501060D0AAABAB", "0501060D0AAAEAE", "0501060D0AAAGAG", "0501060D0AAAHAH", "0501060D0AAAIAI", "0501060D0AAAJAJ", "0501060D0AAAMAM", "0501060D0AAANAN", "0501060D0AAAPAP", "0501060D0AAAQAQ", "0501060D0AAASAS", "0501060D0AAATAT", "0501060D0BBAAAA", "0501060D0BBABAB", "0501070ABAAAAAA", "0501070ABAAABAB", "0501070ACAAAAAA", "0501070ACAAABAB", "0501070ACBBAAAA", "0501070ACBBABAB", "0501070AEAAADAD", "0501070AEBBADAD", "0501070AEBDAAAD", "0501070F0AAAAAA", "0501070M0AAAAAA", "0501070M0BBAAAA", "0501070N0AAADAD", "0501070N0BBAAAD", "0501070T0AAAAAA", "0501070T0AAABAB", "0501070T0AAACAC", "0501070T0AAADAD", "0501070T0BBAAAA", "0501070T0BBABAB", "0501070U0AAAAAA", "0501070U0AAABAB", "0501070U0AAACAC", "0501070U0AAAFAF", "0501070U0AAAHAH", "0501070U0AAAKAK", "0501070U0AAALAL", "0501070U0BBAAAA", "0501070U0BBADAC", "0501070U0BBAEAF", "0501070W0AAAAAA", "0501070W0AAABAB", "0501070W0BBAAAA", "0501070W0BBACAB", "0501070X0AAAAAA", "0501070X0AAABAB", "0501070X0AAACAC", "0501070X0BCAAAA", "0501070X0BEAAAB", "0501070Z0AAAAAA", "0501080D0AAACAC", "0501080D0AAAEAE", "0501080D0AAAHAH", "0501080D0AAAJAJ", "0501080D0BGAAAH", "0501080D0BGACAJ", "0501080D0BGAFAC", "0501080J0AAABAB", "0501080J0AAAHAH", "0501080V0AAADAD", "0501080V0BDABAD", "0501080W0AAADAD", "0501080W0AAAEAE", "0501080W0AAAIAI", "0501080W0AAAMAM", "0501080W0AAAQAQ", "0501080W0BCACAI", "0501080W0BGABAE", "0501080W0BHAAAD", "0501080W0BHABAE", "0501110C0AAAEAE", "0501110C0AAAIAI", "0501110C0AAAJAJ", "0501110C0AABHBH", "0501110C0AABLBL", "0501110C0AABQBQ", "0501110C0AABTBT", "0501110C0BCAAAI", "0501110C0BCABAJ", "0501110C0BCAIAE", "0501110G0AAABAB", "0501110G0BBAAAB", "0501120L0AAAAAA", "0501120L0AAAFAF", "0501120L0AAAGAG", "0501120L0AAAJAJ", "0501120L0AAAUAU", "0501120L0AABGBG", "0501120L0BBAAAA", "0501120L0BBABAF", "0501120L0BBADAJ", "0501120L0BBAJBG", "0501120P0AAAAAA", "0501120P0AAABAB", "0501120P0BBACAB", "0501120Q0AAAAAA", "0501120Q0BBAAAA", "0501120X0AAAAAA", "0501120X0AAABAB", "0501120Y0AAAAAA", "0501120Y0BBAAAA", "0501130H0AAAAAA", "0501130H0BBAAAA", "0501130R0AAAAAA", "0501130R0AAABAB", "0501130R0AAACAC", "0501130R0AAADAD", "0501130R0AAAEAE", "0501130R0AAAGAG", "0501130R0AAAJAJ", "0501130R0AAAMAM", "0501130R0AAANAN", "0501130R0AAARAR", "0501130R0AAATAT", "0501130R0AAAUAU", "0501130R0AAAVAV", "0501130R0AABEBE", "0501130R0AABSBS", "0501130R0AACMCM", "0501130R0BBAAAD", "0501130R0BBACAC", "0501130R0BCAAAA", "0501130R0BCABAB", "0501130R0BGAAAG", "0501130R0BHAAAE", "0501130R0BHABAD", "0501130S0AAAAAA", "0501130S0BBAAAA")
GROUP BY month, practice_id
SELECT
CAST(month AS DATE) AS month,
practice AS practice_id,
SUM(total_list_size / 1000.0) AS denominator
FROM hscic.practice_statistics
GROUP BY month, practice_id