The Hospital Group has confirmed that patient photos are being held to ransom by hackers.