Because STIs (gonorrhea and chlamydia) are the most likely cause of PID, your doctor will prescribe antibiotics to treat those STIs. You'll usually get a single shot and then take antibiotics by mouth at home for several weeks. If you don't start getting better within 48 hours, you may need to go to the hospital. You may be treated in the hospital right away if: