frederic i of prussia used it as a military hospital