You got all that from the UN Rules of War and Geneva Conventions. It is the reason so many civilians are getting hurt and killed. This is all a Hamas designed war.
Article 12(4) of the 1977 Additional Protocol I provides:
Under no circumstances shall medical units be used in an attempt to shield military objectives from attack. Whenever possible, the Parties to the conflict shall ensure that medical units are so sited that attacks against military objectives do not imperil their safety.