Create the Tasks to download the NHS data

We need to create a Workflow Task to import each of the different types of NHS Choices data into the PostgreSQL database.

  • Right click on the Jobs entry you have just created to Update NHS Choices in the tree and select New Task.
  • Select Spatial Data Transformation as the task type and click OK.

Task Name

Enter a Name for the task. In the above example we have chosen Update All.

Source Data

Here you need to select the WFS Workflow Connection you have just created.

Table

Here you need to select the correct table for the type of NHS Choices data that you wish to extract from NHS Choices. This is actually a layer name and the options are:

      • all (All Services)
      • dentists
      • doctors
      • hospitals
      • opticians
      • pharmacies

We have chosen all in our example. This is because we are then going to create individual Tasks to split out the data and only include the records that fall within the Surrey County boundary line.

Note: If there is no drop down selection then it is possible that you are missing the errorconfig.xml file from your Studio\config folder.

Output

In this instance will want to output to the PostgreSQL database so select then name of your Data Share database.

Table

Enter a name for the Table that you wish to create in the PostgreSQL database; we have chosen nhs_choices.all as we want to create an all table in the nhs_choices schema.

  • Click Save to update the Studio with your changes.

 

Although we have created the Workflow Task to import the data from the WFS Feed we need to actually Run the task to import the data.

  • Right Click on the Task you have just created and select Run Task Update All or whatever you have called it. This may take a little while but you should see a successful completion message when the download has finished. This will import the WFS feed into the specified table.
  • If you decided to just download one type, say doctors for instance, you need to repeat these steps to create a Task for each type of NHS Choices data that you wish to download and display.
  • If you decided to download all then you will need to Create a Table for Doctors or whichever type or NHS data you require.

Table Structure

If you open pgAdmin and select the Datashare database you should see your new NHS Choices table.  The table structure will be as follows:

NHS Choices Table Structure

Hint

You may wish to remove data that is not close to your area of interest. If you download the 'all' table to your database you can then create additional tables using Spatial Data Transformation tasks with the -sql parameter. Please see Create Table for Doctors for more information.


Â