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 | Cost of gluten-free products per 1000 patients |
---|---|
Why it matters | Gluten-free products are available on prescription for patients who have a biopsy-confirmed diagnosis of coeliac disease. These products are also now available to purchase, e.g. from supermarkets. Following a consultation in 2017, the Drug Tariff was amended to only allow gluten-free breads or gluten-free food mixes on prescription. Please note this list now excludes low-protein products which are also categorised by dm+d and NHSBSA as being gluten-free, as these products have different indications for ACBS use. |
Tags | Standard, Cost Saving, Nutrition |
Implies cost savings | Yes |
Authored by | richard.croker |
Checked by | andrew.brown |
Last reviewed | 2024-08-06 |
Next review due | 2026-08-06 |
History | View change history on GitHub → |
SELECT
CAST(month AS DATE) AS month,
practice AS practice_id,
SUM(actual_cost) AS numerator
FROM hscic.normalised_prescribing
WHERE bnf_code IN ("0913271A0AAACAC", "0913271A0AAAEAE", "0913271A0AAAHAH", "0913271A0AAALAL", "0913271A0BBAAAA", "0913271A0BBABAB", "0913271A0BCAAAC", "0913271A0BCABAD", "0913271A0BCACAE", "0913271A0BDAAAF", "0913271A0BDABAG", "0913271A0BDACAH", "0913271A0BDADAI", "0913271A0BDAEAJ", "0913271A0BDAFAK", "0913271A0BDAGAL", "0913271A0BDAHAM", "0913271A0BDAIAN", "0913271A0BEAAAP", "0913271A0BEABAQ", "0913271A0BFAAAR", "0913271A0BFABAS", "0913271A0BFACAT", "0913271A0BFADAU", "0913271A0BFAEAV", "0913271A0BFAFAW", "0913271A0BFAGAX", "0913271A0BFAHAY", "0913271A0BGAAAZ", "0913271A0BHAABA", "0913271A0BHABBB", "0913271B0AAAAAA", "0913271B0BBAAAA", "0913271B0BBABAB", "0913271B0BCAAAC", "0913271B0BCABAD", "0913271B0BCACAE", "0913271B0BCADAF", "0913271B0BCAEAG", "0913271B0BDAAAH", "0913271B0BEAAAI", "0913271B0BEABAJ", "0913271B0BEACAK", "0913271B0BEADAL", "0913271B0BEAEAM", "0913271B0BEAFAN", "0913271B0BFAAAP", "0913271B0BFABAQ", "0913271B0BFACAR", "0913271B0BGAAAS", "0913271B0BHAAAT", "0913271B0BHABAU", "0913271C0AAAIAI", "0913271C0AAAJAJ", "0913271C0AAAPAP", "0913271C0BBAAAA", "0913271C0BBABAB", "0913271C0BBACAC", "0913271C0BCAAAD", "0913271C0BCABAE", "0913271C0BCACAF", "0913271C0BCADAG", "0913271C0BCAEAH", "0913271C0BCAFAI", "0913271C0BCAGAJ", "0913271C0BCAHAK", "0913271C0BDAAAL", "0913271C0BEAAAM", "0913271C0BEABAN", "0913271C0BEACAP", "0913271C0BFAAAQ", "0913271C0BHAAAS", "0913271C0BHABAT", "0913271C0BIAAAU", "0913271C0BIABAV", "0913271C0BIACAW", "0913271C0BJAAAX", "0913461A0BCAAAB", "0913461A0BDAAAC", "0913461A0BDABAD", "0913461A0BDACAE", "0913461A0BDADAH", "0913461A0BDAEAI", "0913461A0BEAAAF", "0913461B0BBAAAA", "0913461C0BBAAAA", "0913461C0BBABAB", "0913461C0BBACAC", "0913461C0BDAAAE", "0913461C0BEAAAF", "0913461C0BEABAG", "0913461C0BEACAH", "0913461C0BEADAI", "0913461C0BEAFAX", "0913461C0BFAAAJ", "0913461C0BGAAAK", "0913461C0BHAAAM", "0913461C0BHABAN", "0913461C0BHACAP", "0913461C0BHAEAR", "0913461C0BIAABC", "0913461D0AAABAB", "0913461D0BBAAAA", "0913461D0BCAAAB", "0913461E0BBAAAA", "0913461E0BCAAAB", "0913461E0BDAAAC", "0913461E0BDABAD", "0913461E0BDACAE", "0913461E0BDADAF", "0913461E0BDAEAG", "0913461E0BEAAAH", "0913461E0BEABAI", "0913461E0BFAAAJ", "0913461E0BGAAAK", "0913461F0BBACAA", "0913461F0BBAFAA", "0913461F0BCAEAB", "0913461F0BDAAAC", "0913461F0BDABAC", "0913461F0BDACAC", "0913461F0BDADAC", "0913461F0BEAAAD", "0913461F0BEABAD", "0913461F0BEACAD", "0913461F0BEADAD", "0913461F0BEAEAD", "0913461F0BEAFAD", "0913461F0BFAAAE", "0913461F0BHAAAP", "0913461G0BCAAAB", "0913461G0BDAAAC", "0913461H0BBAAAA", "0913461H0BBABAB", "0913461H0BCAAAC", "0913461H0BCABAD", "0913461H0BCACAE", "0913461H0BDAAAF", "0913461H0BDABAG", "0913461H0BEAAAH", "0913461H0BEACAJ", "0913461H0BEADAK", "0913461H0BFAAAM", "0913461H0BGAAAN", "0913461H0BGABAP", "0913461H0BGACAQ", "0913461H0BHAAAR", "0913461H0BHABAS", "0913461I0BBAAAA", "0913461I0BBABAA", "0913461I0BBACAA", "0913461I0BBADAA", "0913461I0BCAAAB", "0913461I0BCABAB", "0913461J0BBAAAA", "0913461J0BBABAA", "0913461J0BBACAA", "0913461J0BBAFAA", "0913461J0BCAAAB", "0913461J0BCABAB", "0913461J0BCACAB")
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