CREATE TABLE [dbo].[treatment_facility]
(
treatment_key int NOT NULL,
treatment_facility_key int,
pt_key int NOT NULL,
prov_prac_no nchar(7) NOT NULL,
treatment_facility_start_date datetime NOT NULL,
treatment_facility_am_pm nchar(2) NOT NULL DEFAULT 'AM',
treatment_facility_has_auth_after_treatment bit DEFAULT 0 NOT NULL,
treatment_facility_is_emergency bit DEFAULT 0 NOT NULL,
treatment_facility_admission_type_key int NOT NULL,
treatment_code nvarchar(10) NOT NULL,
treatment_code_type_key int NOT NULL,
treatment_facility_hc_days float NOT NULL DEFAULT 0,
treatment_facility_icu_days float DEFAULT 0 NOT NULL,
treatment_facility_total_days float NOT NULL,
treatment_facility_theatre_time int,
treatment_facility_special_tech_key int, 
modified_dt datetime not null,
modified_by_key UNIQUEIDENTIFIER not null,
CONSTRAINT [treatment_facility_PK] PRIMARY KEY CLUSTERED (treatment_facility_key ASC),
CONSTRAINT [patient_treatment_facility_FK1] FOREIGN KEY ([pt_key]) REFERENCES [dbo].[patient] ([pt_key])
)
