A 29-year-old pregnant woman, 36 weeks gestation, presents with headache, visual disturbances and swelling of her hands and face. Her blood pressure is 164 over 106 mmHg and urinalysis shows 3 plus protein. What is the most appropriate immediate management