
UPDATE AKUZ.T_CDA_BIO_FACTOR_ROUTTODIAG cda
SET cda.ValueCD = ehr.IdEHR
FROM EHR.T_EHR_RUS_JGUR22L1QO erj
JOIN EHR.T_EHR_RUS_39CQBH3PUL ehr on cda.ValueCD = ehr.EhrRusID
WHERE cda.EhrRusJgur22l1qo = erj.EhrRusID and erj.DATA_TYPE = 'CD' and erj.LINKED_OID = '1.2.643.5.1.13.13.11.1386';

UPDATE AKUZ.T_CDA_BIO_FACTOR_ROUTTODIAG  cda
SET cda.ValueCD = ehr.IdEHR
FROM EHR.T_EHR_RUS_JGUR22L1QO erj 
JOIN EHR.T_EHR_RUS_DVL105 ehr on cda.ValueCD = ehr.EhrRusID
WHERE cda.EhrRusJgur22l1qo = erj.EhrRusID and erj.DATA_TYPE = 'CD' and erj.LINKED_OID = '1.2.643.5.1.13.13.11.1367';

UPDATE AKUZ.T_CDA_BIO_FACTOR_ROUTTODIAG  cda
SET cda.ValueCD = ehr.IdEHR
FROM EHR.T_EHR_RUS_JGUR22L1QO erj
JOIN EHR.T_EHR_RUS_DEVMH61ADC ehr on cda.ValueCD = ehr.EhrRusID
WHERE cda.EhrRusJgur22l1qo = erj.EhrRusID and erj.DATA_TYPE = 'CD' and erj.LINKED_OID = '1.2.643.5.1.13.13.99.2.882';
