diff --git a/data/nhsHa.json b/data/nhsHa.json index 7a0e9377a..fa235e475 100644 --- a/data/nhsHa.json +++ b/data/nhsHa.json @@ -16,7 +16,6 @@ "S08000015": "Ayrshire and Arran", "S08000016": "Borders", "S08000017": "Dumfries and Galloway", - "S08000018": "Fife", "S08000019": "Forth Valley", "S08000020": "Grampian", "S08000021": "Greater Glasgow and Clyde", @@ -25,8 +24,9 @@ "S08000024": "Lothian", "S08000025": "Orkney", "S08000026": "Shetland", - "S08000027": "Tayside", "S08000028": "Western Isles", + "S08000029": "Fife", + "S08000030": "Tayside", "W11000023": "Betsi Cadwaladr University Health Board", "W11000024": "Powys Teaching Health Board", "W11000025": "Hywel Dda University Health Board", @@ -34,5 +34,5 @@ "W11000027": "Cwm Taf University Health Board", "W11000028": "Aneurin Bevan University Health Board", "W11000029": "Cardiff and Vale University Health Board", - "ZB001": "ZB001" + "ZB001": "Health & Social Care Board" } \ No newline at end of file diff --git a/data/scripts/nhsHa.js b/data/scripts/nhsHa.js index 87dfb8a85..c6bbbb20a 100644 --- a/data/scripts/nhsHa.js +++ b/data/scripts/nhsHa.js @@ -1,6 +1,6 @@ "use strict"; -const {extract} = require("./index"); +const { extract } = require("./index"); /** * @module DataParser/nhsHa @@ -16,20 +16,20 @@ const CODE_OFFSET = 0; const VALUE_OFFSET = 2; const transform = row => { - const code = row[CODE_OFFSET]; - const value = row[VALUE_OFFSET]; - if (code === "HLTHAUCD") return []; // Escape if header - return [code, value]; + const code = row[CODE_OFFSET]; + const value = row[VALUE_OFFSET]; + if (value === "HLTHAUNM") return []; // Escape if header + return [code, value]; }; -const parseOptions = { relax_column_count: true }; +const parseOptions = { delimiter: "," }; const configs = [ - { - file: "HLTHAU names and codes UK as at 12_16 (OSHLTHAU).txt", - transform, - parseOptions - } + { + file: "HLTHAU names and codes UK as at 12_18 (OSHLTHAU).csv", + transform, + parseOptions, + }, ]; extract({ configs });