I'm pretty sure that you were watching, "A Faraway Cry," from season 8. Here is the summary of that episode. Scroll down to episode 20.
At the end of the episode, Caroline's friend dies, and Caroline and Dr. Baker agree to lie to the baby's father, and tell him that his baby also died. The baby's father was the man you saw yelling at Caroline. He was totally unfit to be a father, and Caroline knew that he wouldn't be able to care for the baby properly. She made sure that the baby was given to a loving family. If I remember correctly, another baby was born at the same time, but passed away. Those parents were very loving people. Caroline had gotten to know them while at the camp. I think that Caroline and Dr. Baker switched babies, so that the loving couple would be able to care for the baby that lived. The unfit father believed that his baby had died, along with his wife.