Added check to retrospective visit entry to prevent overlapping visits