Judge orders dangerous dog surrendered to NHS