Uncovering our Antibiotic Habits: Working with prescription data

20 Nov 2014
Written by
Longitude team
Antibiotics in the UK

At Mastodon C, we were very happy when Nesta asked us to work with prescription data from the NHS to help with Longitude Prize. We’ve worked with this fascinating dataset together with Nesta several times in the past, and we agree that having an effective system of diagnosing infections is extremely important and are glad that Longitude Prize is pursuing this goal.

To help with the analysis we looked at top level prescription data from the Prescription Costs Analysis from England, Northern Ireland, Scotland and Wales. This gave us the overall count for all antibiotic items dispensed in the community in the UK.

We then did a more in-depth analysis on the GP Prescription files available from the Health and Social Care Information Centre, which covers the NHS in England. This gives us the number of items prescribed each month by every GP Surgery in England. Similar figures are available for Wales and Northern Ireland. Scotland should be making their data available in 2015. This is Open Data and is available under the Open Government License (OGL).

The code used to analyse this data is available online on GitHub. Most of the code is there to pull out specific parts of the monthly GP Surgery prescriptions using the medicine codes from the British National Formulary (BNF) to find particular classes of drugs. The rest of the code is used to group by Surgery, Clinical Commisioning Group (CCG) or chemical and then used to pull out the top and bottom in the groups.

Finally there is code for enriching the records with human-friendly names by matching the identifiers to the reference data.

Once we'd scrubbed and grouped the data we were able to see how antibiotic prescriptions vary from surgery to surgery in England, how CCGs vary and which medicines are prescribed most frequently. This allowed us to get a picture of GP behaviour across England, and to start to figure out where the peaks of usage are - which is important for starting to understand where overprescription might be happening.

 

Some of these figures were discussed on BBC Radio 4 World at One - the specific segment is around 25 minutes in.