Decisions to restrict hospital visits during the pandemic in Northern Ireland were taken as “the least worst option”, the former chief nursing officer (CNO) for the region has said.