An NHS hospital worker told a woman she had breast cancer after accessing her medical records, before her consultant confirmed the diagnosis.