Old Patient Script

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

USE [PROMIS]

GO
/****** Object: Table [dbo].[patient] Script Date: 2023-12-11 4:40:55 PM
******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[patient](
[patient_id] [int] IDENTITY(1,1) NOT NULL,
[Patient_No] [nvarchar](50) NULL,
[patient_first_name] [nvarchar](500) NULL,
[patient_middle_name] [nvarchar](500) NULL,
[patient_last_name] [nvarchar](500) NULL,
[patient_gender] [nvarchar](50) NULL,
[patient_birth_date] [datetime] NULL,
[patient_preferred_language_id] [int] NULL,
[patient_email] [nvarchar](500) NULL,
[patient_mobile] [nvarchar](50) NULL,
[patient_preferred_contact_method_id] [int] NULL,
[diagnosis] [nvarchar](max) NULL,
[icd] [nvarchar](50) NULL,
[patient_promis_frequencey_id] [int] NULL,
[patient_pcp_id] [int] NULL,
[operator_id] [int] NULL,
[consent_completed] [bit] NULL,
[createdby_name] [nvarchar](500) NULL,
[createdby_date] [datetime] NULL,
[modifiedby_name] [nvarchar](500) NULL,
[modifiedby_date] [datetime] NULL,
[patient_address] [nvarchar](4000) NULL,
[patient_city] [nvarchar](50) NULL,
[patient_state] [nvarchar](50) NULL,
[patient_zip] [nvarchar](50) NULL,
[claimNo] [nvarchar](50) NULL,
[date_of_injury] [date] NULL,
[behavioral_health_referral_made] [bit] NULL,
[Active] [bit] NULL,
[Adjuster_id] [int] NULL,
[Adjuster_receive_confirmation] [bit] NULL,
[Adjuster_receive_reports] [bit] NULL,
[Adjuster_receive_notes] [bit] NULL,
[Adjuster_referral_source] [bit] NULL,
[Case_Manager_id] [int] NULL,
[Case_Manager_receive_confirmation] [bit] NULL,
[Case_Manager_receive_reports] [bit] NULL,
[Case_Manager_receive_notes] [bit] NULL,
[Case_Manager_referral_source] [bit] NULL,
[Case_Coordinator_id] [int] NULL,
[Case_Coordinator_receive_confirmation] [bit] NULL,
[Case_Coordinator_receive_reports] [bit] NULL,
[Case_Coordinator_receive_notes] [bit] NULL,
[Case_Coordinator_referral_source] [bit] NULL,
[Plaintiff_Attorney_id] [int] NULL,
[Plaintiff_Attorney_receive_confirmation] [bit] NULL,
[Plaintiff_Attorney_receive_reports] [bit] NULL,
[Plaintiff_Attorney_receive_notes] [bit] NULL,
[Plaintiff_Attorney_referral_source] [bit] NULL,
[Defense_Attorney_id] [int] NULL,
[Defense_Attorney_receive_confirmation] [bit] NULL,
[Defense_Attorney_receive_reports] [bit] NULL,
[Defense_Attorney_receive_notes] [bit] NULL,
[Defense_Attorney_referral_source] [bit] NULL,
[Treating_Physician_id] [int] NULL,
[Treating_Physician_receive_confirmation] [bit] NULL,
[Treating_Physician_receive_reports] [bit] NULL,
[Treating_Physician_receive_notes] [bit] NULL,
[Treating_Physician_referral_source] [bit] NULL,
[Network_Provider_id] [int] NULL,
[Network_Provider_receive_confirmation] [bit] NULL,
[Network_Provider_receive_reports] [bit] NULL,
[Network_Provider_receive_notes] [bit] NULL,
[Network_Provider_referral_source] [bit] NULL,
[Patient_creation_confirm_referral_source] [bit] NULL,
[Patient_creation_confirm_attorney] [bit] NULL,
CONSTRAINT [PK_patient] PRIMARY KEY CLUSTERED
(
[patient_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON
[PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[patient] ADD CONSTRAINT [DF_patient_Adjuster_referral_source]
DEFAULT ((0)) FOR [Adjuster_referral_source]
GO
ALTER TABLE [dbo].[patient] ADD CONSTRAINT
[DF_patient_Case_Manager_referral_source] DEFAULT ((0)) FOR
[Case_Manager_referral_source]
GO
ALTER TABLE [dbo].[patient] ADD CONSTRAINT
[DF_patient_Case_Coordinator_referral_source] DEFAULT ((0)) FOR
[Case_Coordinator_referral_source]
GO
ALTER TABLE [dbo].[patient] ADD CONSTRAINT
[DF_patient_Plaintiff_Attorney_referral_source] DEFAULT ((0)) FOR
[Plaintiff_Attorney_referral_source]
GO
ALTER TABLE [dbo].[patient] ADD CONSTRAINT
[DF_patient_Defense_Attorney_referral_source] DEFAULT ((0)) FOR
[Defense_Attorney_referral_source]
GO
ALTER TABLE [dbo].[patient] ADD CONSTRAINT
[DF_patient_Treating_Physician_referral_source] DEFAULT ((0)) FOR
[Treating_Physician_referral_source]
GO
ALTER TABLE [dbo].[patient] ADD CONSTRAINT
[DF_patient_Network_Provider_referral_source] DEFAULT ((0)) FOR
[Network_Provider_referral_source]
GO
ALTER TABLE [dbo].[patient] ADD CONSTRAINT
[DF_patient_Patient_creation_confirm_referral_source] DEFAULT ((0)) FOR
[Patient_creation_confirm_referral_source]
GO
ALTER TABLE [dbo].[patient] WITH CHECK ADD CONSTRAINT [FK_patient_contact_method]
FOREIGN KEY([patient_preferred_contact_method_id])
REFERENCES [dbo].[contact_method] ([contact_method_id])
GO
ALTER TABLE [dbo].[patient] CHECK CONSTRAINT [FK_patient_contact_method]
GO
ALTER TABLE [dbo].[patient] WITH CHECK ADD CONSTRAINT [FK_patient_language]
FOREIGN KEY([patient_preferred_language_id])
REFERENCES [dbo].[language] ([language_id])
GO
ALTER TABLE [dbo].[patient] CHECK CONSTRAINT [FK_patient_language]
GO
ALTER TABLE [dbo].[patient] WITH CHECK ADD CONSTRAINT [FK_patient_operator3]
FOREIGN KEY([operator_id])
REFERENCES [dbo].[operator] ([operator_id])
GO
ALTER TABLE [dbo].[patient] CHECK CONSTRAINT [FK_patient_operator3]
GO
ALTER TABLE [dbo].[patient] WITH CHECK ADD CONSTRAINT [FK_patient_pcp] FOREIGN
KEY([patient_pcp_id])
REFERENCES [dbo].[pcp] ([pcp_id])
GO
ALTER TABLE [dbo].[patient] CHECK CONSTRAINT [FK_patient_pcp]
GO
ALTER TABLE [dbo].[patient] WITH CHECK ADD CONSTRAINT
[FK_patient_promis_frequencey] FOREIGN KEY([patient_promis_frequencey_id])
REFERENCES [dbo].[promis_frequencey] ([promis_frequencey_id])
GO
ALTER TABLE [dbo].[patient] CHECK CONSTRAINT [FK_patient_promis_frequencey]
GO

You might also like