San Francisco agrees to $5M medical malpractice settlement