ebmdatalab / openprescribing

A Django app providing a REST API and dashboards for the HSCIC's GP prescribing data
https://openprescribing.net
MIT License
98 stars 26 forks source link

GP Practices moving CCGs/PCTs #527

Open lmfrench opened 7 years ago

lmfrench commented 7 years ago

GP Practice Moves

NHS Digital publish a quarterly list mapping CCG/PCT membership (file name epcmem). This list includes dates of when a GP practice moved CCG or PCT. It also includes moves prior to the formation of PCTs (in 2001)

This mapping allows you to see which GP practices were in a PCT, and which CCG the practice was in when they were formed in April 2013. It lists any GP practices moves after April 2013, and also includes newly opened GP practices and the CCGs they are in.

The spreadsheet has no column headings, but it comes with a pdf with the file format. In brackets I have explained what each one means: Column A: Organisation Code (GP Practice code) Column B: Parent Organisation Code (CCG Code) Column C: Parent Organisation Type
Column D: Join Parent Date (Date Joined CCG) Column E: Left Parent Date (Date Left CCG)

Since April 2013, 544 practices have moved CCGs (some have moved multiple times e.g. Y03660 moved from 04F -> 12Y -> 04F ->14A, and is only counted once in the 544 total).

NHS Digital publish a monthly file which lists only recent amendments (https://digital.nhs.uk/organisation-data-service/data-downloads/monthly) egmemam, which might be useful if we are going to keep a list in our database. These amendments are released monthly rather than quarterly.

How does this file deal with the formation of new CCGs?

Example: For the creation of the new Manchester CCG, it lists all GP practices under the new CCG of 14L. There is Left Parent Date listed for each practice under the old CCG.

Practices that closed prior to the move are not listed as having moved to 14L. They are listed in the spreadsheet as having a Left Parent Date for the old Manchester CCG, and do not have a row listing which CCG it moved to (because it has closed rather than moved). The Left Parent Date for these practices is presumably the date the GP practice closed.

CCG Changes

To check for CCG changes, we can use the eccg file

This contains an Open Date and Close Date for each CCG. There have been only 2 new CCGs since April 2013: NHS Manchester CCG (14L) and Newcastle Gateshead CCG (13T)

There are occasions when CCG names change but their code does not, such as with Cumbria -> North Cumbria, and North Lancashire -> Morecombe Bay. This file lists the new name of the CCG only. In the example of Cumbria & Morecombe Bay, practices moved CCGs at the same time as the name change. This is detectable in the epcmem file listed above. They will also have their current CCG listed in the epraccur file we use for 'practices' in BigQuery. epcmem is useful for finding out the date practices moved, epraccur shows current CCG membership.

sebbacon commented 7 years ago

Thanks @lmfrench, this is really useful.

So to summarise how we can track CCG changes:

  1. The creation of new codes is detectable in eccg
  2. The change of CCG membership is detectable in epracmem
  3. The change of CCG names for existing codes is not detectable
  4. The closure of old CCGs is apparently not detectable in eccg (see the old Newcastle codes, below)

As far as we know, these are all the CCG changes:

An outstanding question is how we can infer what CCG a closed practice would be in if it still existed.

lmfrench commented 7 years ago

Yes, although couple of clarifications:

  1. Change of CCG names would likely be detectable in the Changes to organisation details [files] (https://digital.nhs.uk/organisation-data-service/data-downloads/changes-to-details) which are released monthly & quarterly. It isn't obvious from those files what has changed though - it could be the address rather than name

The other thing you can do to check for changes is look at column 22 in eccg (amended record indicator), if this is set to 1 it means there has been some sort of change since the last file was issued.

But it is probably easier to check the news page once a month.

  1. Yes - eccg only keeps closed CCGs in the list for the previous & current financial years, which is why Newcastle is not included.