Fixed refactor problems for add a patient