https://www.mlb.com/official-information/
Rule 5.05 defines "When a Batter Becomes a runner" and (paraphrasing) says that a hit batsman is automatically given 1st base unless one of two things happens:
1. the ball was judged to be in the strike zone when it hit the batter; in this case the HBP is called off and the pitch is called a strike.
2. the batter made "no effort" to get out of the way of a pitch irrespective of where it is. In this case the HBP is supposed to be called off and is just reported as a "Ball."
Edited by TheWildcat at 16:34:26 on 08/13/19