Hospitals, worried about lack of professionalism and inadvertent leaking of confidential data, are warning doctors not to set up relationships with patients on Facebook and Twitter.