Although it means an arrest if someone says "patient X coded," "code" is really shorthand for "pay attention: important information" when it's announced over the PA, as there are a few kinds of code.
Here (Victoria) we have: yellow (an internal emergency, like a flood or power failure), brown (an external disaster, like a plane going down), purple (arson or bomb threat), red (confirmed is a fire, stand-by is smoke but no flames), orange (evacuation), grey (agression or threatening behaviour), black (hold-up or assault, not usually announced over the PA), and finally blue.
Although a code blue can mean cardio-respiratory failure, it refers to any medical emergency. Now that my hospital has instituted a Medical Emergency Team protocol, MET calls are made for a variety of conditions (resp rate <30, >8, SaO2 <90% on O2), pulse >130, SBP <90, fall in GCS by <2, etc), we have a far better survival rate, and fewer arrests. In addition to the other things I mentioned, we can call a code for "serious concern about a patient, unexpected post-procedural pain..." or if a doctor doesn't respond fast enough. I love this last one - the number of times before that we stood about waiting for a patient to actually stop breathing before we could get someone up to see them...! We can also call a code of the patient isn't responding to treatment, which is good when you have a new intern on who's a little cautious.
The MET team includes an anaesthetist, ICU reg and RN, med reg, the unit reg/resident or cover, and the clinical coordinator, as well as an orderly. It's hospital policy that anyone can call a code blue, and that nobody jumps up and down demanding why it was called for something less urgent - like if a patient has a vasovagal and an inexperienced nurse panicks. I think it's a fabulous system, which is why I've gone on so much - sorry!