A devastating global cyber attack that crippled computers in hospitals across the UK has cost the NHS £92m, a report from the Department of Health has found.