made form submission to database work for new patient