I didn't swallow a battery, but what would the doctors do if it happened?

Depends on location. If the battery reaches the stomach, it will be allowed to pass through the body. If it becomes lodged in the throat or esophagus, it must be retrieved to avoid the caustic erosion and possible perforation of the pharynx(throat) or esophagus. The procedure is performed under general anesthesia.