update Sterilisation set sterilizationPurposeid = (select max(id) from HttpOption where optionText = Sterilisation.sterilizationPurpose and optionListId = 'sterilizationPurpose') where sterilizationPurposeid is null and sterilizationPurpose is not null;
insert into SterilizerGroupOrgunit (sterilizerGroupId, orgUnitId) select ho.id, org.id from HttpOption ho, (select ou.id from SupplyRoomConfig src join OrgUnit ou on ou.orgUnitCoding = src.orgUnitCoding where src.supplyRoomType in (1,2)) org where ho.optionListId = 'sterilerGroup';