 	[ProblemStatus] [varchar](25) NOT NULL,
 	[Significance] [varchar](25) NOT NULL,
 	[Episode] [varchar](25) NOT NULL,
-	CONSTRAINT [PK_ClinicalProblem] PRIMARY KEY CLUSTERED
-		(
-			[SK_ProblemID] ASC
-		)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
-) ON [PRIMARY]
-
-GO
-SET ANSI_PADDING OFF
-GO
-/****** Object:  Table [GP].[MedicationIssue]    Script Date: 06/03/2016 15:51:58 ******/
+ CONSTRAINT [PK_ClinicalProblem] PRIMARY KEY CLUSTERED 
+(
+	[SK_ProblemID] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+GO
+SET ANSI_PADDING OFF
+GO
+/****** Object:  Table [GP].[MedicationIssue]    Script Date: 29/03/2016 09:31:29 ******/
 SET ANSI_NULLS ON
 GO
 SET QUOTED_IDENTIFIER ON

USE [master]
GO
/****** Object:  Database [Endeavour_Enterprise_Data]    Script Date: 06/03/2016 15:51:58 ******/
CREATE DATABASE [Endeavour_Enterprise_Data]
CONTAINMENT = NONE
ON  PRIMARY
( NAME = N'Endeavour_Enterprise_Data', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\Endeavour_Enterprise_Data.mdf' , SIZE = 5120KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'Endeavour_Enterprise_Data_log', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\Endeavour_Enterprise_Data_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET COMPATIBILITY_LEVEL = 120
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
	begin
		EXEC [Endeavour_Enterprise_Data].[dbo].[sp_fulltext_database] @action = 'enable'
	end
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET ANSI_NULLS OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET ANSI_PADDING OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET ARITHABORT OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET CURSOR_DEFAULT  GLOBAL
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET  DISABLE_BROKER
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET RECOVERY SIMPLE
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET  MULTI_USER
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET DB_CHAINING OFF
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF )
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET TARGET_RECOVERY_TIME = 0 SECONDS
GO
ALTER DATABASE [Endeavour_Enterprise_Data] SET DELAYED_DURABILITY = DISABLED
GO
USE [Endeavour_Enterprise_Data]
GO
/****** Object:  Schema [07T]    Script Date: 06/03/2016 15:51:58 ******/
CREATE SCHEMA [07T]
GO
/****** Object:  Schema [GP]    Script Date: 06/03/2016 15:51:58 ******/
CREATE SCHEMA [GP]
GO
/****** Object:  Schema [shared]    Script Date: 06/03/2016 15:51:58 ******/
CREATE SCHEMA [shared]
GO
/****** Object:  Table [07T].[GPAppointment]    Script Date: 06/03/2016 15:51:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON

	[SK_PatientID] [int] NOT NULL,
	[EventDate] [date] NOT NULL,
	[EventTime] [time](0) NOT NULL,
	[NativeClinicalCode] [varchar](12) NOT NULL,
	[Value] [real] NOT NULL,
	[Units] [varchar](30) NOT NULL,
	[AgeAtEvent] [tinyint] NOT NULL,
