Fixed refactor problems for view a patient