Higher dose Proton Pump Inhibitors (PPIs)

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 Prescribing of higher dose Proton Prump Inhibitors compared with prescribing of all PPIs (excluding liquids)
Why it matters PPIs are used to reduce acid levels in the stomach, in order to treat conditions such as gastro-oesphogeal reflux disease. NICE guidance recommends that the lowest dose is used to treat the symptoms. Although PPIs are safe drugs, their use has been associated with an increase in a number of disorders, including Clostridium difficile infection and a higher risk of community-aquired pneunmonia. The doses of PPIs are defined in the NICE guidance.
Tags Standard, Gastrointestinal system, NICE, Safety
Implies cost savings No
History View change history on GitHub →

Numerator SQL

SELECT
     CAST(month AS DATE) AS month,
     practice AS practice_id,
     SUM(items) AS numerator
 FROM hscic.normalised_prescribing
 WHERE bnf_code IN ("0103050E0AAAAAA", "0103050E0AAABAB", "0103050E0AAAEAE", "0103050E0AAAFAF", "0103050E0AAAGAG", "0103050E0BBAAAA", "0103050E0BBABAB", "0103050E0BBADAE", "0103050E0BBAEAA", "0103050E0BBAFAB", "0103050E0BBAGAA", "0103050E0BBAHAF", "0103050E0BCAAAF", "0103050E0BCABAG", "0103050E0BDAAAF", "0103050E0BDABAG", "0103050E0BEAAAA", "0103050L0AAAAAA", "0103050L0AAAHAH", "0103050L0BBAAAA", "0103050L0BBAEAH", "0103050P0AAAAAA", "0103050P0AAAEAE", "0103050P0AAANAN", "0103050P0AAAPAP", "0103050P0AABDBD", "0103050P0AABEBE", "0103050P0BBAAAA", "0103050P0BBABAE", "0103050P0BBAEAN", "0103050P0BBAFAP", "0103050P0BDABBD", "0103050P0BFABAA", "0103050P0BGABAN", "0103050P0BGACAP", "0103050R0AAAAAA", "0103050R0AAABAB", "0103050R0BBAAAA", "0103050R0BBABAB", "0103050R0BCAAAB", "0103050T0AAABAB", "0103050T0BBABAB")
 GROUP BY month, practice_id

Denominator SQL

SELECT
     CAST(month AS DATE) AS month,
     practice AS practice_id,
     SUM(items) AS denominator
 FROM hscic.normalised_prescribing
 WHERE bnf_code IN ("0103050E0AAAAAA", "0103050E0AAABAB", "0103050E0AAAEAE", "0103050E0AAAFAF", "0103050E0AAAGAG", "0103050E0BBAAAA", "0103050E0BBABAB", "0103050E0BBADAE", "0103050E0BBAEAA", "0103050E0BBAFAB", "0103050E0BBAGAA", "0103050E0BBAHAF", "0103050E0BCAAAF", "0103050E0BCABAG", "0103050E0BDAAAF", "0103050E0BDABAG", "0103050E0BEAAAA", "0103050L0AAAAAA", "0103050L0AAABAB", "0103050L0AAAGAG", "0103050L0AAAHAH", "0103050L0AAARAR", "0103050L0BBAAAA", "0103050L0BBABAB", "0103050L0BBADAG", "0103050L0BBAEAH", "0103050P0AAAAAA", "0103050P0AAAEAE", "0103050P0AAAFAF", "0103050P0AAAMAM", "0103050P0AAANAN", "0103050P0AAAPAP", "0103050P0AABCBC", "0103050P0AABDBD", "0103050P0AABEBE", "0103050P0BBAAAA", "0103050P0BBABAE", "0103050P0BBACAF", "0103050P0BBADAM", "0103050P0BBAEAN", "0103050P0BBAFAP", "0103050P0BDABBD", "0103050P0BFAAAF", "0103050P0BFABAA", "0103050P0BGAAAM", "0103050P0BGABAN", "0103050P0BGACAP", "0103050R0AAAAAA", "0103050R0AAABAB", "0103050R0BBAAAA", "0103050R0BBABAB", "0103050R0BCAAAB", "0103050T0AAAAAA", "0103050T0AAABAB", "0103050T0BBAAAA", "0103050T0BBABAB")
 GROUP BY month, practice_id