fixed bug where patient visits were not saved.