I had swelling in feet ankles and legs, low hemoglobin, now swelling again?

I am female 39 years old and I have had swelling in feet ankles and legs and I went to the ER about it and was admitted for low hemoglobin which was 6.2 and had a blood transfusion and a bag of iron intravenously and for 2 weeks my well my legs did not swell now that I have been out of iron pills for 4 days and I’m on my menstral cycle ,Which are heavy. My feet legs and ankles have been swollen again what do you think this is