NHS Choices

System CategoryHealth

Syndicated by Astun Data Services

Available since


NHS Choices provides public access to health service related information via the web. This includes name, address, postcode, location and URL information for individual services (pharmacies, opticians, hospitals, doctors and dentists). Furthermore the URLs returned from NHS Choices link to a host of additional information, for example, contact information and opening times.

The Astun Data Services (ADS) NHS Choices Downloader essentially acts as a central repository for the NHS Choices data for England. This links seamlessly with the iShare platform allowing NHS service information to be displayed on map layers.

Note: The ADS NHS Choices Downloader is only available to customers on iShare v4.4.6 or greater as it requires OGR 1.8 to connect to the WFS connection.

However there is known issue with OGR 1.8 truncating some of the fields. This is due to how OGR determines (guesses) the field types; it scans the first few features it encounters to determine types and lengths which in this case isn't sufficient. Upgrading to use OGR 1.9 is sufficient in this instance to overcome the issue as the fields are "character varying" which is ideal. If you have encountered this problem please log on to the Helpdesk and Customer portal to create a Support Request outlining the problem and you will be provided with the necessary files and instructions. OGR 2.4.0 will be included in iShare V5.10.0.

Why ADS?

There is a limit on the number of results returned from the NHS API (max 100 records per request, having 10 records per page)

  • ADS requests all data for England once a day, so ADS is always in sync with NHS Data
  • ‘One stop shop’ for all authorities using the iShare platform

  1. ADS Python script makes a call to the NHS API for data. Rather than creating a localised search and restricting the results the script asks for all data, returning all data for England.
  2. The NHS API returns data in XML format, which is converted into a csv file.
  3. The csv is then processed by the OGR2OGR program which converts the data into a suitable format and inserts the data into a PostGIS database (spatially enabled PostgreSQL). The .VRT file effectively acts as ‘style sheet’ for OGR2OGR’s import of the csv file (which file to import, coordinate system (lat, lng)..)
  4. The MapServer Web Feature Service (WFS) retrieves data from PostGIS (as a result of iShare or 3rd party GIS software user requests) and provides an XML/ GML output.
  5. iShare Maps and iShare GIS Studio administrators request the latest data from the MapServer WFS. The iShareMaps and iShareGIS Studio facilities allow the NHS Choices data to be displayed, as individual layers, on customer facing websites and internal intranet systems.
  6. The NHS Choices data can be displayed using other 3rd party GIS software, such as Quantum GIS (QGIS) - see WFS Client Connection Examples for details.

Configuring the Workflow in Studio

The following steps outline how you can download the NHS Choices data and keep it up-to-date.

Using Standard Layers

If you are using the Standard Layer type of OGC Layers then all you need to do now is to Configure your individual NHS Choices Layers in Studio.

Using Classic Layers

If you are using Classic Layers, required for My House / My Nearest, then you will first need to update your .MAP file to include these new NHS Choices layers. See Update .MAP file for NHS Choices Classic Layers  for details. Once the .MAP file has been updated you will be able to configure the NHS Choices Classic Layers via iShare Studio.