CREATE TABLE [dbo].[patient_diagnosis] (
	[pt_diag_key] INT IDENTITY (1, 1) NOT NULL,
	[pt_key] INT NOT NULL,
	[icd_code] NVARCHAR(7) NOT NULL,
	[pt_diag_dt] datetime not null,
	is_deleted bit default 0 NOT NULL,
	[diag_key] int NOT NULL,
	[modified_dt] DATETIME  NOT NULL,
    [modified_by] UNIQUEIDENTIFIER NOT NULL,
    CONSTRAINT [pt_diagnosis_PK] PRIMARY KEY CLUSTERED ([pt_diag_key] ASC),
	CONSTRAINT [patient_patient_diagnosis_FK1] FOREIGN KEY ([pt_key]) REFERENCES [dbo].[patient] ([pt_key])
);

