IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[HTETKIKTELETIP]') AND type in (N'U'))
BEGIN

CREATE TABLE [dbo].[HTETKIKTELETIP](
	[AccessionNumber] [nvarchar](30) NOT NULL,
	[CitizenId] [nvarchar](30) NULL,
	[TeletipStatus] [nvarchar](50) NULL,
	[TeletipStatusId] [nvarchar](3) NULL,
	[MedulaStatus] [nvarchar](50) NULL,
	[MedulaStatusId] [nvarchar](3) NULL,
	[WadoStatus] [nvarchar](50) NULL,
	[WadoStatusId] [nvarchar](3) NULL,
	[ReportStatus] [nvarchar](50) NULL,
	[ReportStatusId] [nvarchar](3) NULL,
	[MedulaInstitutionId] [nvarchar](10) NULL,
	[SutCode] [nvarchar](10) NULL,
	[LastMedulaSendDate] [nvarchar](30) NULL,
	[MedulaResponseCode] [nvarchar](10) NULL,
	[MedulaResponseMessage] [nvarchar](100) NULL,
	[ScheduleDate] [nvarchar](30) NULL,
	[PerformedDate] [nvarchar](30) NULL,
	[Error] [nvarchar](100) NULL,
	[PatientHistorySearchStatus] [nvarchar](100) NULL,
	[PatientHistorySearchStatusId] [nvarchar](3) NULL, 
	CONSTRAINT [PK_AccessionNumber] PRIMARY KEY CLUSTERED 
	(
		[AccessionNumber] 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]

END



