My first python script!
I built this to enable me to easily pull down csv files of ODS data from the Connecting For Health website. Requires the pymssql module for connecting to SQL R2Server 2008
The following is the header information for the ODS csv files repoduced from http://www.connectingforhealth.nhs.uk/systemsandservices/data/ods/datafiles
Ref.No. Field Max length Notes
-
Organisation Code 8 -
Organisation Name 100 -
National Grouping Code 3 = Field 1 of Regional Directorate file -
High Level Health Authority 3 = Field 1 of SHA file -
Address Line 1 35 -
Address Line 2 35 -
Address Line 3 35 -
Address Line 4 35 -
Address Line 5 35 -
Postcode 8 -
Open Date ccyymmdd -
Close Date ccyymmdd
Basic table schema (Sql Server):
CREATE TABLE [dbo].[ODSdata]( [OrganisationCode] nvarchar NULL, [OrganisationName] nvarchar NULL, [NationalGroupingCode] nvarchar NULL, [HighLevelHealthAuthority] nvarchar NULL, [AddressLine1] nvarchar NULL, [AddressLine2] nvarchar NULL, [AddressLine3] nvarchar NULL, [AddressLine4] nvarchar NULL, [AddressLine5] nvarchar NULL, [Postcode] nvarchar NULL, [OpenDate] [date] NULL, [CloseDate] [date] NULL ) ON [PRIMARY]