Have you spoken to or taken her to see your vet about the diarrhea? That's what you should be thinking about or doing right now... I'm not sure why you would be more worried about disciplining her than helping her feel better. You don't discipline a dog for getting sick.
And, NO. Hitting a dog is never, ever, ever a good idea. You help her learn what you do want her to do & reinforce/reward that, while preventing her from performing behaviors that you don't want. So, for regular housetraining, you would take her outside very often (before she had the need or opportunity to have an accident) and reward her heavily for taking care of business there. BUT! Your situation in this case has nothing to do with that. If she's got diarrhea & can't physically hold it, getting mad at her certainly isn't going to help. Get her to the vet!
And, NO. Hitting a dog is never, ever, ever a good idea. You help her learn what you do want her to do & reinforce/reward that, while preventing her from performing behaviors that you don't want. So, for regular housetraining, you would take her outside very often (before she had the need or opportunity to have an accident) and reward her heavily for taking care of business there. BUT! Your situation in this case has nothing to do with that. If she's got diarrhea & can't physically hold it, getting mad at her certainly isn't going to help. Get her to the vet!