Yeah... that was a pretty big hit that was targeted at those countries/agencies. The majority of that attack could have been blocked had they not been using outdated OS's and/or had applied the updates that were meant to block that specific type of attack.
In the case of Microsoft OS's... patches have been released for OS versions that are still being supported... Of course if the users were still using OS's like Windows XP ( which isn't supported any longer and many of the British hospitals were still using ), they were certainly vulnerable. Others that were hit that were running newer OS's, simply had not updated them and someone on their network opened an email attachment they shouldn't have.
If you get an email that has an attachment AND you were not expecting it... do not open it without first contacting the sender to verify it is a valid email they sent you. Shipping companies ( ie UPS, FedX, USPS etc ) do not send notices unless you signed up for them and then they still don't send it in an attachment... the same is true of the IRS, FBI or other government agencies. If you get an attachment from someone you know... make sure they actually sent it since emails can be faked and other user computers could have been compromised.
I preach this to all of my clients, friends and family. Always keep your important data ( documents, pictures, music, email etc ) backed up in case of something like this... or just in case of an electronic failure of some sort. I can retrieve files from many types of bad situations but hardware ( hard drive and/or other storage ) failure isn't one of them.