LONDON — Britain’s National Health Service ignored numerous warnings over the last year that many of its computer systems were outdated and unprotected from the type of devastating cyberattack it suffered on Friday.

The attack caused some hospitals to stop accepting patients, doctor’s offices to shut down, emergency rooms to divert patients, and critical operations to be canceled as a decentralized system struggled to cope.

At some hospitals, nurses could not even print out name tags for newborn babies. At the Royal London Hospital, in east London, George Popescu, a 23-year-old hotel cook, showed up with a forehead injury. “My head is pounding and they say they can’t see me,” he said. “They said their computers weren’t working. You don’t expect this in a big city like London.”

In a statement on Friday, the N.H.S. said its inquiry into the attack was in its early phases but that “at this stage we do not have any evidence that patient data has been accessed.”