Anaphylaxis
The best way to prevent anaphylaxis is to avoid the trigger that caused anaphylaxis in the past.  When this is not possible, there may be treatments to make the body stop reacting to the trigger.  This is called desensitization.  For example, treatment of the immune system (immunotherapy) with Hymenoptera venoms is able to make 80–90% of adults and 98% of children stop having allergic reactions to bees, wasps, hornets, yellow jackets, and fire ants.  Most people who are allergic to certain medicines can just avoid those medicines.  However, desensitization is possible for many medications (for example, many chemotherapies) if the person has to take those medicines.