Update November 2019: Our NHS PCN dashboards are now live at https://openprescribing.net/pcn/ and you can read more on our launch blog.

Update August 2019: Our amazing developers have written all the code necessary to display all prescribing measures and data for all PCNs in England on OpenPrescribing. Unfortunately there is no national list of PCNs and their membership available, as soon as this is published we will bring you our prescribing dashboards.

Since launching OpenPrescribing we have developed a prescribing dashboard for every single GP practice, CCG, STP, NHS England region and the whole of England. Despite this we continue to get emails asking for other types and combinations of organisations, including federations, super practices, ICSs and most recently PCNs. We aim to provide as many options for you as possible, including any custom groupings of your choosing. However, there are some challenges to overcome. In this blog we describe some of the technical background about how the NHS is set up in terms of organisational data, and describe our plan for dealing with the ever evolving formations within the NHS.

How does OpenPrescribing manage organisations?

In the NHS, organisational coding is undertaken by the Organisational Data Service (ODS) in NHS Digital. An ODS code is a series of numbers and letters that uniquely identifies an NHS organisation – you’ll probably be familiar with your CCG and/or practice codes, for example 10Q is Oxford CCG and South Oxford Health Centre is K84617. At OpenPrescribing we use these ODS codes to identify practices and CCGs, link them to geographic areas to create maps, and link them together to group general practices up to CCGs. ODS codes are important for a whole variety of other reasons in the NHS, such as payment and contracting. Despite their usefulness and apparent simplicity, development of ODS codes is a slow process. For example, STP codes were not available for approximately 18 months after STPs were formed and this necessitated creation of interim solutions. In order to build our STP dashboards we considered building pseudo-organisational codes, but as a small team with limited resources this would be challenging and very difficult to maintain. After some searching we found that the Office of National Statistics (ONS) had created organisational codes for STPs in their own format which we have now implemented. Implementing different organisational structures allows us to deliver new tools for our users, but behind the scenes it does add to the complexity of our code.

What are PCNs?

Primary Care Networks (PCNs) are groups of organisations, based on GP registered lists, serving communities of around 30,000-50,000 people, with the aim of improving care for patients. PCNs were announced as part of new NHS plans and many PCNs have formed already. However, there is still no complete list of PCNs and their members available nationally. This is understandable as the deadline for submission of PCN membership is not until the end of June. Many of our users have been in touch asking for PCNs to be made available on OpenPrescribing, but it is still unclear when PCN ODS codes will be available. We have been advocating to NHS England and other organisations on your behalf to develop an interim solution. Once a machine readable list of PCNs and their membership is available we will invest time (and money) in implementing PCN dashboards on the site; and, as with all our work, our code will be freely available for others to follow our progress and reuse in our GitHub repository. We are not able to give a definitive time-frame until we receive the list and are able to plan the development amongst our tiny team and competing demands.

What about other new organisations?

We are also keen to develop a new feature where people can select their own “custom groupings”. This will also make it quicker for us to evolve organisational structures but importantly it will allow users to make their own organisations groups. For example, as a locum GP you may want to create a group of the 5 practices you work in, or as an antimicrobial stewardship pharmacist you may want to monitor the highest antibiotic prescribers in your area.

How do we do this?

In order to do this we need to do some spring cleaning of the code that powers OpenPrescribing. This is known in software engineering circles as “refactoring”. As we have had to implement interim solutions to incorporate various different organisations over the past few years our code has become somewhat complex. Refactoring is the process of restructuring the code behind the scenes to make it simpler and improve readability. Refactoring makes it easier to maintain the software, and importantly this means in the longer term it frees up developer time to focus on developing new features.

What are the downsides?

The downside is that this is going to take us some time to do and it will require us to invest a significant amount of developer and coder time into refactoring. As we are a tiny team with limited funds this will severely curtail development of new features while we undertake this process.

We believe sharing our thoughts on topics like this in the open is the best way to build useful tools. Please get in touch at ebmdatalab@phc.ox.ac.uk if you have experienced similar challenges and have already built solutions that you can share or if you know of funds that we could access to accelerate this important work.