Patients are no longer being turned away from A&E departments after a global cyber-attack caused IT problems at various NHS sites across the country last week.

Restrictions have been put in places at various hospitals over the past week, after more than 300,000 computers in 150 countries were infected with the WannaCry ransomware virus.

Up to 47 trusts in England and 13 Scottish health boards in the NHS were also affected when the virus targeted computers with outdated security.

But since 3pm yesterday, only two hospitals remain on divert following the ransomware cyber-attack, down from seven.

NHS England says it is continuing to work with GP surgeries to ensure that they are putting in place a range of measures to protect themselves.

Dr Anne Rainsberry, the national incident director, said: “There are encouraging signs that the situation is improving, with fewer hospitals having to divert patients from their A&E units.

“The message to patients is clear: the NHS is open for business. Staff are working hard to ensure that the small number of organisations still affected return to normal shortly.

“If people have hospital or GP appointments they should attend unless told otherwise. The latest information can be found on the NHS Choices website.”

The West Herts Hospitals NHS Trust – which runs hospitals in Watford, St Albans and Hemel Hempstead – also experienced IT failures last week.

But a spokesperson said these were not linked to the malware attack.

READ MORE: ‘Delays to systems’ still expected at West Herts hospitals

To protect itself the trust shut down its computer systems on Friday, which meant staff were unable to accept incoming phone calls.

This week, the trust said that all three of its hospitals were open and running but added that there may be “some delays” to a few of its systems.

The Lister Hospital, which is run by the East and North Hertfordshire NHS Trust, is one of the last two still affected.

It still has diversions in place for Trauma, Stroke and urgent heart attack treatment, where diagnostic services are required.