The LA code returned by the postcode CodeSystem lookup seems to be that of the ONS NSPL data - e.g. for “L1 1LN” I get an LA code of “316”.
My understanding is that this is derived from the LSOA associated with the postcode rather than the exact geographical location ( Unitary Authorities in the UK mapped to full postcodes - Office for National Statistics )
In Spine, we currently use an ONS PD lookup which returns a different code “E08000012”. I believe this is based on the exact geographical (i.e. grid-reference-based) area covered by the postcode.
The ODT API doesn’t seem to return the latter code, and the geography-name lookup only seems to support querying the former.
I get that for the most part the result will resolve to the same area/LA, but we often run into cross-border issues where postcodes or GPs span multiple jurisdictions. Are there any plans to make the ONS PD data available?
I can change our app to use and display the ONS NSPL data, but it will be a change to users and there may be issues that arise from it.
Thought I’d ask!
Thanks,
Bob
Hi Bob
The LA code returned by the postcode codesystem within ODT API, uses the NHS Postcode Directory (gridall) files. Health boundaries within the NHSPD are defined using LSOAs, but the LA boundaries use Gridlink - see below
Assignment of Postcodes to Geographies on the NHSPD
Administrative and electoral areas
As part of the Gridlink initiative, postcodes in Great Britain are assigned to administrative and electoral areas by OS (GB) using a ‘point-in-polygon’ methodology that matches grid references for postcodes (derived from OS MasterMap – see previous section) against their Boundary-Line™ product. The draft version of Boundary-Line™ is produced in May and contains all administrative and electoral area boundary changes to that month, and is used for the May version of the NHSPD. Any errors, omissions or inconsistencies in this draft version are corrected by OS for the final release in October, which is then included in the November NHSPD…
Like you say, we return the ODS code for the relevant LA in our postcode codesystem, and we don’t currently have plans to add the ONS identifiers. We do publish a lookup file that maps ODS LA codes to the equivalent ONS boundary code: Office for National Statistics data - NHS England Digital
Thanks
Laura, ODS
Thanks Laura,
I’m still missing a trick I think - I can see there’s a “LA_UA names and codes UK as at 04_25.csv” in the “names_and_codes” download on that page, but that only contains the ONS/GSS identifer and the name (“E08000012,Liverpool,”) - I can’t find a mapping from the ODS code of 316 to that?
I see the gridall.csv file has all the postcodes with both codes in, but that’s similar to what we currently get from PAF and use in Spine - for our re-platforming, we’ve (rightly) being pushed towards API-first.
The end-user that requires this data has explicitly said their system needs the 9-digit identifiers, so I need to find a way to derive these, ideally from an API rather than a static data load.
Any help gratefully appreciated!
Regards, Bob
Hi Bob
Apologies, ODS do not currently have any products that map ODS LA codes to ONS LA boundary codes. We have added this to our backlog to address in the future but we aren’t currently able to help.
Thanks
Laura