ALTER TABLE [AKUZ].[T_CDA_SVEDEN_RODAH_CHILDBIRTH] ADD [EhrRus42q2uomg02] int NULL
GO
UPDATE [AKUZ].[T_CDA_SVEDEN_RODAH_CHILDBIRTH] SET [EhrRus42q2uomg02] = IdEhrColumn
from AKUZ.T_CDA_SVEDEN_RODAH_CHILDBIRTH child 
GO
ALTER TABLE [AKUZ].[T_CDA_SVEDEN_RODAH_CHILDBIRTH] ALTER COLUMN [EhrRus42q2uomg02] int NOT NULL
GO
ALTER TABLE [AKUZ].[T_CDA_SVEDEN_RODAH_CHILDBIRTH] ADD CONSTRAINT [FK_T_EHR_RUS_42Q2UOMG02_T_CDA_SVEDEN_RODAH_CHILDBIRTH_EhrRus42q2uomg02]
FOREIGN KEY([EhrRus42q2uomg02]) REFERENCES [EHR].[T_EHR_RUS_42Q2UOMG02] ([EhrRusID])
GO
ALTER TABLE AKUZ.T_CDA_SVEDEN_RODAH_CHILDBIRTH DROP COLUMN IdEhrColumn
GO
--
ALTER TABLE [AKUZ].[T_CDA_SECTION_DOCINFO_SPORT] ADD [EhrRusVidiSporta] int NULL
GO
ALTER TABLE [AKUZ].[T_CDA_SECTION_DOCINFO_SPORT] ADD CONSTRAINT [FK_T_EHR_RUS_VIDI_SPORTA_T_CDA_SECTION_DOCINFO_SPORT_EhrRusVidiSporta]
FOREIGN KEY([EhrRusVidiSporta]) REFERENCES [EHR].[T_EHR_RUS_Vidi_sporta] ([EhrRusID])
GO
--
ALTER TABLE [AKUZ].[T_CDA_SECTION_DOCINFO_HEIGHTWORK] ADD [EhrRusGroupiRiskRazvitiiaProfZabol] int NULL
GO
ALTER TABLE [AKUZ].[T_CDA_SECTION_DOCINFO_HEIGHTWORK] ADD CONSTRAINT [FK_T_EHR_RUS_GROUPI_RISK_RAZVITIIA_PROF_ZABOL_T_CDA_SECTION_DOCINFO_HEIGHTWORK_EhrRusGroupiRiskRazvitiiaProfZabol]
FOREIGN KEY([EhrRusGroupiRiskRazvitiiaProfZabol]) REFERENCES [EHR].[T_EHR_RUS_Groupi_risk_razvitiia_prof_zabol] ([EhrRusID])
GO
