There are different sentences with different meaning:
a) (sich) (an etwas) stoßen: to stumble or bump against sth. It implies usually no blood being spillt.
Ich habe mir (ein Körperteil) gestoßen
This is unintentionally hitting something with the body part. Usually this is used when it hurts afterwards or leaves a sore spot visible afterwards.
b) etwas anstoßen
Ich habe (eine Sache) (mit einem Körperteil) angestoßen
This means you hit something slightly, giving it a push. This is usually to describe an action on the thing and does not look so much at your body part used to push it.
c) aufschlagen: to bash sth open. this means you hit your bodypart with some blunt object or impact so badly that you are bleeding.
Ich habe mir (ein Körperteil) (an etwas) aufgeschlagen
d) schlagen: to beat or hit
Ich habe mit (etwas / einem Körperteil) an etwas geschlagen
You use the bodypart to beat (onto) something or hit or bang on something.