Most cases not caused by decision to discharge patients from hospital without testing, says former health secretary