People are being urged to think carefully before visiting family in hospital