Assessing the risks of accidents and occupational diseases