A man photographed several children and staff at the hospital on his mobile phone.