Added check to fix building new patients from dashboard