New/Update patient logic
New/Update patient logic