update ForeignProxyDisinfection set tousseAmount=(select count(*) from TousseInstance po where po.foreignProxyItem_id in(select fi.id from ForeignProxyItem fi where fi.foreignProxyDisinfection_id=ForeignProxyDisinfection.id )) where tousseAmount is null;
update TousseDefinition set printAmount=1;
update materialdefinition set isimplant = (select i.includeimplant from materialinstance i where i.materialdefinition_id = materialdefinition.id and i.id  = (select max(m.id) from materialinstance m where m.materialdefinition_id = materialdefinition.id));