USE [master]
GO
/****** Object:  Database [mdc]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE DATABASE [mdc]
 CONTAINMENT = NONE
 ON  PRIMARY 
( NAME = N'mdc_Data', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\mdc_Data.MDF' , SIZE = 2362752KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%)
 LOG ON 
( NAME = N'mdc_Log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\mdc_Log.LDF' , SIZE = 1435200KB , MAXSIZE = UNLIMITED, FILEGROWTH = 10%)
GO
ALTER DATABASE [mdc] SET COMPATIBILITY_LEVEL = 90
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [mdc].[dbo].[sp_fulltext_database] @action = 'disable'
end
GO
ALTER DATABASE [mdc] SET ANSI_NULL_DEFAULT OFF 
GO
ALTER DATABASE [mdc] SET ANSI_NULLS OFF 
GO
ALTER DATABASE [mdc] SET ANSI_PADDING OFF 
GO
ALTER DATABASE [mdc] SET ANSI_WARNINGS OFF 
GO
ALTER DATABASE [mdc] SET ARITHABORT OFF 
GO
ALTER DATABASE [mdc] SET AUTO_CLOSE OFF 
GO
ALTER DATABASE [mdc] SET AUTO_CREATE_STATISTICS ON 
GO
ALTER DATABASE [mdc] SET AUTO_SHRINK OFF 
GO
ALTER DATABASE [mdc] SET AUTO_UPDATE_STATISTICS ON 
GO
ALTER DATABASE [mdc] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO
ALTER DATABASE [mdc] SET CURSOR_DEFAULT  GLOBAL 
GO
ALTER DATABASE [mdc] SET CONCAT_NULL_YIELDS_NULL OFF 
GO
ALTER DATABASE [mdc] SET NUMERIC_ROUNDABORT OFF 
GO
ALTER DATABASE [mdc] SET QUOTED_IDENTIFIER OFF 
GO
ALTER DATABASE [mdc] SET RECURSIVE_TRIGGERS OFF 
GO
ALTER DATABASE [mdc] SET  DISABLE_BROKER 
GO
ALTER DATABASE [mdc] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO
ALTER DATABASE [mdc] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO
ALTER DATABASE [mdc] SET TRUSTWORTHY OFF 
GO
ALTER DATABASE [mdc] SET ALLOW_SNAPSHOT_ISOLATION OFF 
GO
ALTER DATABASE [mdc] SET PARAMETERIZATION SIMPLE 
GO
ALTER DATABASE [mdc] SET READ_COMMITTED_SNAPSHOT OFF 
GO
ALTER DATABASE [mdc] SET HONOR_BROKER_PRIORITY OFF 
GO
ALTER DATABASE [mdc] SET RECOVERY FULL 
GO
ALTER DATABASE [mdc] SET  MULTI_USER 
GO
ALTER DATABASE [mdc] SET PAGE_VERIFY NONE  
GO
ALTER DATABASE [mdc] SET DB_CHAINING OFF 
GO
ALTER DATABASE [mdc] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF ) 
GO
ALTER DATABASE [mdc] SET TARGET_RECOVERY_TIME = 0 SECONDS 
GO
USE [mdc]
GO
ALTER ROLE [db_datareader] ADD MEMBER [mdcuser]
GO
ALTER ROLE [db_datawriter] ADD MEMBER [mdcuser]
GO
/****** Object:  StoredProcedure [dbo].[SearchAllTables]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROC [dbo].[SearchAllTables]
(
	@SearchStr nvarchar(100)
)
AS
BEGIN

	-- Copyright © 2002 Narayana Vyas Kondreddi. All rights reserved.
	-- Purpose: To search all columns of all tables for a given search string
	-- Written by: Narayana Vyas Kondreddi
	-- Site: http://vyaskn.tripod.com
	-- Tested on: SQL Server 7.0 and SQL Server 2000
	-- Date modified: 28th July 2002 22:50 GMT


	CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630))

	SET NOCOUNT ON

	DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110)
	SET  @TableName = ''
	SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''')

	WHILE @TableName IS NOT NULL
	BEGIN
		SET @ColumnName = ''
		SET @TableName = 
		(
			SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME))
			FROM 	INFORMATION_SCHEMA.TABLES
			WHERE 		TABLE_TYPE = 'BASE TABLE'
				AND	QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) > @TableName
				AND	OBJECTPROPERTY(
						OBJECT_ID(
							QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)
							 ), 'IsMSShipped'
						       ) = 0
		)

		WHILE (@TableName IS NOT NULL) AND (@ColumnName IS NOT NULL)
		BEGIN
			SET @ColumnName =
			(
				SELECT MIN(QUOTENAME(COLUMN_NAME))
				FROM 	INFORMATION_SCHEMA.COLUMNS
				WHERE 		TABLE_SCHEMA	= PARSENAME(@TableName, 2)
					AND	TABLE_NAME	= PARSENAME(@TableName, 1)
					AND	DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar')
					AND	QUOTENAME(COLUMN_NAME) > @ColumnName
			)
	
			IF @ColumnName IS NOT NULL
			BEGIN
				INSERT INTO #Results
				EXEC
				(
					'SELECT ''' + @TableName + '.' + @ColumnName + ''', LEFT(' + @ColumnName + ', 3630) 
					FROM ' + @TableName + ' (NOLOCK) ' +
					' WHERE ' + @ColumnName + ' LIKE ' + @SearchStr2
				)
			END
		END	
	END

	SELECT ColumnName, ColumnValue FROM #Results
END

GO
/****** Object:  Table [dbo].[ADDRESS]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[ADDRESS](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[ADD_ADDRESS1] [varchar](80) NOT NULL,
	[ADD_ADDRESS2] [varchar](80) NOT NULL,
	[ADD_BULK] [varchar](50) NOT NULL,
	[ADD_CITY] [varchar](30) NOT NULL,
	[ADD_COUNTRY] [varchar](20) NOT NULL,
	[ADD_MAIN_FAX] [varchar](19) NOT NULL,
	[ADD_MAIN_PHONE] [varchar](19) NOT NULL,
	[ADD_STATE] [smallint] NOT NULL,
	[ADD_ZIP_CODE] [varchar](10) NOT NULL,
 CONSTRAINT [PK_ADDRESS] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[APPLI_OPTION]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[APPLI_OPTION](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[OPT_NAME] [varchar](31) NOT NULL,
	[OPT_USER] [int] NOT NULL,
	[OPT_VALUE] [varchar](255) NOT NULL,
 CONSTRAINT [PK_APPLI_OPTION] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[APPLI_USER]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[APPLI_USER](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[EXTRACT] [varchar](61) NOT NULL,
	[DENT_PROVIDER] [int] NOT NULL,
	[USER_LEVEL] [smallint] NOT NULL,
	[USER_ORGANIZATION] [int] NOT NULL,
	[USER_PASSWORD] [varchar](10) NOT NULL,
	[USER_PERSON] [int] NOT NULL,
	[USER_PROFIL] [varchar](9) NOT NULL,
	[USER_AGREEMENT] [smallint] NOT NULL
) ON [PRIMARY]
SET ANSI_PADDING ON
ALTER TABLE [dbo].[APPLI_USER] ADD [USER_CTX] [varchar](6) NOT NULL DEFAULT ('')
 CONSTRAINT [PK_APPLI_USER] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[ATTACHED_DOCUMENT]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[ATTACHED_DOCUMENT](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[EXTRACT] [varchar](61) NOT NULL,
	[ATTD_CHARTKIND] [smallint] NOT NULL,
	[ATTD_CHARTPOS] [smallint] NOT NULL,
	[ATTD_DOC_KIND] [smallint] NOT NULL,
	[ATTD_FILE] [varchar](15) NOT NULL,
	[ATTD_NAME] [varchar](30) NOT NULL,
	[ATTD_PERSON] [int] NOT NULL,
 CONSTRAINT [PK_ATTACHED_DOCUMENT] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[ATTACHED_IMAGE]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[ATTACHED_IMAGE](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[ATTI_FILE] [varchar](15) NOT NULL,
	[ATTI_LEGEND] [varchar](255) NOT NULL,
 CONSTRAINT [PK_ATTACHED_IMAGE] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[ATTORNEY]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[ATTORNEY](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[ATT_ADDRESS] [int] NOT NULL,
	[ATT_NAME] [varchar](63) NOT NULL,
	[ATT_CONTACT] [varchar](63) NOT NULL,
 CONSTRAINT [PK_ATTORNEY] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[AUTO_TASKS]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[AUTO_TASKS](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[AUT_CONFI_ACTIVE] [smallint] NOT NULL,
	[AUT_CONFI_MODEL] [varchar](31) NOT NULL,
	[AUT_CONFI_PRODUCT] [int] NOT NULL,
	[AUT_CONFI_NBWKS_BEFORE] [smallint] NOT NULL,
	[AUT_RECAL_ACTIVE] [smallint] NOT NULL,
	[AUT_RECAL_MODEL] [varchar](31) NOT NULL,
	[AUT_RECAL_PRODUCT] [int] NOT NULL,
	[AUT_RECAL_NBWKS_BEFORE] [smallint] NOT NULL,
	[AUT_WELLC_ACTIVE] [smallint] NOT NULL,
	[AUT_WELC_MODEL] [varchar](31) NOT NULL,
	[AUT_WELC_PRODUCT] [int] NOT NULL,
	[AUT_STATE_ACTIVE] [smallint] NOT NULL,
	[AUT_STATE_MODEL] [varchar](31) NOT NULL,
	[AUT_STATE_PRODUCT] [int] NOT NULL,
	[AUT_STATE_MIN] [decimal](11, 2) NOT NULL,
	[AUT_BIRTH_ACTIVE] [smallint] NOT NULL,
	[AUT_BIRTH_MODEL] [varchar](31) NOT NULL,
	[AUT_BIRTH_PRODUCT] [int] NOT NULL,
	[AUT_BIRTH_NBWKS_BEFORE] [smallint] NOT NULL,
	[AUT_HOLID_ACTIVE] [smallint] NOT NULL,
	[AUT_HOLID_MODEL] [varchar](31) NOT NULL,
	[AUT_HOLID_PRODUCT] [int] NOT NULL,
	[AUT_HOLID_WHICH] [smallint] NOT NULL,
	[AUT_HOLID_NBWKS_BEFORE] [smallint] NOT NULL,
 CONSTRAINT [PK_AUTO_TASKS] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[BREAKDOWN]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BREAKDOWN](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[BRK_AMOUNT] [decimal](11, 2) NOT NULL,
	[BRK_PAYMENT] [int] NOT NULL,
	[BRK_TREATMENT] [int] NOT NULL,
	[BRK_CLAIM] [int] NOT NULL,
 CONSTRAINT [PK_BREAKDOWN] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[CHAIR]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[CHAIR](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[CHAI_CHECKIN] [int] NOT NULL,
	[CHAI_FRE_INCOME] [decimal](11, 2) NOT NULL,
	[CHAI_LOCATION] [varchar](15) NOT NULL,
	[CHAI_MON_INCOME] [decimal](11, 2) NOT NULL,
	[CHAI_NAME] [varchar](30) NOT NULL,
	[CHAI_ORDER] [smallint] NOT NULL,
	[CHAI_PLAN_MODEL] [int] NOT NULL,
	[CHAI_SAT_INCOME] [decimal](11, 2) NOT NULL,
	[CHAI_SUN_INCOME] [decimal](11, 2) NOT NULL,
	[CHAI_THU_INCOME] [decimal](11, 2) NOT NULL,
	[CHAI_TUE_INCOME] [decimal](11, 2) NOT NULL,
	[CHAI_WED_INCOME] [decimal](11, 2) NOT NULL,
	[CHAI_MON_TIMESTART] [int] NOT NULL,
	[CHAI_MON_TIMESTOP] [int] NOT NULL,
	[CHAI_TUE_TIMESTART] [int] NOT NULL,
	[CHAI_TUE_TIMESTOP] [int] NOT NULL,
	[CHAI_WED_TIMESTART] [int] NOT NULL,
	[CHAI_WED_TIMESTOP] [int] NOT NULL,
	[CHAI_THU_TIMESTART] [int] NOT NULL,
	[CHAI_THU_TIMESTOP] [int] NOT NULL,
	[CHAI_FRI_TIMESTART] [int] NOT NULL,
	[CHAI_FRI_TIMESTOP] [int] NOT NULL,
	[CHAI_SAT_TIMESTART] [int] NOT NULL,
	[CHAI_SAT_TIMESTOP] [int] NOT NULL,
	[CHAI_SUN_TIMESTART] [int] NOT NULL,
	[CHAI_SUN_TIMESTOP] [int] NOT NULL,
	[CHAI_SUN_LUNCHSTART] [int] NOT NULL,
	[CHAI_SUN_LUNCHSTOP] [int] NOT NULL,
	[CHAI_MON_LUNCHSTART] [int] NOT NULL,
	[CHAI_MON_LUNCHSTOP] [int] NOT NULL,
	[CHAI_TUE_LUNCHSTART] [int] NOT NULL,
	[CHAI_TUE_LUNCHSTOP] [int] NOT NULL,
	[CHAI_WED_LUNCHSTART] [int] NOT NULL,
	[CHAI_WED_LUNCHSTOP] [int] NOT NULL,
	[CHAI_THU_LUNCHSTART] [int] NOT NULL,
	[CHAI_THU_LUNCHSTOP] [int] NOT NULL,
	[CHAI_FRI_LUNCHSTART] [int] NOT NULL,
	[CHAI_FRI_LUNCHSTOP] [int] NOT NULL,
	[CHAI_SAT_LUNCHSTART] [int] NOT NULL,
	[CHAI_SAT_LUNCHSTOP] [int] NOT NULL,
 CONSTRAINT [PK_CHAIR] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[CHARTING]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[CHARTING](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[CHAR_MOBILITY] [varchar](32) NOT NULL,
	[CHAR_DEPTH] [varchar](192) NOT NULL,
	[CHAR_BLEED] [varchar](192) NOT NULL,
	[CHAR_SUPPUR] [varchar](192) NOT NULL,
 CONSTRAINT [PK_CHARTING] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[CLAI_PAYMENTS]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CLAI_PAYMENTS](
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[LEFTID] [int] NOT NULL,
	[RIGHTID] [int] NOT NULL,
 CONSTRAINT [PK_CLAI_PAYMENTS] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[CLAIM]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CLAIM](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[CLAIM_ID] [int] NOT NULL,
	[CLAI_BALANCE] [decimal](11, 2) NOT NULL,
	[CLAI_PROVIDER_SIGN] [smallint] NOT NULL,
	[CLAI_PATIENT_SIGN] [smallint] NOT NULL,
	[CLAI_RELEASE_INFO_INDIC] [smallint] NOT NULL,
	[CLAI_FILING] [smallint] NOT NULL,
	[CLAI_STATUS] [smallint] NOT NULL,
	[CLAI_SUBMIT_AMOUNT] [decimal](11, 2) NOT NULL,
	[CLAI_HAS_NOTES] [smallint] NOT NULL,
	[CLAI_OFFICE_VISIT] [int] NOT NULL,
	[CLAI_INSPLAN] [int] NOT NULL,
	[CLAI_SECONDARY] [smallint] NOT NULL,
	[CLAI_CLAIM_DATA] [int] NOT NULL,
	[CLAI_TREATMENT_PLAN] [int] NOT NULL,
 CONSTRAINT [PK_CLAIM] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[CLAIM_DATA]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[CLAIM_DATA](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[CLD_ACCIDENT_DATE] [int] NOT NULL,
	[CLD_ACCIDENT_RELATED] [smallint] NOT NULL,
	[CLD_ACCIDENT_STATE] [smallint] NOT NULL,
	[CLD_DATE_PRIOR_REP] [int] NOT NULL,
	[CLD_EMPLOYMENT_RELATED] [smallint] NOT NULL,
	[CLD_HOSPITAL_FROM] [int] NOT NULL,
	[CLD_HOSPITAL_TO] [int] NOT NULL,
	[CLD_LABS] [smallint] NOT NULL,
	[CLD_LABS_AMOUNT] [decimal](11, 2) NOT NULL,
	[CLD_UNABLE_FROM] [int] NOT NULL,
	[CLD_UNABLE_TO] [int] NOT NULL,
	[CLD_NB_XRAYS] [smallint] NOT NULL,
	[CLD_ORTHO_DATE_1STV] [int] NOT NULL,
	[CLD_ORTHO_ESTIMATE] [smallint] NOT NULL,
	[CLD_ORTHO_REMAIN] [smallint] NOT NULL,
	[CLD_ORTHO_TREAT] [smallint] NOT NULL,
	[CLD_ORTHO_TREAT_DATE] [int] NOT NULL,
	[CLD_PLACE_OF_TREATMENT] [smallint] NOT NULL,
	[CLD_PROT_INITIAL_REP] [smallint] NOT NULL,
	[CLD_PRIOR_AUTHORIZATION] [varchar](15) NOT NULL,
	[CLD_DOCUMENT] [smallint] NOT NULL,
 CONSTRAINT [PK_CLAIM_DATA] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[CREDIT_COMPANY]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[CREDIT_COMPANY](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[CCR_NAME] [varchar](60) NOT NULL,
	[CCR_CONTACT] [varchar](60) NOT NULL,
	[CCR_ADDRESS] [int] NOT NULL,
	[CCR_MINI_AMOUNT] [decimal](11, 2) NOT NULL,
	[CCR_MAXI_AMOUNT] [decimal](11, 2) NOT NULL,
	[CCR_MAXI_LENGHT] [int] NOT NULL,
	[CCR_PACKID] [varchar](20) NOT NULL,
	[CCR_SEND_METHOD] [smallint] NOT NULL,
	[CCR_SEND_INFORMATION] [varchar](127) NOT NULL,
	[CCR_WEB_SITE] [varchar](127) NOT NULL,
	[CCR_TOT_APPLI_SENT] [int] NOT NULL,
	[CCR_TOT_AMOUNT_SENT] [decimal](11, 2) NOT NULL,
	[CCR_TOT_AMOUNT_ACCEPTED] [decimal](11, 2) NOT NULL,
	[CCR_DEF_PROVIDER_DISCT] [decimal](11, 2) NOT NULL,
	[CCR_DEF_PACK_DISCT] [decimal](11, 2) NOT NULL,
 CONSTRAINT [PK_CREDIT_COMPANY] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[CREDIT_SOURCE]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[CREDIT_SOURCE](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[CCO_CREDIT_COMPANY] [int] NOT NULL,
	[CCO_NET_ORGANIZATION] [int] NOT NULL,
	[CCO_PROVIDER_DISCOUNT] [decimal](11, 2) NOT NULL,
	[CCO_PACK_DISCOUNT] [decimal](11, 2) NOT NULL,
	[CCO_PROVIDER_ID] [varchar](20) NOT NULL,
 CONSTRAINT [PK_CREDIT_SOURCE] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[CRITERIA]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[CRITERIA](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[CRI_TYPE] [int] NOT NULL,
	[CRI_DATA] [varchar](255) NOT NULL,
	[CRI_SET] [int] NOT NULL,
 CONSTRAINT [PK_CRITERIA] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[CRITERIA_SET]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[CRITERIA_SET](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[CRS_NAME] [varchar](60) NOT NULL,
	[CRS_MAXPAT] [int] NOT NULL,
	[CRS_CONTENTS] [smallint] NOT NULL,
 CONSTRAINT [PK_CRITERIA_SET] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[EMPLOYEE]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[EMPLOYEE](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[DOCT_BCBS_NUMBER] [varchar](13) NOT NULL,
	[DOCT_CHAIR1] [int] NOT NULL,
	[DOCT_CHAIR2] [int] NOT NULL,
	[DOCT_CHAIR3] [int] NOT NULL,
	[DOCT_CHAIR4] [int] NOT NULL,
	[DOCT_CHAIR5] [int] NOT NULL,
	[DOCT_DEA] [varchar](9) NOT NULL,
	[DOCT_HAS_TAB] [smallint] NOT NULL,
	[DOCT_LAST_MTD_UPDATE] [int] NOT NULL
) ON [PRIMARY]
SET ANSI_PADDING ON
ALTER TABLE [dbo].[EMPLOYEE] ADD [DOCT_LICENSE] [varchar](20) NULL
ALTER TABLE [dbo].[EMPLOYEE] ADD [DOCT_MTD_ADJUSMENT] [decimal](11, 2) NOT NULL
ALTER TABLE [dbo].[EMPLOYEE] ADD [DOCT_MTD_CHRG_ADJUST] [decimal](11, 2) NOT NULL
ALTER TABLE [dbo].[EMPLOYEE] ADD [DOCT_MTD_COLLECTION] [decimal](11, 2) NOT NULL
ALTER TABLE [dbo].[EMPLOYEE] ADD [DOCT_MTD_PRODUCTION] [decimal](11, 2) NOT NULL
ALTER TABLE [dbo].[EMPLOYEE] ADD [DOCT_SPECIALTY_CODE] [smallint] NOT NULL
ALTER TABLE [dbo].[EMPLOYEE] ADD [DOCT_STATUS] [smallint] NOT NULL
ALTER TABLE [dbo].[EMPLOYEE] ADD [DOCT_YTD_ADJUSMENT] [decimal](11, 2) NOT NULL
ALTER TABLE [dbo].[EMPLOYEE] ADD [DOCT_YTD_CHRG_ADJUST] [decimal](11, 2) NOT NULL
ALTER TABLE [dbo].[EMPLOYEE] ADD [DOCT_YTD_COLLECTION] [decimal](11, 2) NOT NULL
ALTER TABLE [dbo].[EMPLOYEE] ADD [DOCT_YTD_PRODUCTION] [decimal](11, 2) NOT NULL
ALTER TABLE [dbo].[EMPLOYEE] ADD [EMP_COLOR] [smallint] NOT NULL
ALTER TABLE [dbo].[EMPLOYEE] ADD [EMP_END_DATE] [int] NOT NULL
ALTER TABLE [dbo].[EMPLOYEE] ADD [EMP_OFFICE] [int] NOT NULL
ALTER TABLE [dbo].[EMPLOYEE] ADD [EMP_PERSON] [int] NOT NULL
ALTER TABLE [dbo].[EMPLOYEE] ADD [EMP_STARTING_DATE] [int] NOT NULL
ALTER TABLE [dbo].[EMPLOYEE] ADD [EMP_TITLE] [smallint] NOT NULL
SET ANSI_PADDING OFF
ALTER TABLE [dbo].[EMPLOYEE] ADD [EMP_SHORT_DESC] [varchar](31) NOT NULL
SET ANSI_PADDING ON
ALTER TABLE [dbo].[EMPLOYEE] ADD [DOCT_MEDICAID] [varchar](20) NOT NULL DEFAULT ('')
ALTER TABLE [dbo].[EMPLOYEE] ADD [DOCT_NPI] [varchar](10) NOT NULL DEFAULT ('')
 CONSTRAINT [PK_EMPLOYEE] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[EMPLOYER]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[EMPLOYER](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[EMPR_ADDRESS] [int] NOT NULL,
	[EMPR_NAME] [varchar](31) NOT NULL,
 CONSTRAINT [PK_EMPLOYER] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[FEE_ELEMENT]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[FEE_ELEMENT](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[FELT_INSUR_CLASS] [smallint] NOT NULL,
	[FELT_PRICE] [decimal](11, 2) NOT NULL,
	[FELT_COPAY] [decimal](11, 2) NOT NULL,
	[FELT_SCHEDULE] [int] NOT NULL,
	[FELT_STDT_TREATMENT] [varchar](5) NOT NULL,
	[FELT_STDT_TREATMENT_DB] [smallint] NOT NULL,
	[FELT_TIME_UNIT_DOC] [smallint] NOT NULL,
	[FELT_TREA_GROUP] [smallint] NOT NULL,
 CONSTRAINT [PK_FEE_ELEMENT] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[FEE_SCHEDULE]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[FEE_SCHEDULE](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[FEE_DESCRIPTION] [varchar](255) NOT NULL,
	[FEE_NAME] [varchar](15) NOT NULL,
 CONSTRAINT [PK_FEE_SCHEDULE] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[HISTO_OPERATION]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[HISTO_OPERATION](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[HIST_OPERATION] [smallint] NOT NULL,
	[HIST_PARAM1] [int] NOT NULL,
	[HIST_PARAM2] [int] NOT NULL,
	[HIST_REFID] [int] NOT NULL,
	[HIST_TIME] [int] NOT NULL,
	[HIST_USER] [int] NOT NULL,
	[HIST_COMMENT] [varchar](127) NOT NULL,
 CONSTRAINT [PK_HISTO_OPERATION] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[INSCOV]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[INSCOV](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[INSC_BENEFICIARY] [int] NOT NULL,
	[INSC_BENEF_STATUS] [smallint] NOT NULL,
	[INSC_INSPLAN] [int] NOT NULL,
	[INSC_EMPLOYER] [int] NOT NULL,
	[INSC_INSURED_ID] [varchar](17) NOT NULL,
	[INSC_CUR_TOTAL_DEDUCTIBLE] [decimal](11, 2) NOT NULL,
	[INSC_CUR_MAX_YEAR_COVERAGE] [decimal](11, 2) NOT NULL,
	[INSC_CUR_ORTHO_DEDUCTIBLE] [decimal](11, 2) NOT NULL,
	[INSC_CUR_MAX_ORTHO_COVERAGE] [decimal](11, 2) NOT NULL,
	[INSC_RENEWAL_DATE] [int] NOT NULL,
	[INSC_INSURED_PERSON] [int] NOT NULL,
 CONSTRAINT [PK_INSCOV] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[INSPLAN]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[INSPLAN](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[INSP_COVER_BASIC] [int] NOT NULL,
	[INSP_COVER_MAJOR] [int] NOT NULL,
	[INSP_COVER_OTHER] [int] NOT NULL,
	[INSP_COVER_PREVENTIVE] [int] NOT NULL,
	[INSP_COVER_PERIODIC] [int] NOT NULL,
	[INSP_COVER_ORTHO] [int] NOT NULL,
	[INSP_GROUP_NAME] [varchar](17) NOT NULL,
	[INSP_GROUP_NUMBER] [varchar](20) NOT NULL,
	[INSP_MAX_YEAR_COVERAGE] [decimal](11, 2) NOT NULL,
	[INSP_PAYER] [int] NOT NULL,
	[INSP_EMPLOYER] [int] NOT NULL,
	[INSP_TOTAL_DEDUCTIBLE] [decimal](11, 2) NOT NULL,
	[INSP_INCLUDE_PREVENTIVE] [smallint] NOT NULL,
	[INSP_FAMILY_DEDUCTIBLE] [decimal](11, 2) NOT NULL,
	[INSP_FEE] [int] NOT NULL,
	[INSP_ORTHO_DEDUCTIBLE] [decimal](11, 2) NOT NULL,
	[INSP_MAX_ORTHO_COVERAGE] [decimal](11, 2) NOT NULL,
 CONSTRAINT [PK_INSPLAN] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[MEDICATION]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[MEDICATION](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[MEDI_AUTH_REQUIRED] [smallint] NOT NULL,
	[MEDI_DISPENSE] [varchar](30) NOT NULL,
	[MEDI_INSTRUCTIONS] [text] NOT NULL,
	[MEDI_NAME] [varchar](60) NOT NULL,
	[MEDI_SIG] [varchar](60) NOT NULL,
 CONSTRAINT [PK_MEDICATION] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[NET_ORGANIZATION]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[NET_ORGANIZATION](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[ORGA_CLASS] [smallint] NOT NULL,
	[ORGA_CUR_PHONE_AREA] [varchar](3) NOT NULL,
	[ORGA_CUSTOMER] [int] NOT NULL,
	[ORGA_DEFAULT_STATE] [smallint] NOT NULL,
	[ORGA_DEF_PRESENTATION] [varchar](31) NOT NULL,
	[ORGA_DICTIONARY] [int] NOT NULL,
	[ORGA_NAME] [varchar](30) NOT NULL,
	[ORGA_CANSEND_ELECTRONIC] [smallint] NOT NULL,
	[ORGA_CANSEND_REGULARMAIL] [smallint] NOT NULL,
	[ORGA_CANSEND_STATEMENT] [smallint] NOT NULL,
	[ORGA_CANSEND_FAX] [smallint] NOT NULL,
	[ORGA_ISDISABLED] [smallint] NOT NULL,
	[ORGA_EXPIRATION_DATE] [int] NOT NULL,
	[ORGA_KIND] [smallint] NOT NULL,
	[ORGA_CANSEND_ECLAIMS] [smallint] NOT NULL,
	[ORGA_PRIVLABEL] [smallint] NOT NULL,
	[ORGA_BALANCE] [decimal](11, 2) NOT NULL,
	[ORGA_SUBSCRIPTION_FEE] [decimal](11, 2) NOT NULL,
	[ORGA_MAX_NB_USERS] [smallint] NOT NULL,
 CONSTRAINT [PK_NET_ORGANIZATION] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[NOTE]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[NOTE](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[NOTE_APPLI_USER] [int] NOT NULL,
	[NOTE_KIND] [smallint] NOT NULL,
	[NOTE_OBJCLASS] [smallint] NOT NULL,
	[NOTE_OBJID] [int] NOT NULL,
	[NOTE_SUBJECT] [varchar](127) NOT NULL,
	[NOTE_TEXT] [text] NOT NULL,
	[NOTE_REFERRAL_ACCESS] [smallint] NOT NULL,
 CONSTRAINT [PK_NOTE] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[NOTE_DOCUMENT]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[NOTE_DOCUMENT](
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[LEFTID] [int] NOT NULL,
	[RIGHTID] [int] NOT NULL,
 CONSTRAINT [PK_NOTE_DOCUMENT] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[OFCR_ST_TREATMENTS]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[OFCR_ST_TREATMENTS](
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[LEFTID] [int] NOT NULL,
	[RIGHTID] [varchar](5) NOT NULL,
 CONSTRAINT [PK_OFCR_ST_TREATMENTS] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[OFF_CARE]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[OFF_CARE](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[OFCR_ABREVIATION] [varchar](10) NOT NULL,
	[OFCR_DESCRIPTION] [varchar](255) NOT NULL,
	[OFCR_GROUP] [smallint] NOT NULL,
	[OFCR_NB_UNITS] [smallint] NOT NULL,
	[OFCR_PRES_ORDER] [smallint] NOT NULL,
	[OFCR_PROVIDER] [int] NOT NULL,
	[OFCR_QSCHEDULE] [smallint] NOT NULL,
	[OFCR_QUADRANT_DEPENDENT] [smallint] NOT NULL,
	[OFCR_SCHEDULE_GROUP] [smallint] NOT NULL,
	[OFCR_SHORT_DESCRIPTION] [varchar](31) NOT NULL,
	[OFCR_SURFACE_DEPENDENT] [smallint] NOT NULL,
	[OFCR_TOOTH_DEPENDENT] [smallint] NOT NULL,
 CONSTRAINT [PK_OFF_CARE] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[OFFI_DOCTORS]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OFFI_DOCTORS](
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[LEFTID] [int] NOT NULL,
	[RIGHTID] [int] NOT NULL,
 CONSTRAINT [PK_OFFI_DOCTORS] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[OFFI_HYGIENIST]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OFFI_HYGIENIST](
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[LEFTID] [int] NOT NULL,
	[RIGHTID] [int] NOT NULL,
 CONSTRAINT [PK_OFFI_HYGIENIST] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[OFFICE]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[OFFICE](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[OFFI_CLAIM_ORGATYPE] [smallint] NOT NULL,
	[OFFI_ADDRESS] [int] NOT NULL,
	[OFFI_DAY_CLEAR_LOG] [smallint] NOT NULL,
	[OFFI_DEA_NO] [varchar](9) NOT NULL,
	[OFFI_DEFAULT_FEE_SCHE] [int] NOT NULL,
	[OFFI_E_CLAIM_ID] [varchar](8) NOT NULL,
	[OFFI_E_MAIL] [varchar](40) NOT NULL,
	[OFFI_EMERGENCY_PHONE] [varchar](19) NOT NULL,
	[OFFI_FOUNDED_DATE] [int] NOT NULL,
	[OFFI_DATE_CLOSURE] [int] NOT NULL,
	[OFFI_LICENSE] [varchar](9) NOT NULL,
	[OFFI_MEMO_RECIPIENT] [int] NOT NULL,
	[OFFI_NAME] [varchar](40) NOT NULL,
	[OFFI_NB_REC_LOG] [smallint] NOT NULL,
	[OFFI_OBJECTIVE_ISFADACODE] [smallint] NOT NULL,
	[OFFI_OM_FULL_NAME] [varchar](61) NOT NULL,
	[OFFI_OM_TITLE] [varchar](31) NOT NULL,
	[OFFI_ORGANISATION] [int] NOT NULL,
	[OFFI_PAT_EDUC_DIR] [varchar](80) NOT NULL,
	[OFFI_SC_FULL_NAME] [varchar](61) NOT NULL,
	[OFFI_SC_TITLE] [varchar](31) NOT NULL,
	[OFFI_SSN_TIN] [varchar](12) NOT NULL,
	[OFFI_TIMDIFF_TO_SRV] [int] NOT NULL,
	[OFFI_WEB_SITE] [varchar](31) NOT NULL,
	[OFFI_GEN_INFO_FORMAT] [smallint] NOT NULL,
	[OFFI_CHAIR_PROVIDER] [smallint] NOT NULL
) ON [PRIMARY]
SET ANSI_PADDING ON
ALTER TABLE [dbo].[OFFICE] ADD [OFFI_MEDICAID] [varchar](20) NOT NULL DEFAULT ('')
ALTER TABLE [dbo].[OFFICE] ADD [OFFI_NPI] [varchar](10) NOT NULL DEFAULT ('')
 CONSTRAINT [PK_OFFICE] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[OFFICE_VISIT]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[OFFICE_VISIT](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[OFFV_CHAIR] [int] NOT NULL,
	[OFFV_HAS_NOTES] [smallint] NOT NULL,
	[OFFV_AMOUNT] [decimal](11, 2) NOT NULL,
	[OFFV_NB_UNITS] [smallint] NOT NULL,
	[OFFV_PERSON] [int] NOT NULL,
	[OFFV_PROVIDER] [int] NOT NULL,
	[OFFV_ASSISTANT] [int] NOT NULL,
	[OFFV_SCHEDULE_GROUP] [smallint] NOT NULL,
	[OFFV_STATUS] [smallint] NOT NULL,
	[OFFV_SUBJECT] [varchar](60) NOT NULL,
	[OFFV_SYMBOLS] [varchar](31) NOT NULL,
	[OFFV_TRT_PLAN] [int] NOT NULL,
	[OFFV_VISIT_DATE] [int] NOT NULL,
	[OFFV_VISIT_CONFIRM] [varchar](10) NOT NULL,
	[OFFV_VISIT_TIME] [int] NOT NULL,
 CONSTRAINT [PK_OFFICE_VISIT] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[ORGA_TDHS_BUILDING]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[ORGA_TDHS_BUILDING](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[TDHS_OFFICE] [varchar](30) NOT NULL,
	[TDHS_ADDRESS] [int] NOT NULL,
 CONSTRAINT [PK_ORGA_TDHS_BUILDING] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[OUT_DOC]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[OUT_DOC](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[OUTD_COMMENT] [varchar](255) NOT NULL,
	[OUTD_EXTRACT] [varchar](255) NOT NULL,
	[OUTD_ID1] [int] NOT NULL,
	[OUTD_ID2] [int] NOT NULL,
	[OUTD_ID3] [int] NOT NULL,
	[OUTD_KIND] [smallint] NOT NULL,
	[OUTD_MODEL] [varchar](31) NOT NULL,
	[OUTD_PRODUCT] [int] NOT NULL,
	[OUTD_PERSON] [int] NOT NULL,
	[OUTD_PRICE] [decimal](11, 2) NOT NULL,
	[OUTD_SEND_DATE] [int] NOT NULL,
	[OUTD_SHIPMODE] [smallint] NOT NULL,
	[OUTD_STATUS] [smallint] NOT NULL,
 CONSTRAINT [PK_OUT_DOC] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[PATIENT_LIST]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[PATIENT_LIST](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[PATL_NAME] [varchar](255) NOT NULL,
 CONSTRAINT [PK_PATIENT_LIST] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[PATL_ELEMENTS]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PATL_ELEMENTS](
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[LEFTID] [int] NOT NULL,
	[RIGHTID] [int] NOT NULL,
 CONSTRAINT [PK_PATL_ELEMENTS] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[PAYER]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[PAYER](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[PAY_ADDRESS] [int] NOT NULL,
	[PAY_GROUP_NUMBER] [varchar](20) NOT NULL,
	[PAY_ID] [varchar](5) NOT NULL,
	[PAY_NAME] [varchar](63) NOT NULL,
	[PAY_PARTICIPATING_STATUS] [smallint] NOT NULL,
	[PAY_BALANCE] [decimal](11, 2) NOT NULL,
	[PAY_TYPE_CODE] [smallint] NOT NULL,
 CONSTRAINT [PK_PAYER] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[PAYMENT]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[PAYMENT](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[PAYM_AMOUNT] [decimal](11, 2) NOT NULL,
	[PAYM_DATE] [int] NOT NULL,
	[PAYM_INFORMATION] [varchar](15) NOT NULL,
	[PAYM_INITIALS] [varchar](5) NOT NULL,
	[PAYM_LEDGER] [int] NOT NULL,
	[PAYM_PAYER] [int] NOT NULL,
	[PAYM_PROVIDER] [int] NOT NULL,
	[PAYM_SUPPORT] [int] NOT NULL,
	[PAYM_PPLAN] [int] NOT NULL,
	[PAYM_REMAINDER] [decimal](11, 2) NOT NULL,
 CONSTRAINT [PK_PAYMENT] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[PAYMENT_PLAN]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PAYMENT_PLAN](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[PPLAN_PLAN_CAPTURE_MODE] [smallint] NOT NULL,
	[PPLAN_PLAN_NEXTROLLING] [int] NOT NULL,
	[PPLAN_RESPONSIBLE_PARTY] [int] NOT NULL,
	[PPLAN_PLAN_AMOUNT] [decimal](11, 2) NOT NULL,
	[PPLAN_PLAN_DATE] [int] NOT NULL,
	[PPLAN_PLAN_DOWN_PAYMENT] [decimal](11, 2) NOT NULL,
	[PPLAN_PLAN_BALANCE] [decimal](11, 2) NOT NULL,
	[PPLAN_PLAN_INT_RATE] [decimal](11, 2) NOT NULL,
	[PPLAN_PLAN_MONTHLY_PAYMENT] [decimal](11, 2) NOT NULL,
	[PPLAN_PLAN_LAST_PAYMENT] [decimal](11, 2) NOT NULL,
	[PPLAN_PLAN_NB_MONTHS] [smallint] NOT NULL,
 CONSTRAINT [PK_PAYMENT_PLAN] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[PER_REFERED_TO]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PER_REFERED_TO](
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[LEFTID] [int] NOT NULL,
	[RIGHTID] [int] NOT NULL,
 CONSTRAINT [PK_PER_REFERED_TO] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[PERSON]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[PERSON](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[INSU_ASSIGN_BENE] [smallint] NOT NULL,
	[INSU_EMPLOYER] [int] NOT NULL,
	[PER_ATTORNEY] [int] NOT NULL,
	[INSU_INSCOV1] [int] NOT NULL,
	[INSU_INSCOV2] [int] NOT NULL,
	[INSU_STUDENT_CODE] [smallint] NOT NULL,
	[PER_ASSISTANT] [int] NOT NULL,
	[PER_BIRTH_DATE] [int] NOT NULL,
	[PER_BULK] [varchar](100) NOT NULL,
	[PER_CATEGORY] [smallint] NOT NULL,
	[PER_CHARTING] [varchar](52) NOT NULL,
	[PER_DATE_LAST_VISIT] [int] NOT NULL,
	[PER_DOCTOR] [int] NOT NULL,
	[PER_EMERGENCY_CONTACT] [varchar](30) NOT NULL,
	[PER_EMERGENCY_PHONE] [varchar](19) NOT NULL,
	[PER_EMPLOYMENT] [smallint] NOT NULL,
	[PER_E_MAIL] [varchar](40) NOT NULL,
	[PER_E_MAIL_PROF] [varchar](40) NOT NULL,
	[PER_FEE] [int] NOT NULL,
	[PER_FIRST_NAME] [varchar](30) NOT NULL,
	[PER_MIDDLE_NAME] [varchar](1) NOT NULL,
	[PER_GENERATION] [smallint] NOT NULL,
	[PER_HAS_NOTES] [smallint] NOT NULL,
	[PER_HYGIENIST] [int] NOT NULL,
	[PER_ID_PHOTO] [varchar](15) NOT NULL,
	[PER_IS_LEDGER] [smallint] NOT NULL,
	[PER_LANGUAGE] [smallint] NOT NULL,
	[PER_LAST_RECALL] [int] NOT NULL,
	[PER_LAST_VISIT] [int] NOT NULL,
	[PER_LEDGER] [int] NOT NULL,
	[PER_MARITAL_STATUS] [smallint] NOT NULL,
	[PER_MEDIC_WARNING1] [varchar](31) NOT NULL,
	[PER_MEDIC_WARNING2] [varchar](31) NOT NULL,
	[PER_MOBILE_PHONE] [varchar](19) NOT NULL,
	[PER_NAME] [varchar](30) NOT NULL,
	[PER_NB_CANCEL] [smallint] NOT NULL,
	[PER_NB_NO_SHOWS] [smallint] NOT NULL,
	[PER_NB_RESCHEDULE] [smallint] NOT NULL,
	[PER_NEXT_RECALL] [int] NOT NULL,
	[PER_NO_SEND_STATE] [smallint] NOT NULL,
	[PER_OFFICE_PHONE] [varchar](19) NOT NULL,
	[PER_PREFERED_FN] [varchar](10) NOT NULL,
	[PER_PRIVATE_ADDRESS] [int] NOT NULL,
	[PER_PRIVATE_PHONE] [varchar](19) NOT NULL,
	[PER_RECALL] [int] NOT NULL,
	[PER_REFERED_BY] [int] NOT NULL,
	[PER_SEXE] [smallint] NOT NULL,
	[PER_SSN] [varchar](12) NOT NULL,
	[PER_STATUS] [smallint] NOT NULL,
	[PER_TITLE_PREFERENCE] [smallint] NOT NULL,
	[PER_USER] [int] NOT NULL,
	[PER_IS_NOT_PATIENT] [smallint] NOT NULL,
	[PER_NEW_PATIENT] [smallint] NOT NULL,
	[PER_CHARTING_INFO] [int] NOT NULL
) ON [PRIMARY]
SET ANSI_PADDING ON
ALTER TABLE [dbo].[PERSON] ADD [PER_MEDIC_WARNINGS] [varchar](255) NULL DEFAULT ('')
 CONSTRAINT [PK_PERSON] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[PLAN_MODEL_RULE]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[PLAN_MODEL_RULE](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[PMEL_ACTIVITY_SET] [varchar](10) NOT NULL,
	[PMEL_DAY] [smallint] NOT NULL,
	[PMEL_DURATION] [smallint] NOT NULL,
	[PMEL_END_TIME] [int] NOT NULL,
	[PMEL_PLAN_MODEL] [int] NOT NULL,
	[PMEL_START_TIME] [int] NOT NULL,
 CONSTRAINT [PK_PLAN_MODEL_RULE] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[PLANNING_MODEL]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[PLANNING_MODEL](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[PLAN_NAME] [varchar](31) NOT NULL,
 CONSTRAINT [PK_PLANNING_MODEL] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[POL_NEGO_PRODUCT]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[POL_NEGO_PRODUCT](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[PNP_ABOVE_VOLUME1] [int] NOT NULL,
	[PNP_ABOVE_VOLUME2] [int] NOT NULL,
	[PNP_ABOVE_VOLUME3] [int] NOT NULL,
	[PNP_DISCOUNT1] [int] NOT NULL,
	[PNP_DISCOUNT2] [int] NOT NULL,
	[PNP_DISCOUNT3] [int] NOT NULL,
	[PNP_ORGANIZATION] [int] NOT NULL,
	[PNP_NEED_APPROVAL] [smallint] NOT NULL,
	[PNP_PRODUCT] [int] NOT NULL,
	[PNP_SEND] [smallint] NOT NULL,
 CONSTRAINT [PK_POL_NEGO_PRODUCT] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[POL_PRODUCT]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[POL_PRODUCT](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[PRO_REF] [varchar](31) NOT NULL,
	[PRO_DOCKIND] [smallint] NOT NULL,
	[PRO_SUBCONTRACTOR] [int] NOT NULL,
	[PRO_DESCR] [varchar](127) NOT NULL,
	[PRO_SMALLIMG] [varchar](15) NOT NULL,
	[PRO_LARGEIMG] [varchar](15) NOT NULL,
	[PRO_PRICE] [decimal](11, 2) NOT NULL,
	[PRO_DATE_OBSOLETE] [int] NOT NULL,
	[PRO_FOR_SALE] [smallint] NOT NULL,
	[PRO_FOR_DENTAL] [smallint] NOT NULL,
	[PRO_FOR_CHIRO] [smallint] NOT NULL,
	[PRO_FOR_VET] [smallint] NOT NULL,
	[PRO_FOR_OPTO] [smallint] NOT NULL,
	[PRO_FOR_SALON] [smallint] NOT NULL,
 CONSTRAINT [PK_POL_PRODUCT] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[PRESCRIPTION]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PRESCRIPTION](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[PRES_DISPENSE_WRITTEN] [smallint] NOT NULL,
	[PRES_INSTRUCTION] [int] NOT NULL,
	[PRES_LABEL] [smallint] NOT NULL,
	[PRES_MEDICATION] [int] NOT NULL,
	[PRES_NOTE] [text] NOT NULL,
	[PRES_PATIENT] [int] NOT NULL,
	[PRES_PRESCRIPTOR] [int] NOT NULL,
	[PRES_REFILL] [smallint] NOT NULL,
	[PRES_SUBST_PERMIT] [smallint] NOT NULL,
 CONSTRAINT [PK_PRESCRIPTION] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
/****** Object:  Table [dbo].[RECALL]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[RECALL](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[REC_DESCR] [varchar](100) NOT NULL,
	[REC_STD_TREATEMENT] [varchar](5) NOT NULL,
	[REC_PERSON] [int] NOT NULL,
	[REC_DELAY] [int] NOT NULL,
	[REC_DATE] [int] NOT NULL,
	[REC_STATUS] [smallint] NOT NULL,
 CONSTRAINT [PK_RECALL] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[RECALL_RULE]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[RECALL_RULE](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[RER_DESCR] [varchar](100) NOT NULL,
	[RER_FROM_STD_TREATMENT] [varchar](5) NOT NULL,
	[RER_DELAY] [int] NOT NULL,
	[RER_TO_STD_TREATMENT] [varchar](5) NOT NULL,
 CONSTRAINT [PK_RECALL_RULE] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[REFERRAL]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[REFERRAL](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[REFF_OBJCLASS] [smallint] NOT NULL,
	[REFF_OBJID] [int] NOT NULL,
	[REFF_D_O_N] [varchar](30) NOT NULL,
	[REFF_A_D_O_N] [varchar](30) NOT NULL,
	[REFF_SOCIAL_WORKER] [varchar](30) NOT NULL,
	[REFF_SOCIAL_WORKER_2] [varchar](30) NOT NULL,
	[REFF_SOCIAL_WORKER_3] [varchar](30) NOT NULL,
	[REFF_DENTAL_DAY] [smallint] NOT NULL,
	[REFF_CASEWORKER] [varchar](30) NOT NULL,
	[REFF_ORGA_TDHS_BUILDING] [int] NOT NULL
) ON [PRIMARY]
SET ANSI_PADDING ON
ALTER TABLE [dbo].[REFERRAL] ADD [REFF_ADMIN] [varchar](30) NOT NULL DEFAULT ('')
 CONSTRAINT [PK_REFERRAL] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[REPORT_QUEUE]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[REPORT_QUEUE](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[REP_ROO_ID] [int] NOT NULL,
	[REP_USER_ID] [int] NOT NULL,
	[REP_OUTD_MODEL] [varchar](31) NOT NULL,
	[REP_OUTD_KIND] [smallint] NOT NULL,
	[REP_ENQUEUED_DATE] [int] NOT NULL,
	[REP_STATUS] [smallint] NOT NULL,
	[REP_GENERATED_DATE] [int] NOT NULL,
	[REP_GENERATED_NAME] [varchar](100) NOT NULL,
 CONSTRAINT [PK_REPORT_QUEUE] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[RESPONSIBLE_PARTY]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RESPONSIBLE_PARTY](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[RESP_HAS_PLAN] [smallint] NOT NULL,
	[RESP_LAST_PAYDATE] [int] NOT NULL,
	[RESP_LAST_PAYMENT] [decimal](11, 2) NOT NULL,
	[RESP_NET_BALANCE] [decimal](11, 2) NOT NULL,
	[RESP_INS_BALANCE] [decimal](11, 2) NOT NULL,
	[RESP_PERSON] [int] NOT NULL,
 CONSTRAINT [PK_RESPONSIBLE_PARTY] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[ROOT]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ROOT](
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
 CONSTRAINT [PK_ROOT] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[STD_DIAGNOSIS]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[STD_DIAGNOSIS](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[DIA_CODE] [varchar](9) NOT NULL,
	[DIA_DESCR] [varchar](127) NOT NULL,
 CONSTRAINT [PK_STD_DIAGNOSIS] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[DIA_CODE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[STD_TREATMENT]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[STD_TREATMENT](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[STDT_ID] [varchar](5) NOT NULL,
	[STDT_ABREVIATION] [varchar](13) NOT NULL,
	[STDT_COLOR] [smallint] NOT NULL,
	[STDT_DESCRIPTION] [varchar](255) NOT NULL,
	[STDT_NB_UNITS] [smallint] NOT NULL,
	[STDT_PERMANENT_DEPENDENT] [smallint] NOT NULL,
	[STDT_PRICE] [decimal](11, 2) NOT NULL,
	[STDT_PRIMARY_DEPENDENT] [smallint] NOT NULL,
	[STDT_QUADRANT_DEPENDENT] [smallint] NOT NULL,
	[STDT_SHORT_DESCRIPTION] [varchar](31) NOT NULL,
	[STDT_SURF_MINI_CAR] [smallint] NOT NULL,
 CONSTRAINT [PK_STD_TREATMENT] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[STDT_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[SUBCONTRACTOR]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[SUBCONTRACTOR](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[SUBC_NAME] [varchar](60) NOT NULL,
	[SUBC_CONTACT] [varchar](60) NOT NULL,
	[SUBC_EMAIL] [varchar](40) NOT NULL,
	[SUBC_ADDRESS] [int] NOT NULL,
 CONSTRAINT [PK_SUBCONTRACTOR] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[TDHS_REFERRALS]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TDHS_REFERRALS](
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[LEFTID] [int] NOT NULL,
	[RIGHTID] [int] NOT NULL,
 CONSTRAINT [PK_TDHS_REFERRALS] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[TRANSAC_TYPE]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[TRANSAC_TYPE](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[TRST_ABREV] [varchar](8) NOT NULL,
	[TRST_DESCRIPTION] [varchar](127) NOT NULL,
	[TRST_IS_CREDIT] [smallint] NOT NULL,
	[TRST_DO_BREAKDOWN] [smallint] NOT NULL,
	[TRST_IS_COLLECTION] [smallint] NOT NULL,
	[TRST_STATUS] [smallint] NOT NULL,
	[TRST_ON_DEP_SLIP] [smallint] NOT NULL,
 CONSTRAINT [PK_TRANSAC_TYPE] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[TREA_PHOTOS]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TREA_PHOTOS](
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[LEFTID] [int] NOT NULL,
	[RIGHTID] [int] NOT NULL,
 CONSTRAINT [PK_TREA_PHOTOS] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object:  Table [dbo].[TREATMENT]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[TREATMENT](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[TRT_CARE_PLAN] [int] NOT NULL,
	[TRT_GROUP] [smallint] NOT NULL,
	[TRT_INS1] [decimal](11, 2) NOT NULL,
	[TRT_INS2] [decimal](11, 2) NOT NULL,
	[TRT_WRITEOFF] [decimal](11, 2) NOT NULL,
	[TRT_CHARGE] [decimal](11, 2) NOT NULL,
	[TRT_OFFICE_VISIT] [int] NOT NULL,
	[TRT_PRICE] [decimal](11, 2) NOT NULL,
	[TRT_PROVIDER] [int] NOT NULL,
	[TRT_LEDGER] [int] NOT NULL,
	[TRT_QUADRANT] [smallint] NOT NULL,
	[TRT_TREP_DATE] [int] NOT NULL,
	[TRT_STATUS] [smallint] NOT NULL,
	[TRT_STD_TREATMENT] [varchar](5) NOT NULL,
	[TRT_SURFACE] [varchar](5) NOT NULL,
	[TRT_TOOTH] [smallint] NOT NULL,
	[TRT_NB_UNITS] [smallint] NOT NULL,
	[TRT_DIAGNOSIS] [int] NOT NULL,
	[TRT_TOS] [varchar](1) NOT NULL,
	[TRT_POS] [varchar](2) NOT NULL,
	[TRT_PRIORITY_ORDER] [int] NOT NULL,
 CONSTRAINT [PK_TREATMENT] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[TREATMENT_PLAN]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[TREATMENT_PLAN](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[TREA_FEE_SCHEDULE] [int] NOT NULL,
	[TREP_CREATION_DATE] [int] NOT NULL,
	[TREP_DESCRIPTION] [varchar](60) NOT NULL,
	[TREP_PATIENT] [int] NOT NULL,
	[TREP_HAS_NOTES] [smallint] NOT NULL,
	[TREP_PROVIDER] [int] NOT NULL,
	[TREP_STATUS] [smallint] NOT NULL,
	[TREP_TOTAL] [decimal](11, 2) NOT NULL,
	[TREP_DIAGNOSIS1] [varchar](9) NOT NULL,
	[TREP_DIAGNOSIS2] [varchar](9) NOT NULL,
	[TREP_DIAGNOSIS3] [varchar](9) NOT NULL,
	[TREP_DIAGNOSIS4] [varchar](9) NOT NULL,
 CONSTRAINT [PK_TREATMENT_PLAN] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[USUAL_TRT]    Script Date: 10/4/2015 2:44:23 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[USUAL_TRT](
	[ROO_CREATION_DATE] [int] NOT NULL,
	[ROO_DB_NUMBER] [smallint] NOT NULL,
	[ROO_UPDATE_DATE] [int] NOT NULL,
	[ROO_VERSION] [smallint] NOT NULL,
	[ROO_ID] [int] NOT NULL,
	[USTR_ABREVIATION] [varchar](10) NOT NULL,
	[USTR_PRES_ORDER] [smallint] NOT NULL,
	[USTR_PRICE] [decimal](11, 2) NOT NULL,
	[USTR_PROVIDER] [int] NOT NULL,
	[USTR_STD_TREATMENT] [varchar](5) NOT NULL,
	[USTR_STD_TREATMENT_DB] [smallint] NOT NULL,
	[USTR_TIME_UNIT_ASS] [smallint] NOT NULL,
	[USTR_TIME_UNIT_DOC] [smallint] NOT NULL,
	[USTR_TIME_UNIT_HYG] [smallint] NOT NULL,
 CONSTRAINT [PK_USUAL_TRT] PRIMARY KEY CLUSTERED 
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Index [IW_addr_per_zipcode]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_addr_per_zipcode] ON [dbo].[ADDRESS]
(
	[ROO_DB_NUMBER] ASC,
	[ADD_ZIP_CODE] ASC,
	[ADD_CITY] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_ADDRESS]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_ADDRESS] ON [dbo].[ADDRESS]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_OPT_USER]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_OPT_USER] ON [dbo].[APPLI_OPTION]
(
	[ROO_DB_NUMBER] ASC,
	[OPT_USER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_opt_by_db_n_name]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_opt_by_db_n_name] ON [dbo].[APPLI_OPTION]
(
	[ROO_DB_NUMBER] ASC,
	[OPT_USER] ASC,
	[OPT_NAME] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_APPLI_OPTION]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_APPLI_OPTION] ON [dbo].[APPLI_OPTION]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_USER_ORGANIZATION]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_USER_ORGANIZATION] ON [dbo].[APPLI_USER]
(
	[ROO_DB_NUMBER] ASC,
	[USER_ORGANIZATION] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_APPLI_USER]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_APPLI_USER] ON [dbo].[APPLI_USER]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_ATTD_PERSON]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_ATTD_PERSON] ON [dbo].[ATTACHED_DOCUMENT]
(
	[ROO_DB_NUMBER] ASC,
	[ATTD_PERSON] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_ATTACHED_DOCUMENT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_ATTACHED_DOCUMENT] ON [dbo].[ATTACHED_DOCUMENT]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_ATTACHED_IMAGE]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_ATTACHED_IMAGE] ON [dbo].[ATTACHED_IMAGE]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_attorney_name]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_attorney_name] ON [dbo].[ATTORNEY]
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC,
	[ATT_NAME] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_ATTORNEY]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_ATTORNEY] ON [dbo].[ATTORNEY]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_AUTO_TASKS]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_AUTO_TASKS] ON [dbo].[AUTO_TASKS]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_BRK_CLAIM]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_BRK_CLAIM] ON [dbo].[BREAKDOWN]
(
	[ROO_DB_NUMBER] ASC,
	[BRK_CLAIM] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_BRK_PAYMENT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_BRK_PAYMENT] ON [dbo].[BREAKDOWN]
(
	[ROO_DB_NUMBER] ASC,
	[BRK_PAYMENT] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_BRK_TREATMENT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_BRK_TREATMENT] ON [dbo].[BREAKDOWN]
(
	[ROO_DB_NUMBER] ASC,
	[BRK_TREATMENT] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_BREAKDOWN]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_BREAKDOWN] ON [dbo].[BREAKDOWN]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_CHAI_PLAN_MODEL]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_CHAI_PLAN_MODEL] ON [dbo].[CHAIR]
(
	[ROO_DB_NUMBER] ASC,
	[CHAI_PLAN_MODEL] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_CHAIR]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_CHAIR] ON [dbo].[CHAIR]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_CHARTING]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_CHARTING] ON [dbo].[CHARTING]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_left_CLAI_PAYMENTS]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_left_CLAI_PAYMENTS] ON [dbo].[CLAI_PAYMENTS]
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_right_CLAI_PAYMENTS]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_right_CLAI_PAYMENTS] ON [dbo].[CLAI_PAYMENTS]
(
	[ROO_DB_NUMBER] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_CLAI_CLAIM_DATA]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_CLAI_CLAIM_DATA] ON [dbo].[CLAIM]
(
	[ROO_DB_NUMBER] ASC,
	[CLAI_CLAIM_DATA] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_CLAI_INSPLAN]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_CLAI_INSPLAN] ON [dbo].[CLAIM]
(
	[ROO_DB_NUMBER] ASC,
	[CLAI_INSPLAN] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_CLAI_OFFICE_VISIT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_CLAI_OFFICE_VISIT] ON [dbo].[CLAIM]
(
	[ROO_DB_NUMBER] ASC,
	[CLAI_OFFICE_VISIT] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_CLAI_TREATMENT_PLAN]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_CLAI_TREATMENT_PLAN] ON [dbo].[CLAIM]
(
	[ROO_DB_NUMBER] ASC,
	[CLAI_TREATMENT_PLAN] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_CLAIM]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_CLAIM] ON [dbo].[CLAIM]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_CLAIM_DATA]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_CLAIM_DATA] ON [dbo].[CLAIM_DATA]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_CREDIT_COMPANY]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_CREDIT_COMPANY] ON [dbo].[CREDIT_COMPANY]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_CREDIT_SOURCE]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_CREDIT_SOURCE] ON [dbo].[CREDIT_SOURCE]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_CRI_SET]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_CRI_SET] ON [dbo].[CRITERIA]
(
	[ROO_DB_NUMBER] ASC,
	[CRI_SET] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_CRITERIA]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_CRITERIA] ON [dbo].[CRITERIA]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_crs_db_and_name]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_crs_db_and_name] ON [dbo].[CRITERIA_SET]
(
	[ROO_DB_NUMBER] ASC,
	[CRS_NAME] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_CRITERIA_SET]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_CRITERIA_SET] ON [dbo].[CRITERIA_SET]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_EMP_OFFICE]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_EMP_OFFICE] ON [dbo].[EMPLOYEE]
(
	[ROO_DB_NUMBER] ASC,
	[EMP_OFFICE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_EMPLOYEE]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_EMPLOYEE] ON [dbo].[EMPLOYEE]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_employer_name]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_employer_name] ON [dbo].[EMPLOYER]
(
	[ROO_DB_NUMBER] ASC,
	[ROO_ID] ASC,
	[EMPR_NAME] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_EMPLOYER]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_EMPLOYER] ON [dbo].[EMPLOYER]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_FELT_SCHEDULE]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_FELT_SCHEDULE] ON [dbo].[FEE_ELEMENT]
(
	[ROO_DB_NUMBER] ASC,
	[FELT_SCHEDULE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_felt_per_fsch_trt]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_felt_per_fsch_trt] ON [dbo].[FEE_ELEMENT]
(
	[ROO_DB_NUMBER] ASC,
	[FELT_SCHEDULE] ASC,
	[FELT_STDT_TREATMENT] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_one_felt_per_fsch_trt]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_one_felt_per_fsch_trt] ON [dbo].[FEE_ELEMENT]
(
	[ROO_DB_NUMBER] ASC,
	[FELT_SCHEDULE] ASC,
	[FELT_STDT_TREATMENT] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_FEE_ELEMENT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_FEE_ELEMENT] ON [dbo].[FEE_ELEMENT]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_FEE_SCHEDULE]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_FEE_SCHEDULE] ON [dbo].[FEE_SCHEDULE]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_HIST_USER]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_HIST_USER] ON [dbo].[HISTO_OPERATION]
(
	[ROO_DB_NUMBER] ASC,
	[HIST_USER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_hist_db_user_name]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_hist_db_user_name] ON [dbo].[HISTO_OPERATION]
(
	[ROO_DB_NUMBER] ASC,
	[HIST_USER] ASC,
	[ROO_CREATION_DATE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_HISTO_OPERATION]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_HISTO_OPERATION] ON [dbo].[HISTO_OPERATION]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_INSC_EMPLOYER]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_INSC_EMPLOYER] ON [dbo].[INSCOV]
(
	[ROO_DB_NUMBER] ASC,
	[INSC_EMPLOYER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_INSC_INSPLAN]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_INSC_INSPLAN] ON [dbo].[INSCOV]
(
	[ROO_DB_NUMBER] ASC,
	[INSC_INSPLAN] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_INSCOV]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_INSCOV] ON [dbo].[INSCOV]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_INSP_EMPLOYER]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_INSP_EMPLOYER] ON [dbo].[INSPLAN]
(
	[ROO_DB_NUMBER] ASC,
	[INSP_EMPLOYER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_INSP_PAYER]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_INSP_PAYER] ON [dbo].[INSPLAN]
(
	[ROO_DB_NUMBER] ASC,
	[INSP_PAYER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_INSPLAN]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_INSPLAN] ON [dbo].[INSPLAN]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_MEDICATION]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_MEDICATION] ON [dbo].[MEDICATION]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_netorg_per_db]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_netorg_per_db] ON [dbo].[NET_ORGANIZATION]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_netorg_per_exact_name]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_netorg_per_exact_name] ON [dbo].[NET_ORGANIZATION]
(
	[ORGA_NAME] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_netorg_per_name]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_netorg_per_name] ON [dbo].[NET_ORGANIZATION]
(
	[ORGA_NAME] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_NET_ORGANIZATION]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_NET_ORGANIZATION] ON [dbo].[NET_ORGANIZATION]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_note_class_and_id]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_note_class_and_id] ON [dbo].[NOTE]
(
	[ROO_DB_NUMBER] ASC,
	[NOTE_OBJCLASS] ASC,
	[NOTE_OBJID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_note_user]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_note_user] ON [dbo].[NOTE]
(
	[ROO_DB_NUMBER] ASC,
	[NOTE_APPLI_USER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_NOTE]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_NOTE] ON [dbo].[NOTE]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_left_NOTE_DOCUMENT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_left_NOTE_DOCUMENT] ON [dbo].[NOTE_DOCUMENT]
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_right_NOTE_DOCUMENT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_right_NOTE_DOCUMENT] ON [dbo].[NOTE_DOCUMENT]
(
	[ROO_DB_NUMBER] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_left_OFCR_ST_TREATMENTS]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_left_OFCR_ST_TREATMENTS] ON [dbo].[OFCR_ST_TREATMENTS]
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_right_OFCR_ST_TREATMENTS]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_right_OFCR_ST_TREATMENTS] ON [dbo].[OFCR_ST_TREATMENTS]
(
	[ROO_DB_NUMBER] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_OFCR_PROVIDER]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_OFCR_PROVIDER] ON [dbo].[OFF_CARE]
(
	[ROO_DB_NUMBER] ASC,
	[OFCR_PROVIDER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_OFF_CARE]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_OFF_CARE] ON [dbo].[OFF_CARE]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_left_OFFI_DOCTORS]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_left_OFFI_DOCTORS] ON [dbo].[OFFI_DOCTORS]
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_right_OFFI_DOCTORS]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_right_OFFI_DOCTORS] ON [dbo].[OFFI_DOCTORS]
(
	[ROO_DB_NUMBER] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_left_OFFI_HYGIENIST]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_left_OFFI_HYGIENIST] ON [dbo].[OFFI_HYGIENIST]
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_right_OFFI_HYGIENIST]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_right_OFFI_HYGIENIST] ON [dbo].[OFFI_HYGIENIST]
(
	[ROO_DB_NUMBER] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_office_per_name]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_office_per_name] ON [dbo].[OFFICE]
(
	[OFFI_NAME] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_OFFICE]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_OFFICE] ON [dbo].[OFFICE]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_OFFV_ASSISTANT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_OFFV_ASSISTANT] ON [dbo].[OFFICE_VISIT]
(
	[ROO_DB_NUMBER] ASC,
	[OFFV_ASSISTANT] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_OFFV_CHAIR]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_OFFV_CHAIR] ON [dbo].[OFFICE_VISIT]
(
	[ROO_DB_NUMBER] ASC,
	[OFFV_CHAIR] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_OFFV_PERSON]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_OFFV_PERSON] ON [dbo].[OFFICE_VISIT]
(
	[ROO_DB_NUMBER] ASC,
	[OFFV_PERSON] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_OFFV_PROVIDER]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_OFFV_PROVIDER] ON [dbo].[OFFICE_VISIT]
(
	[ROO_DB_NUMBER] ASC,
	[OFFV_PROVIDER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_offvst_from_date]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_offvst_from_date] ON [dbo].[OFFICE_VISIT]
(
	[ROO_DB_NUMBER] ASC,
	[OFFV_VISIT_DATE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_OFFICE_VISIT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_OFFICE_VISIT] ON [dbo].[OFFICE_VISIT]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_ORGA_TDHS_BUILDING]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_ORGA_TDHS_BUILDING] ON [dbo].[ORGA_TDHS_BUILDING]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_OUT_DOC]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_OUT_DOC] ON [dbo].[OUT_DOC]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_PATIENT_LIST]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_PATIENT_LIST] ON [dbo].[PATIENT_LIST]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_left_PATL_ELEMENTS]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_left_PATL_ELEMENTS] ON [dbo].[PATL_ELEMENTS]
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_right_PATL_ELEMENTS]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_right_PATL_ELEMENTS] ON [dbo].[PATL_ELEMENTS]
(
	[ROO_DB_NUMBER] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_PAYER]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_PAYER] ON [dbo].[PAYER]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_PAYM_LEDGER]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_PAYM_LEDGER] ON [dbo].[PAYMENT]
(
	[ROO_DB_NUMBER] ASC,
	[PAYM_LEDGER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_PAYM_PPLAN]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_PAYM_PPLAN] ON [dbo].[PAYMENT]
(
	[ROO_DB_NUMBER] ASC,
	[PAYM_PPLAN] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_PAYMENT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_PAYMENT] ON [dbo].[PAYMENT]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_PAYMENT_PLAN]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_PAYMENT_PLAN] ON [dbo].[PAYMENT_PLAN]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_left_PER_REFERED_TO]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_left_PER_REFERED_TO] ON [dbo].[PER_REFERED_TO]
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_right_PER_REFERED_TO]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_right_PER_REFERED_TO] ON [dbo].[PER_REFERED_TO]
(
	[ROO_DB_NUMBER] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_INSU_EMPLOYER]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_INSU_EMPLOYER] ON [dbo].[PERSON]
(
	[ROO_DB_NUMBER] ASC,
	[INSU_EMPLOYER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_PER_ATTORNEY]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_PER_ATTORNEY] ON [dbo].[PERSON]
(
	[ROO_DB_NUMBER] ASC,
	[PER_ATTORNEY] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_PER_DOCTOR]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_PER_DOCTOR] ON [dbo].[PERSON]
(
	[ROO_DB_NUMBER] ASC,
	[PER_DOCTOR] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_PER_LEDGER]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_PER_LEDGER] ON [dbo].[PERSON]
(
	[ROO_DB_NUMBER] ASC,
	[PER_LEDGER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_PER_REFERED_BY]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_PER_REFERED_BY] ON [dbo].[PERSON]
(
	[ROO_DB_NUMBER] ASC,
	[PER_REFERED_BY] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_pers_db_and_name]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_pers_db_and_name] ON [dbo].[PERSON]
(
	[ROO_DB_NUMBER] ASC,
	[PER_NAME] ASC,
	[PER_FIRST_NAME] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_pers_ssn]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_pers_ssn] ON [dbo].[PERSON]
(
	[ROO_DB_NUMBER] ASC,
	[PER_SSN] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_PERSON]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_PERSON] ON [dbo].[PERSON]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_PMEL_PLAN_MODEL]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_PMEL_PLAN_MODEL] ON [dbo].[PLAN_MODEL_RULE]
(
	[ROO_DB_NUMBER] ASC,
	[PMEL_PLAN_MODEL] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_PLAN_MODEL_RULE]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_PLAN_MODEL_RULE] ON [dbo].[PLAN_MODEL_RULE]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_PLANNING_MODEL]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_PLANNING_MODEL] ON [dbo].[PLANNING_MODEL]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_PNP_ORGANIZATION]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_PNP_ORGANIZATION] ON [dbo].[POL_NEGO_PRODUCT]
(
	[ROO_DB_NUMBER] ASC,
	[PNP_ORGANIZATION] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_POL_NEGO_PRODUCT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_POL_NEGO_PRODUCT] ON [dbo].[POL_NEGO_PRODUCT]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_POL_PRODUCT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_POL_PRODUCT] ON [dbo].[POL_PRODUCT]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_PRES_PATIENT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_PRES_PATIENT] ON [dbo].[PRESCRIPTION]
(
	[ROO_DB_NUMBER] ASC,
	[PRES_PATIENT] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_PRESCRIPTION]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_PRESCRIPTION] ON [dbo].[PRESCRIPTION]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_REC_PERSON]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_REC_PERSON] ON [dbo].[RECALL]
(
	[ROO_DB_NUMBER] ASC,
	[REC_PERSON] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_RECALL]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_RECALL] ON [dbo].[RECALL]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_RECALL_RULE]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_RECALL_RULE] ON [dbo].[RECALL_RULE]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_reff_db_and_cla_id]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_reff_db_and_cla_id] ON [dbo].[REFERRAL]
(
	[ROO_DB_NUMBER] ASC,
	[REFF_OBJCLASS] ASC,
	[REFF_OBJID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_reff_db_and_class]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_reff_db_and_class] ON [dbo].[REFERRAL]
(
	[ROO_DB_NUMBER] ASC,
	[REFF_OBJCLASS] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_reff_db_and_class_order]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_reff_db_and_class_order] ON [dbo].[REFERRAL]
(
	[ROO_DB_NUMBER] ASC,
	[REFF_OBJCLASS] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_reff_db_order]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_reff_db_order] ON [dbo].[REFERRAL]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_REFERRAL]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_REFERRAL] ON [dbo].[REFERRAL]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_RESPONSIBLE_PARTY]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_RESPONSIBLE_PARTY] ON [dbo].[RESPONSIBLE_PARTY]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_primary_key]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_primary_key] ON [dbo].[STD_DIAGNOSIS]
(
	[ROO_DB_NUMBER] ASC,
	[DIA_CODE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_STD_DIAGNOSIS]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_STD_DIAGNOSIS] ON [dbo].[STD_DIAGNOSIS]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_primary_key]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_primary_key] ON [dbo].[STD_TREATMENT]
(
	[ROO_DB_NUMBER] ASC,
	[STDT_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_STD_TREATMENT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_STD_TREATMENT] ON [dbo].[STD_TREATMENT]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_SUBCONTRACTOR]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_SUBCONTRACTOR] ON [dbo].[SUBCONTRACTOR]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_left_TDHS_REFERRALS]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_left_TDHS_REFERRALS] ON [dbo].[TDHS_REFERRALS]
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_right_TDHS_REFERRALS]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_right_TDHS_REFERRALS] ON [dbo].[TDHS_REFERRALS]
(
	[ROO_DB_NUMBER] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_TRANSAC_TYPE]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_TRANSAC_TYPE] ON [dbo].[TRANSAC_TYPE]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_left_TREA_PHOTOS]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_left_TREA_PHOTOS] ON [dbo].[TREA_PHOTOS]
(
	[ROO_DB_NUMBER] ASC,
	[LEFTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_right_TREA_PHOTOS]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_right_TREA_PHOTOS] ON [dbo].[TREA_PHOTOS]
(
	[ROO_DB_NUMBER] ASC,
	[RIGHTID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_TRT_CARE_PLAN]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_TRT_CARE_PLAN] ON [dbo].[TREATMENT]
(
	[ROO_DB_NUMBER] ASC,
	[TRT_CARE_PLAN] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_TRT_OFFICE_VISIT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_TRT_OFFICE_VISIT] ON [dbo].[TREATMENT]
(
	[ROO_DB_NUMBER] ASC,
	[TRT_OFFICE_VISIT] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_TRT_PROVIDER]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_TRT_PROVIDER] ON [dbo].[TREATMENT]
(
	[ROO_DB_NUMBER] ASC,
	[TRT_PROVIDER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [IW_trt_priority_order]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [IW_trt_priority_order] ON [dbo].[TREATMENT]
(
	[ROO_DB_NUMBER] ASC,
	[TRT_CARE_PLAN] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_TREATMENT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_TREATMENT] ON [dbo].[TREATMENT]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_TREP_PATIENT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_TREP_PATIENT] ON [dbo].[TREATMENT_PLAN]
(
	[ROO_DB_NUMBER] ASC,
	[TREP_PATIENT] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_TREP_PROVIDER]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_TREP_PROVIDER] ON [dbo].[TREATMENT_PLAN]
(
	[ROO_DB_NUMBER] ASC,
	[TREP_PROVIDER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_TREATMENT_PLAN]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_TREATMENT_PLAN] ON [dbo].[TREATMENT_PLAN]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [I_USTR_PROVIDER]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [I_USTR_PROVIDER] ON [dbo].[USUAL_TRT]
(
	[ROO_DB_NUMBER] ASC,
	[USTR_PROVIDER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
/****** Object:  Index [RDN_USUAL_TRT]    Script Date: 10/4/2015 2:44:23 PM ******/
CREATE NONCLUSTERED INDEX [RDN_USUAL_TRT] ON [dbo].[USUAL_TRT]
(
	[ROO_DB_NUMBER] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
USE [master]
GO
ALTER DATABASE [mdc] SET  READ_WRITE 
GO
