A German hospital had to be partially evacuated after a World War II-era bomb was discovered during construction work on the grounds.