Fixed bug with ID`s of diagnosis not being assigned properly