Reference Identifier error on pregnancy visit. Closes #3176.