
ALTER TABLE [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ADD [PatientComplaints] varchar(4096) NULL
GO
ALTER TABLE [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ADD [AnamnesisDisease] varchar(4096) NULL
GO
UPDATE [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] SET [AnamnesisDisease] = ''
GO
ALTER TABLE [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ALTER COLUMN [AnamnesisDisease] varchar(4096) NOT NULL
GO
ALTER TABLE [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ADD [DatePatiendConsidersSick] datetime NULL
GO
ALTER TABLE [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ADD [DateStartRecid] datetime NULL
GO
ALTER TABLE [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ADD [DateFirstTreatment] datetime NULL
GO
ALTER TABLE [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ADD [AnamnesisLife] varchar(4096) NULL
GO
ALTER TABLE [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ADD [EhrRus4hr8gh5s7j] uniqueidentifier NULL
GO
ALTER TABLE [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ADD CONSTRAINT [FK_T_EHR_RUS_4HR8GH5S7J_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_EhrRus4hr8gh5s7j]
FOREIGN KEY([EhrRus4hr8gh5s7j]) REFERENCES [EHR].[T_EHR_RUS_4HR8GH5S7J] ([EhrRusID])
GO
ALTER TABLE [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ADD [DateBloodGroup] datetime NULL
GO
ALTER TABLE [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ADD [BadHabits] bit NULL
GO
ALTER TABLE [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ADD [BadHazardFact] bit NULL
GO
ALTER TABLE [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ADD [PotentialSocFactors] bit NULL
GO
ALTER TABLE [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ADD [PastIllnesses] bit NULL
GO
ALTER TABLE [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ADD [FamilyAnamInvest] bit NULL
GO

Update F
set F.PatientComplaints = S.PatientComplaints, F.AnamnesisDisease = S.AnamnesisDisease, F.DatePatiendConsidersSick = S.DatePatiendConsidersSick,
F.DateStartRecid = S.DateStartRecid, F.DateFirstTreatment = S.DateFirstTreatment, F.AnamnesisLife = S.AnamnesisLife, F.EhrRus4hr8gh5s7j = S.EhrRus4hr8gh5s7j,
F.DateBloodGroup = S.DateBloodGroup, F.BadHabits = S.BadHabits, F.BadHazardFact = S.BadHazardFact, F.PotentialSocFactors = S.PotentialSocFactors,
F.PastIllnesses = S.PastIllnesses, F.FamilyAnamInvest = S.FamilyAnamInvest
from AKUZ.T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM F join AKUZ.T_VIMIS_COSULTATION_PROTOCOL_CUSTOM S on F.CdaDocumentID = S.CdaDocumentID
 
ALTER TABLE AKUZ.T_CDA_VIMIS_ABDOMEN_DESC
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_ABDOMEN_DESC_VimisConsultationProtocolCustom
ALTER TABLE AKUZ.T_CDA_VIMIS_ABDOMEN_DESC
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_ABDOMEN_DESC_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_AFFECTED_ARTERY
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_AFFECTED_ARTERY_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_AFFECTED_ARTERY]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_AFFECTED_ARTERY_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_AFFECTED_CORONARY_ARTERY
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_AFFECTED_CORONARY_ARTERY_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_AFFECTED_CORONARY_ARTERY]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_AFFECTED_CORONARY_ARTERY_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_ALLERGIC_REACT_ANAMNESIS
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_ALLERGIC_REACT_ANAMNESIS_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_ALLERGIC_REACT_ANAMNESIS] 
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_ALLERGIC_REACT_ANAMNESIS_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_BAD_HABITS_ADD
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_BAD_HABITS_ADD_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_BAD_HABITS_ADD] 
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_BAD_HABITS_ADD_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_BREATH_ASSESSMENT
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_BREATH_ASSESSMENT_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_BREATH_ASSESSMENT]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_BREATH_ASSESSMENT_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_CHARACT_WHEEZING
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_CHARACT_WHEEZING_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_CHARACT_WHEEZING] 
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_CHARACT_WHEEZING_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_COMPLICATIONS_ONMK
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_COMPLICATIONS_ONMK_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_COMPLICATIONS_ONMK]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_COMPLICATIONS_ONMK_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_DIAGNOSIS_ADDITIONAL
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_DIAGNOSIS_ADDITIONAL_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_DIAGNOSIS_ADDITIONAL]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_DIAGNOSIS_ADDITIONAL_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_DIAGNOSIS_MAIN
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_DIAGNOSIS_MAIN_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_DIAGNOSIS_MAIN]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_DIAGNOSIS_MAIN_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_HARMFUL_PROD_FACTORS
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_HARMFUL_PROD_FACTORS_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_HARMFUL_PROD_FACTORS] 
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_HARMFUL_PROD_FACTORS_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_HEART_ASSESSMENT
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_HEART_ASSESSMENT_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_HEART_ASSESSMENT]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_HEART_ASSESSMENT_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_HEART_MURMUR_DESC
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_HEART_MURMUR_DESC_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_HEART_MURMUR_DESC]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_HEART_MURMUR_DESC_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_IDENTIFIED_PATH
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_IDENTIFIED_PATH_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_IDENTIFIED_PATH] 
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_IDENTIFIED_PATH_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_LOCALIZATION_EDEMAS
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_LOCALIZATION_EDEMAS_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_LOCALIZATION_EDEMAS] 
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_LOCALIZATION_EDEMAS_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_LOCALIZATION_NECRO_ZONE
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_LOCALIZATION_NECRO_ZONE_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_LOCALIZATION_NECRO_ZONE] 
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_LOCALIZATION_NECRO_ZONE_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_LOWER_PULSATION
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_LOWER_PULSATION_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_LOWER_PULSATION]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_LOWER_PULSATION_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_PAST_ILLNESSES
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_PAST_ILLNESSES_VimisCosultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_PAST_ILLNESSES]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_PAST_ILLNESSES_VimisCosultationProtocolCustom]
FOREIGN KEY([VimisCosultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_PAST_OPERATIONS
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_PAST_OPERATIONS_VimisCosultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_PAST_OPERATIONS]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_PAST_OPERATIONS_VimisCosultationProtocolCustom]
FOREIGN KEY([VimisCosultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_PLANNED_LAB_STUDY
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_PLANNED_LAB_STUDY_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_PLANNED_LAB_STUDY]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_PLANNED_LAB_STUDY_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_POTENTIAL_DANG_FACT
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_POTENTIAL_DANG_FACT_VimisCosultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_POTENTIAL_DANG_FACT] 
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_POTENTIAL_DANG_FACT_VimisCosultationProtocolCustom]
FOREIGN KEY([VimisCosultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_PRESCRIBED_DRUG
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_PRESCRIBED_DRUG_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_PRESCRIBED_DRUG]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_PRESCRIBED_DRUG_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_PULSE_DESC
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_PULSE_DESC_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_PULSE_DESC]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_PULSE_DESC_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_RELATIVES_PATIENT
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_RELATIVES_PATIENT_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_RELATIVES_PATIENT]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_RELATIVES_PATIENT_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_SKIN_EVALUATION
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_SKIN_EVALUATION_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_SKIN_EVALUATION]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_SKIN_EVALUATION_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_TONGUE_DESC
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_TONGUE_DESC_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_TONGUE_DESC] 
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_TONGUE_DESC_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

ALTER TABLE AKUZ.T_CDA_VIMIS_TYPES_EDEMAS
DROP CONSTRAINT FK_T_VIMIS_COSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_TYPES_EDEMAS_VimisConsultationProtocolCustom
ALTER TABLE [AKUZ].[T_CDA_VIMIS_TYPES_EDEMAS]
ADD CONSTRAINT [FK_T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM_T_CDA_VIMIS_TYPES_EDEMAS_VimisConsultationProtocolCustom]
FOREIGN KEY([VimisConsultationProtocolCustom]) REFERENCES [AKUZ].[T_VIMIS_CONSULTATION_PROTOCOL_CUSTOM] ([CdaDocumentID])

DROP TABLE AKUZ.T_VIMIS_COSULTATION_PROTOCOL_CUSTOM


