How to Capture pregnancy data? (EDC, gestation length, etc)

Correctly determining when a pregnancy ends, which could include spontaneous at-home miscarriages, abortions, and deliveries at other institutions, is a lot more difficult than most folks appreciate.