4yr old vomiting on and off worried...

He

My 4yr old got sick Thursday and was vomiting on and off all day. Friday she was fine all day and at 4am she puked again. Then Saturday came and she was fine playing outside and having fun and again puked at 4am. She was the same on Sunday as well puked at 4 and 5am. She is refusing to eat ANYTHING! She says she’s afraid of puking and hasn’t eaten anything since about Friday morning. She also isn’t drinking much either. I called her dr and they said if she doesn’t start drinking she will need to go to the ER. I’ve gotten her to drink a few sips of water but that’s it. I’m worried and really don’t want to put her through the stress and scary ness of the ER. Any mamas out there with suggestions to get her to drink and eat? I’m also not sure what’s causing her to vomit??