USE [OnCall]
GO
/****** Object: Table [dbo].[Sessions] Script Date: 03/14/2017 21:08:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Sessions](
[SessionID] [int] NOT NULL,
[PatFileID] [int] NULL,
[DocID] [int] NULL,
[Date] [datetime] NULL,
[PickupOfvistLocation] [nvarchar](max) NULL,
[SessionFees] [decimal](18, 0) NULL,
[MCFees] [decimal](18, 0) NULL,
[DoctorFees] [decimal](18, 0) NULL,
[AppFees] [decimal](18, 0) NULL,
[PeriodOfsession] [nvarchar](50) NULL,
[DescriptionOfSession] [nvarchar](max) NULL,
[LabTestID] [nvarchar](50) NULL,
[XaryTestID] [nvarchar](50) NULL,
[MedisionName] [nvarchar](50) NULL,
[InjuctionName] [nvarchar](50) NULL,
[Others] [nvarchar](max) NULL,
[NotesAr] [nvarchar](max) NULL,
[NotesEng] [nvarchar](max) NULL,
[NumOfVisit] [int] NULL,
CONSTRAINT [PK_Sessions] PRIMARY KEY CLUSTERED
(
[SessionID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Sessions] ADD CONSTRAINT [DF_Sessions_NumOfVisit] DEFAULT ((1)) FOR [NumOfVisit]
GO
------------------