I knew her well, but I see her again when she's 7-months pregnant. Do I say, "Congrats on the upcoming baby?"
Don't raise the topic of her pregnancy yourself; my experience of pregnant ladies is that they're very happy to talk about it - in fact, it will probably be the third thing they mention, after "Hello" and whatever current business is at hand - but at the same time (understandably, I think) they tend to resent the fact that the pregnancy is the first thing that anybody notices. (A friend of mine expressed it this way: "Hey! I'm right here, behind the belly!)
Don't pretend you haven't noticed that she's pregnant, and - when she mentions it - be friendly and interested. But treat her like she's your friend, who just happens to be pregnant, rather than as a pregnancy which just happens to have the face of your friend.
In my experience, you can't go wrong with "Hello! It's been a long time - how have you been?" If you know her well, tell her she looks great (unless she's obviously just been throwing up.)