Yes you can set it up after delivery, and you get the results during the stay usually.
You can set it up with the hospital once the baby is born I believe.
you can do it while still pregnant, its got risks and can cause miscarriage. you can wait and do it when its born also.