Topical treatment of fungal nail infections

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 Items prescribed for topical treatment of fungal nail infections per 1000 patients
Why it matters These treatments have a low cure rate, and treatment is required for three to six months. Consideration should be given as to whether this is an effective treatment.
Tags Standard, Efficacy, Infections
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 ("1310020A0AAAAAA", "1310020A0BBAAAA", "1310020A0BCAAAA", "1310020A0BDAAAA", "1310020A0BEAAAC", "1310020A0BFAAAA", "1310020A0BFAAAC", "1310020T0AAAAAA", "1310020T0BBAAAA")
 GROUP BY month, practice_id

Denominator SQL

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