UPDATE pal_SurfaceField
SET isHiddenFromWizzard = 0
WHERE	isHiddenFromWizzard IS NULL





IF  NOT EXISTS (SELECT * FROM sys.objects 
WHERE object_id = OBJECT_ID(N'[dbo].[pal_MedicalPatientDiagnosis]') AND type in (N'U'))
BEGIN
	CREATE TABLE [dbo].[pal_MedicalPatientDiagnosis](
		[recId] [int] IDENTITY(1,1) NOT NULL,
		[surfaceItemId] [int] NULL,
		[diagnosisId] [int] NULL,
		[primaryIcd] [varchar](250) NULL,
		[secondaryIcd] [varchar](250) NULL,
		[dateSaved] [datetime] NULL,
		[userIdSaved] [int] NULL,
	 CONSTRAINT [PK_pal_MedicalPatientDiagnosis] PRIMARY KEY CLUSTERED 
	(
		[recId] ASC
	)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
	) ON [PRIMARY]	

END