Immediate medical attention is necessary if the swelling is sudden, severe, or accompanied by other symptoms such as chest pain, difficulty breathing, or signs of a blood clot like redness and warmth over the swollen area. Pregnant women should be particularly vigilant about swelling and report any concerns to their healthcare provider promptly.